Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction.
@ 2019-03-04 22:00 Yifeng Li
  2019-03-11 18:14 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Yifeng Li @ 2019-03-04 22:00 UTC (permalink / raw)
  To: linux-mips
  Cc: Jiaxun Yang, Huacai Chen, Ralf Baechle, Paul Burton, James Hogan,
	linux-kernel, Yifeng Li

Timekeeping IRQs from CS5536 MFGPT are routed to i8259, which then
triggers the "cascade" IRQ on MIPS CPU. Without IRQF_NO_SUSPEND in
cascade_irqaction, MFGPT interrupts will be masked in suspend mode,
and the machine would be unable to resume once suspended.

Previously, MIPS IRQs were not disabled properly, so the original
code appeared to work. Commit a3e6c1eff5 (MIPS: IRQ: Fix disable_irq
on CPU IRQs) uncovers the bug. To fix it, add IRQF_NO_SUSPEND to
cascade_irqaction.

This commit is functionally identical to 0add9c2f1cff ("MIPS:
Loongson-3: Add IRQF_NO_SUSPEND to Cascade irqaction"), but it forgot
to apply the same fix to Loongson2.

Signed-off-by: Yifeng Li <tomli@tomli.me>
---
 arch/mips/loongson64/lemote-2f/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/loongson64/lemote-2f/irq.c b/arch/mips/loongson64/lemote-2f/irq.c
index 9e33e45aa17c..b213cecb8e3a 100644
--- a/arch/mips/loongson64/lemote-2f/irq.c
+++ b/arch/mips/loongson64/lemote-2f/irq.c
@@ -103,7 +103,7 @@ static struct irqaction ip6_irqaction = {
 static struct irqaction cascade_irqaction = {
 	.handler = no_action,
 	.name = "cascade",
-	.flags = IRQF_NO_THREAD,
+	.flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND,
 };
 
 void __init mach_init_irq(void)
-- 
2.20.1


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

* Re: [PATCH] mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade"  irqaction.
  2019-03-04 22:00 [PATCH] mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction Yifeng Li
@ 2019-03-11 18:14 ` Paul Burton
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Burton @ 2019-03-11 18:14 UTC (permalink / raw)
  To: Yifeng Li
  Cc: linux-mips, Jiaxun Yang, Huacai Chen, Ralf Baechle, Paul Burton,
	James Hogan, linux-kernel, Yifeng Li, linux-mips

Hello,

Yifeng Li wrote:
> Timekeeping IRQs from CS5536 MFGPT are routed to i8259, which then
> triggers the "cascade" IRQ on MIPS CPU. Without IRQF_NO_SUSPEND in
> cascade_irqaction, MFGPT interrupts will be masked in suspend mode,
> and the machine would be unable to resume once suspended.
> 
> Previously, MIPS IRQs were not disabled properly, so the original
> code appeared to work. Commit a3e6c1eff5 (MIPS: IRQ: Fix disable_irq
> on CPU IRQs) uncovers the bug. To fix it, add IRQF_NO_SUSPEND to
> cascade_irqaction.
> 
> This commit is functionally identical to 0add9c2f1cff ("MIPS:
> Loongson-3: Add IRQF_NO_SUSPEND to Cascade irqaction"), but it forgot
> to apply the same fix to Loongson2.
> 
> Signed-off-by: Yifeng Li <tomli@tomli.me>

Applied to mips-fixes.

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 22:00 [PATCH] mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction Yifeng Li
2019-03-11 18:14 ` Paul Burton

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git