xtensa: fix xtensa_wsr always writing 0
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 20 Mar 2022 16:40:14 +0000 (09:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:03 +0000 (14:23 +0200)
commit85814e6461b825c61b8df7f07558b0025ade05ed
tree709770f8ec8c936f89421ec3844ea80ea63ed062
parent821907e8f516b01ea0c64f057b7d0a45ab242e17
xtensa: fix xtensa_wsr always writing 0

commit a3d0245c58f962ee99d4440ea0eaf45fb7f5a5cc upstream.

The commit cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr")
replaced 'WSR' macro in the function xtensa_wsr with 'xtensa_set_sr',
but variable 'v' in the xtensa_set_sr body shadowed the argument 'v'
passed to it, resulting in wrong value written to debug registers.

Fix that by removing intermediate variable from the xtensa_set_sr
macro body.

Cc: stable@vger.kernel.org
Fixes: cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/include/asm/processor.h