aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2008-12-10 11:37:25 -0500
committerRalf Baechle <ralf@linux-mips.org>2008-12-12 13:12:23 -0500
commitb6354db5bbbc538bf009cae6c019810b4a3ef21d (patch)
tree589a0f8d25879e2eb1c1a2c14b9b366e2a126950
parent6c34bc2976b30dc8b56392c020e25bae1f363cab (diff)
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>
-rw-r--r--arch/mips/include/asm/asmmacro.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
index 7a881755800f..6c8342ae74db 100644
--- a/arch/mips/include/asm/asmmacro.h
+++ b/arch/mips/include/asm/asmmacro.h
@@ -35,6 +35,16 @@
35 mtc0 \reg, CP0_TCSTATUS 35 mtc0 \reg, CP0_TCSTATUS
36 _ehb 36 _ehb
37 .endm 37 .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
38#else 48#else
39 .macro local_irq_enable reg=t0 49 .macro local_irq_enable reg=t0
40 mfc0 \reg, CP0_STATUS 50 mfc0 \reg, CP0_STATUS