Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 for non-mipsr2 cpus")

Fixes: ba9196d2e005 ("MIPS: Make DIEI support as a config option")
Signed-off-by: Huang Pei <huangpei@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

Huang Pei and committed by
Thomas Bogendoerfer
05c4e272 2132ce5d

+1 -2
+1 -2
arch/mips/include/asm/asmmacro.h
··· 44 44 .endm 45 45 #endif 46 46 47 - #if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_MIPSR5) || \ 48 - defined(CONFIG_CPU_MIPSR6) 47 + #ifdef CONFIG_CPU_HAS_DIEI 49 48 .macro local_irq_enable reg=t0 50 49 ei 51 50 irq_enable_hazard