]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
xtensa: fix xtensa_wsr always writing 0
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 20 Mar 2022 16:40:14 +0000 (09:40 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:56:49 +0000 (11:56 +0200)
commit2ac9b7dce10eed808bfee0c9b12b3dd41248e2aa
tree03d19d3a9c0018a49dcb2a3f1040b12cf007ff21
parentc8135edefa42d1399f63875089cd65f025605224
xtensa: fix xtensa_wsr always writing 0

BugLink: https://bugs.launchpad.net/bugs/1969110
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>
(cherry picked from commit 85814e6461b825c61b8df7f07558b0025ade05ed)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/xtensa/include/asm/processor.h