aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2009-09-17 11:37:33 -0400
committerMichal Simek <monstr@monstr.eu>2009-09-22 02:50:15 -0400
commitac854ff1fc779101ff1989c3a20c1f238a2b5f3a (patch)
treef49001366317e3c8032b63c405c05dc457ea36ca /arch/microblaze/kernel
parentafc26cb39e1e74c87a1b5eb013ead2590b91489c (diff)
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: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r--arch/microblaze/kernel/hw_exception_handler.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S
index 3288c9737671..0ad0f7011a1a 100644
--- a/arch/microblaze/kernel/hw_exception_handler.S
+++ b/arch/microblaze/kernel/hw_exception_handler.S
@@ -84,9 +84,10 @@
84#define NUM_TO_REG(num) r ## num 84#define NUM_TO_REG(num) r ## num
85 85
86#ifdef CONFIG_MMU 86#ifdef CONFIG_MMU
87/* FIXME you can't change first load of MSR because there is
88 * hardcoded jump bri 4 */
89 #define RESTORE_STATE \ 87 #define RESTORE_STATE \
88 lwi r5, r1, 0; \
89 mts rmsr, r5; \
90 nop; \
90 lwi r3, r1, PT_R3; \ 91 lwi r3, r1, PT_R3; \
91 lwi r4, r1, PT_R4; \ 92 lwi r4, r1, PT_R4; \
92 lwi r5, r1, PT_R5; \ 93 lwi r5, r1, PT_R5; \
@@ -309,6 +310,9 @@ _hw_exception_handler:
309 lwi r31, r0, TOPHYS(PER_CPU(CURRENT_SAVE)) /* get saved current */ 310 lwi r31, r0, TOPHYS(PER_CPU(CURRENT_SAVE)) /* get saved current */
310#endif 311#endif
311 312
313 mfs r5, rmsr;
314 nop
315 swi r5, r1, 0;
312 mfs r3, resr 316 mfs r3, resr
313 nop 317 nop
314 mfs r4, rear; 318 mfs r4, rear;