Skip to content

Commit b6354db

Browse files
David Daneyralfbaechle
authored andcommitted
MIPS: Use EI/DI for MIPS R2.
For MIPS R2, use the EI and DI instructions to enable and disable interrupts. Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com> Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 6c34bc2 commit b6354db

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎arch/mips/include/asm/asmmacro.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
mtc0 \reg, CP0_TCSTATUS
3636
_ehb
3737
.endm
38+
#elif defined(CONFIG_CPU_MIPSR2)
39+
.macro local_irq_enable reg=t0
40+
ei
41+
irq_enable_hazard
42+
.endm
43+
44+
.macro local_irq_disable reg=t0
45+
di
46+
irq_disable_hazard
47+
.endm
3848
#else
3949
.macro local_irq_enable reg=t0
4050
mfc0 \reg, CP0_STATUS

0 commit comments

Comments
 (0)