]> git.proxmox.com Git - mirror_ubuntu-focal-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>
Fri, 20 May 2022 13:18:30 +0000 (15:18 +0200)
commit98857337248aa39e9da120a1d7cc0fdf80bea514
treee5a962744135fecf3644e9578c85c3c3896cae60
parent6d06ab855affdca50238f3dc2cd008b49786ad0c
xtensa: fix xtensa_wsr always writing 0

BugLink: https://bugs.launchpad.net/bugs/1971497
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/xtensa/include/asm/processor.h