xtensa: rsync before reading ZSR_FLUSH

The Xtensa ISA reference manual says to do rsync after wsr to
make sure register is updated before rsr. So do that.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2025-02-24 10:15:10 -08:00 committed by Benjamin Cabé
commit d9f6882071

View file

@ -264,6 +264,7 @@ xtensa_switch:
/* Flush the stack. The top of stack was stored for us by
* arch_cohere_stacks(). It can be NULL for a dummy thread.
*/
rsync
rsr a0, ZSR_FLUSH
beqz a0, noflush
mov a3, a1