diff mbox series

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

Message ID 20210323023402.9657-1-huangpei@loongson.cn (mailing list archive)
State Accepted
Commit 05c4e2721d7af0df7bc1378a23712a0fd16947b5
Headers show
Series MIPS: fix local_irq_{disable,enable} in asmmacro.h | expand

Commit Message

Huang Pei March 23, 2021, 2:34 a.m. UTC
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")
Signed-off-by: Huang Pei <huangpei@loongson.cn>
---
 arch/mips/include/asm/asmmacro.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Thomas Bogendoerfer March 24, 2021, 10:04 a.m. UTC | #1
On Tue, Mar 23, 2021 at 10:34:02AM +0800, Huang Pei wrote:
> 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")
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
> ---
>  arch/mips/include/asm/asmmacro.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

applied to mips-next.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
index 86f2323ebe6b..ca83ada7015f 100644
--- a/arch/mips/include/asm/asmmacro.h
+++ b/arch/mips/include/asm/asmmacro.h
@@ -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