All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: fix local_irq_{disable,enable} in asmmacro.h
@ 2021-03-23  2:34 Huang Pei
  2021-03-24 10:04 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 2+ messages in thread
From: Huang Pei @ 2021-03-23  2:34 UTC (permalink / raw
  To: Thomas Bogendoerfer, ambrosehua
  Cc: Bibo Mao, linux-mips, linux-arch, Jiaxun Yang, Paul Burton,
	Li Xuefeng, Yang Tiezhu, Gao Juxin, Huacai Chen, Jinyang He

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(-)

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
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: fix local_irq_{disable,enable} in asmmacro.h
  2021-03-23  2:34 [PATCH] MIPS: fix local_irq_{disable,enable} in asmmacro.h Huang Pei
@ 2021-03-24 10:04 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-03-24 10:04 UTC (permalink / raw
  To: Huang Pei
  Cc: ambrosehua, Bibo Mao, linux-mips, linux-arch, Jiaxun Yang,
	Paul Burton, Li Xuefeng, Yang Tiezhu, Gao Juxin, Huacai Chen,
	Jinyang He

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.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-24 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-23  2:34 [PATCH] MIPS: fix local_irq_{disable,enable} in asmmacro.h Huang Pei
2021-03-24 10:04 ` Thomas Bogendoerfer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.