Skip to contentSkip to conversation

microblaze: Fix systems with MSR=0

PATCH New Michal Simek 1 participant 2 messages Feb 7, 2011 Microblaze architecture

lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

PATCH 1/1 microblaze: Fix systems with MSR=0

u-boot BSP generates XILINX_USE_MSR_INSTR macro
even for system with MSR=0. That's why explicitly
check that MSR=1.

---
 arch/microblaze/include/asm/asm.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/microblaze/include/asm/asm.h +1 -1
index deb23e0..c89e904 100644
@@ -62,7 +62,7 @@
 #define NOP	__asm__ __volatile__ ("nop");
 
 /* use machine status registe USE_MSR_REG */
-#ifdef XILINX_USE_MSR_INSTR
+#if XILINX_USE_MSR_INSTR == 1
 #define MSRSET(val) \
 	__asm__ __volatile__ ("msrset r0," #val );
 
Signature · 1 line
1.5.5.6
author maintainer
#1 lore raw

PATCH 1/1 microblaze: Fix msr handling in interrupt_handler

Fix ancient code which worked with MSR in a bad way. Use rtid instruction which enable IRQs and jump.

---
 arch/microblaze/cpu/irq.S |   19 +------------------
 1 files changed, 1 insertions(+), 18 deletions(-)
arch/microblaze/cpu/irq.S +1 -18
index 47bba36..8c76a73 100644
@@ -60,7 +60,6 @@ _interrupt_handler:
 	addik	r1, r1, -124
 	brlid	r15, interrupt_handler
 	nop
-	nop
 	addik	r1, r1, 124
 	lwi	r31, r1, -120
 	lwi	r30, r1, -116
@@ -93,22 +92,6 @@ _interrupt_handler:
 	lwi	r3, r1, -8
 	lwi	r2, r1, -4
 
-	/* enable_interrupt */
-#ifdef XILINX_USE_MSR_INSTR
-	msrset	r0, 2
-#else
-	/* FIXME unstable in stressed mode - two irqs */
-	nop
-	addi	r1, r1, -4
-	swi	r12, r1, 0
-	mfs	r12, rmsr
-	ori	r12, r12, 2
-	mts	rmsr, r12
-	lwi	r12, r1, 0
-	addi	r1, r1, 4
-	nop
-#endif
-	bra	r14
-	nop
+	rtid	r14, 0
 	nop
 	.size _interrupt_handler,.-_interrupt_handler
Signature · 1 line
1.5.5.6