Skip to contentSkip to conversation

MIPS: Use ei/di for mipsr2.

PATCH Applied David Daney 2 participants 2 messages Dec 10, 2008 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Use ei/di for mipsr2.

For mipsr2, use the ei and di instructions to enable and disable interrupts.

---
arch/mips/include/asm/asmmacro.h | 10 ++++++++++

1 files changed, 10 insertions(+), 0 deletions(-)
arch/mips/include/asm/asmmacro.h +0 -0
index 7a88175..6c8342a 100644
@@ -35,6 +35,16 @@
	mtc0	\reg, CP0_TCSTATUS
	_ehb
	.endm

+#elif defined(CONFIG_CPU_MIPSR2)
+ .macro local_irq_enable reg=t0
+ ei
+ irq_enable_hazard
+ .endm
+
+ .macro local_irq_disable reg=t0
+ di
+ irq_disable_hazard
+ .endm

#else
	.macro	local_irq_enable reg=t0
	mfc0	\reg, CP0_STATUS
Applied
#1 lore raw
Quoted 2 lines · David Daney

For mipsr2, use the ei and di instructions to enable and disable interrupts.

Thanks for breaking this one out; this is something that was simply somehow missed when the inline assembler versions were changed.

Applied,

Ralf