Commit ac854ff1 authored by Michal Simek's avatar Michal Simek

microblaze: Save and restore msr in hw exception

I thought that this part of code could be removed because just
save and restore MSR but any code can't change it. But seems to
that any part of code works with this information.

This patch solved problem with allocation.
Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
parent afc26cb3
...@@ -84,9 +84,10 @@ ...@@ -84,9 +84,10 @@
#define NUM_TO_REG(num) r ## num #define NUM_TO_REG(num) r ## num
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
/* FIXME you can't change first load of MSR because there is
* hardcoded jump bri 4 */
#define RESTORE_STATE \ #define RESTORE_STATE \
lwi r5, r1, 0; \
mts rmsr, r5; \
nop; \
lwi r3, r1, PT_R3; \ lwi r3, r1, PT_R3; \
lwi r4, r1, PT_R4; \ lwi r4, r1, PT_R4; \
lwi r5, r1, PT_R5; \ lwi r5, r1, PT_R5; \
...@@ -309,6 +310,9 @@ _hw_exception_handler: ...@@ -309,6 +310,9 @@ _hw_exception_handler:
lwi r31, r0, TOPHYS(PER_CPU(CURRENT_SAVE)) /* get saved current */ lwi r31, r0, TOPHYS(PER_CPU(CURRENT_SAVE)) /* get saved current */
#endif #endif
mfs r5, rmsr;
nop
swi r5, r1, 0;
mfs r3, resr mfs r3, resr
nop nop
mfs r4, rear; mfs r4, rear;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment