Skip to contentSkip to conversation

MIPS: fix local_irq_{disable,enable} in asmmacro.h

PATCH Applied Huang Pei 2 participants 2 messages Mar 23, 2021 – Mar 24, 2021

Subsystems (2)
lore
Share & tools
lore

Huang Pei

author
#0 lore raw

PATCH 1/1 MIPS: fix local_irq_{disable,enable} in asmmacro.h

commit ba9196d2e005 ("MIPS: Make DIEI support as a config option") use CPU_HAS_DIEI to indicate whether di/ei is implemented correctly, without this patch, "local_irq_disable" from entry.S in 3A1000 (with buggy di/ei) lose protection of commit e97c5b609880 ("MIPS:
Make irqflags.h functions preempt-safe")

Fixes ba9196d2e005 ("MIPS: Make DIEI support as a config option")
---
 arch/mips/include/asm/asmmacro.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/mips/include/asm/asmmacro.h +1 -2
index 86f2323ebe6b..ca83ada7015f 100644
@@ -44,8 +44,7 @@
 	.endm
 #endif
 
-#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR5) || \
-    defined(CONFIG_CPU_MIPSR6)
+#ifdef CONFIG_CPU_HAS_DIEI
 	.macro	local_irq_enable reg=t0
 	ei
 	irq_enable_hazard
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 11 lines · Huang Pei

commit ba9196d2e005 ("MIPS: Make DIEI support as a config option") use CPU_HAS_DIEI to indicate whether di/ei is implemented correctly, without this patch, "local_irq_disable" from entry.S in 3A1000 (with buggy di/ei) lose protection of commit e97c5b609880 ("MIPS:
Make irqflags.h functions preempt-safe")

Fixes ba9196d2e005 ("MIPS: Make DIEI support as a config option")
---
 arch/mips/include/asm/asmmacro.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]