microblaze: Save and restore msr in hw exception
authorMichal Simek <monstr@monstr.eu>
Thu, 17 Sep 2009 15:37:33 +0000 (17:37 +0200)
committerMichal Simek <monstr@monstr.eu>
Tue, 22 Sep 2009 06:50:15 +0000 (08:50 +0200)
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: Michal Simek <monstr@monstr.eu>
arch/microblaze/kernel/hw_exception_handler.S

index 3288c9737671adc6362ba6a079a717d342fa487a..0ad0f7011a1a0d83cce979da660c098d64c50e7c 100644 (file)
 #define NUM_TO_REG(num)                r ## num
 
 #ifdef CONFIG_MMU
-/* FIXME you can't change first load of MSR because there is
- * hardcoded jump bri 4 */
        #define RESTORE_STATE                   \
+               lwi     r5, r1, 0;              \
+               mts     rmsr, r5;               \
+               nop;                            \
                lwi     r3, r1, PT_R3;          \
                lwi     r4, r1, PT_R4;          \
                lwi     r5, r1, PT_R5;          \
@@ -309,6 +310,9 @@ _hw_exception_handler:
        lwi     r31, r0, TOPHYS(PER_CPU(CURRENT_SAVE)) /* get saved current */
 #endif
 
+       mfs     r5, rmsr;
+       nop
+       swi     r5, r1, 0;
        mfs     r3, resr
        nop
        mfs     r4, rear;
This page took 0.024853 seconds and 5 git commands to generate.