]> 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)
committerMax Filippov <jcmvbkbc@gmail.com>
Sat, 16 Apr 2022 01:44:02 +0000 (18:44 -0700)
commit7530a2acb473a0d384a3efdb485316b1e3ef9fbf
tree4404e5546ff147db429f40dc4fc90526e8629d22
parentc7f4610fbed78b6434f9d5af5913f8f4b71194a6
xtensa: fix a7 clobbering in coprocessor context load/store

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>
arch/xtensa/kernel/coprocessor.S