]> git.baikalelectronics.ru Git - kernel.git/commit
xtensa: fix a7 clobbering in coprocessor context load/store
authorMax Filippov <jcmvbkbc@gmail.com>
Thu, 14 Apr 2022 05:44:36 +0000 (22:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 12:38:59 +0000 (14:38 +0200)
commitb5cbf971f9f3ea6a8213d627c09c5fcb1603bdb0
tree1286840d2f1ce0c5041af06343211417296f3b24
parent335fa86550b6e3f0a6603a65418cb13cd818c5e3
xtensa: fix a7 clobbering in coprocessor context load/store

commit 7530a2acb473a0d384a3efdb485316b1e3ef9fbf upstream.

Fast coprocessor exception handler saves a3..a6, but coprocessor context
load/store code uses a4..a7 as temporaries, potentially clobbering a7.
'Potentially' because coprocessor state load/store macros may not use
all four temporary registers (and neither FPU nor HiFi macros do).
Use a3..a6 as intended.

Cc: stable@vger.kernel.org
Fixes: 2ba9bf53d251 ("[XTENSA] Add support for configurable registers and coprocessors")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/xtensa/kernel/coprocessor.S