]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.15.10/mips-bmips-do-not-mask-ipis-during-suspend.patch
Fix up backported ptrace patch
[thirdparty/kernel/stable-queue.git] / releases / 4.15.10 / mips-bmips-do-not-mask-ipis-during-suspend.patch
1 From 06a3f0c9f2725f5d7c63c4203839373c9bd00c28 Mon Sep 17 00:00:00 2001
2 From: Justin Chen <justinpopo6@gmail.com>
3 Date: Wed, 27 Sep 2017 17:15:15 -0700
4 Subject: MIPS: BMIPS: Do not mask IPIs during suspend
5
6 From: Justin Chen <justinpopo6@gmail.com>
7
8 commit 06a3f0c9f2725f5d7c63c4203839373c9bd00c28 upstream.
9
10 Commit a3e6c1eff548 ("MIPS: IRQ: Fix disable_irq on CPU IRQs") fixes an
11 issue where disable_irq did not actually disable the irq. The bug caused
12 our IPIs to not be disabled, which actually is the correct behavior.
13
14 With the addition of commit a3e6c1eff548 ("MIPS: IRQ: Fix disable_irq on
15 CPU IRQs"), the IPIs were getting disabled going into suspend, thus
16 schedule_ipi() was not being called. This caused deadlocks where
17 schedulable task were not being scheduled and other cpus were waiting
18 for them to do something.
19
20 Add the IRQF_NO_SUSPEND flag so an irq_disable will not be called on the
21 IPIs during suspend.
22
23 Signed-off-by: Justin Chen <justinpopo6@gmail.com>
24 Fixes: a3e6c1eff548 ("MIPS: IRQ: Fix disabled_irq on CPU IRQs")
25 Cc: Florian Fainelli <f.fainelli@gmail.com>
26 Cc: linux-mips@linux-mips.org
27 Cc: stable@vger.kernel.org
28 Patchwork: https://patchwork.linux-mips.org/patch/17385/
29 [jhogan@kernel.org: checkpatch: wrap long lines and fix commit refs]
30 Signed-off-by: James Hogan <jhogan@kernel.org>
31 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32
33 ---
34 arch/mips/kernel/smp-bmips.c | 8 ++++----
35 1 file changed, 4 insertions(+), 4 deletions(-)
36
37 --- a/arch/mips/kernel/smp-bmips.c
38 +++ b/arch/mips/kernel/smp-bmips.c
39 @@ -168,11 +168,11 @@ static void bmips_prepare_cpus(unsigned
40 return;
41 }
42
43 - if (request_irq(IPI0_IRQ, bmips_ipi_interrupt, IRQF_PERCPU,
44 - "smp_ipi0", NULL))
45 + if (request_irq(IPI0_IRQ, bmips_ipi_interrupt,
46 + IRQF_PERCPU | IRQF_NO_SUSPEND, "smp_ipi0", NULL))
47 panic("Can't request IPI0 interrupt");
48 - if (request_irq(IPI1_IRQ, bmips_ipi_interrupt, IRQF_PERCPU,
49 - "smp_ipi1", NULL))
50 + if (request_irq(IPI1_IRQ, bmips_ipi_interrupt,
51 + IRQF_PERCPU | IRQF_NO_SUSPEND, "smp_ipi1", NULL))
52 panic("Can't request IPI1 interrupt");
53 }
54