]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/mips-loongson64-lemote-2f-add-irqf_no_suspend-to-cascade-irqaction.patch
4.4-stable patches
[thirdparty/kernel/stable-queue.git] / queue-4.4 / mips-loongson64-lemote-2f-add-irqf_no_suspend-to-cascade-irqaction.patch
1 From 5f5f67da9781770df0403269bc57d7aae608fecd Mon Sep 17 00:00:00 2001
2 From: Yifeng Li <tomli@tomli.me>
3 Date: Tue, 5 Mar 2019 06:00:22 +0800
4 Subject: mips: loongson64: lemote-2f: Add IRQF_NO_SUSPEND to "cascade" irqaction.
5
6 From: Yifeng Li <tomli@tomli.me>
7
8 commit 5f5f67da9781770df0403269bc57d7aae608fecd upstream.
9
10 Timekeeping IRQs from CS5536 MFGPT are routed to i8259, which then
11 triggers the "cascade" IRQ on MIPS CPU. Without IRQF_NO_SUSPEND in
12 cascade_irqaction, MFGPT interrupts will be masked in suspend mode,
13 and the machine would be unable to resume once suspended.
14
15 Previously, MIPS IRQs were not disabled properly, so the original
16 code appeared to work. Commit a3e6c1eff5 ("MIPS: IRQ: Fix disable_irq on
17 CPU IRQs") uncovers the bug. To fix it, add IRQF_NO_SUSPEND to
18 cascade_irqaction.
19
20 This commit is functionally identical to 0add9c2f1cff ("MIPS:
21 Loongson-3: Add IRQF_NO_SUSPEND to Cascade irqaction"), but it forgot
22 to apply the same fix to Loongson2.
23
24 Signed-off-by: Yifeng Li <tomli@tomli.me>
25 Signed-off-by: Paul Burton <paul.burton@mips.com>
26 Cc: linux-mips@vger.kernel.org
27 Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
28 Cc: Huacai Chen <chenhc@lemote.com>
29 Cc: Ralf Baechle <ralf@linux-mips.org>
30 Cc: James Hogan <jhogan@kernel.org>
31 Cc: linux-kernel@vger.kernel.org
32 Cc: stable@vger.kernel.org # v3.19+
33 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
34
35 ---
36 arch/mips/loongson64/lemote-2f/irq.c | 2 +-
37 1 file changed, 1 insertion(+), 1 deletion(-)
38
39 --- a/arch/mips/loongson64/lemote-2f/irq.c
40 +++ b/arch/mips/loongson64/lemote-2f/irq.c
41 @@ -102,7 +102,7 @@ static struct irqaction ip6_irqaction =
42 static struct irqaction cascade_irqaction = {
43 .handler = no_action,
44 .name = "cascade",
45 - .flags = IRQF_NO_THREAD,
46 + .flags = IRQF_NO_THREAD | IRQF_NO_SUSPEND,
47 };
48
49 void __init mach_init_irq(void)