]> 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)
commite158f66bcb3f2c0590307514d800a78c4f7b41c2
tree4404e5546ff147db429f40dc4fc90526e8629d22
parent384d0e841c99f0e714ef93a56d4e1033402d4e53
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