diff mbox

powerpc/smp: Do not disable IPI interrupts during suspend

Message ID 1342788421-27648-1-git-send-email-chenhui.zhao@freescale.com (mailing list archive)
State Accepted, archived
Delegated to: Kumar Gala
Headers show

Commit Message

chenhui zhao July 20, 2012, 12:47 p.m. UTC
During suspend, all interrupts including IPI will be disabled. In this case,
the suspend process will hang in SMP. To prevent this, pass the flag
IRQF_NO_SUSPEND when requesting IPI irq.

Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
---
 arch/powerpc/kernel/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kumar Gala July 27, 2012, 9:58 p.m. UTC | #1
On Jul 20, 2012, at 7:47 AM, Zhao Chenhui wrote:

> During suspend, all interrupts including IPI will be disabled. In this case,
> the suspend process will hang in SMP. To prevent this, pass the flag
> IRQF_NO_SUSPEND when requesting IPI irq.
> 
> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> arch/powerpc/kernel/smp.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

BenH,

Can you ack?

- k

> 
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index fecb038..d26bbf8 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -171,7 +171,7 @@ int smp_request_message_ipi(int virq, int msg)
> 	}
> #endif
> 	err = request_irq(virq, smp_ipi_action[msg],
> -			  IRQF_PERCPU | IRQF_NO_THREAD,
> +			  IRQF_PERCPU | IRQF_NO_THREAD | IRQF_NO_SUSPEND,
> 			  smp_ipi_name[msg], 0);
> 	WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n",
> 		virq, smp_ipi_name[msg], err);
> -- 
> 1.6.4.1
>
Benjamin Herrenschmidt July 27, 2012, 10:20 p.m. UTC | #2
On Fri, 2012-07-27 at 16:58 -0500, Kumar Gala wrote:
> On Jul 20, 2012, at 7:47 AM, Zhao Chenhui wrote:
> 
> > During suspend, all interrupts including IPI will be disabled. In this case,
> > the suspend process will hang in SMP. To prevent this, pass the flag
> > IRQF_NO_SUSPEND when requesting IPI irq.
> > 
> > Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
> > Signed-off-by: Li Yang <leoli@freescale.com>
> > ---
> > arch/powerpc/kernel/smp.c |    2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> BenH,
> 
> Can you ack?

No I'll merge it but not until it's been in next for a bit unless you
have some strong emergency there, it's on my mental list of things to
shovel into next after rc1.

Curiosity: didn't we use to disable all non-boot CPUs on suspend ?

Cheers,
Ben.

> - k
> 
> > 
> > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> > index fecb038..d26bbf8 100644
> > --- a/arch/powerpc/kernel/smp.c
> > +++ b/arch/powerpc/kernel/smp.c
> > @@ -171,7 +171,7 @@ int smp_request_message_ipi(int virq, int msg)
> > 	}
> > #endif
> > 	err = request_irq(virq, smp_ipi_action[msg],
> > -			  IRQF_PERCPU | IRQF_NO_THREAD,
> > +			  IRQF_PERCPU | IRQF_NO_THREAD | IRQF_NO_SUSPEND,
> > 			  smp_ipi_name[msg], 0);
> > 	WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n",
> > 		virq, smp_ipi_name[msg], err);
> > -- 
> > 1.6.4.1
> >
Kumar Gala July 28, 2012, 2:03 p.m. UTC | #3
On Jul 27, 2012, at 5:20 PM, Benjamin Herrenschmidt wrote:

> On Fri, 2012-07-27 at 16:58 -0500, Kumar Gala wrote:
>> On Jul 20, 2012, at 7:47 AM, Zhao Chenhui wrote:
>> 
>>> During suspend, all interrupts including IPI will be disabled. In this case,
>>> the suspend process will hang in SMP. To prevent this, pass the flag
>>> IRQF_NO_SUSPEND when requesting IPI irq.
>>> 
>>> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
>>> Signed-off-by: Li Yang <leoli@freescale.com>
>>> ---
>>> arch/powerpc/kernel/smp.c |    2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> BenH,
>> 
>> Can you ack?
> 
> No I'll merge it but not until it's been in next for a bit unless you
> have some strong emergency there, it's on my mental list of things to
> shovel into next after rc1.

I wasn't clear, I was meaning for my 'next' tree, not 3.6.  Trying to get these FSL PM patches into my 'next' for 3.7.

- k

> Curiosity: didn't we use to disable all non-boot CPUs on suspend ?
> 
> Cheers,
> Ben.
> 
>> - k
>> 
>>> 
>>> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
>>> index fecb038..d26bbf8 100644
>>> --- a/arch/powerpc/kernel/smp.c
>>> +++ b/arch/powerpc/kernel/smp.c
>>> @@ -171,7 +171,7 @@ int smp_request_message_ipi(int virq, int msg)
>>> 	}
>>> #endif
>>> 	err = request_irq(virq, smp_ipi_action[msg],
>>> -			  IRQF_PERCPU | IRQF_NO_THREAD,
>>> +			  IRQF_PERCPU | IRQF_NO_THREAD | IRQF_NO_SUSPEND,
>>> 			  smp_ipi_name[msg], 0);
>>> 	WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n",
>>> 		virq, smp_ipi_name[msg], err);
>>> -- 
>>> 1.6.4.1
>>> 
>
chenhui zhao Aug. 2, 2012, 10:04 a.m. UTC | #4
On Sat, Jul 28, 2012 at 08:20:31AM +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2012-07-27 at 16:58 -0500, Kumar Gala wrote:
> > On Jul 20, 2012, at 7:47 AM, Zhao Chenhui wrote:
> > 
> > > During suspend, all interrupts including IPI will be disabled. In this case,
> > > the suspend process will hang in SMP. To prevent this, pass the flag
> > > IRQF_NO_SUSPEND when requesting IPI irq.
> > > 
> > > Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
> > > Signed-off-by: Li Yang <leoli@freescale.com>
> > > ---
> > > arch/powerpc/kernel/smp.c |    2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > BenH,
> > 
> > Can you ack?
> 
> No I'll merge it but not until it's been in next for a bit unless you
> have some strong emergency there, it's on my mental list of things to
> shovel into next after rc1.
> 
> Curiosity: didn't we use to disable all non-boot CPUs on suspend ?
> 
> Cheers,
> Ben.

Yes, we disabled all non-boot CPUs on suspend by calling disable_nonboot_cpus().
The disable_nonboot_cpus() needs IPIs to work. But prior to
calling disable_nonboot_cpus(), the IPIs are disabled in dpm_suspend_noirq().

-Chenhui
Kumar Gala Aug. 10, 2012, 12:40 p.m. UTC | #5
On Aug 2, 2012, at 5:04 AM, Zhao Chenhui wrote:

> On Sat, Jul 28, 2012 at 08:20:31AM +1000, Benjamin Herrenschmidt wrote:
>> On Fri, 2012-07-27 at 16:58 -0500, Kumar Gala wrote:
>>> On Jul 20, 2012, at 7:47 AM, Zhao Chenhui wrote:
>>> 
>>>> During suspend, all interrupts including IPI will be disabled. In this case,
>>>> the suspend process will hang in SMP. To prevent this, pass the flag
>>>> IRQF_NO_SUSPEND when requesting IPI irq.
>>>> 
>>>> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
>>>> Signed-off-by: Li Yang <leoli@freescale.com>
>>>> ---
>>>> arch/powerpc/kernel/smp.c |    2 +-
>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>> 
>>> BenH,
>>> 
>>> Can you ack?
>> 
>> No I'll merge it but not until it's been in next for a bit unless you
>> have some strong emergency there, it's on my mental list of things to
>> shovel into next after rc1.
>> 
>> Curiosity: didn't we use to disable all non-boot CPUs on suspend ?
>> 
>> Cheers,
>> Ben.
> 
> Yes, we disabled all non-boot CPUs on suspend by calling disable_nonboot_cpus().
> The disable_nonboot_cpus() needs IPIs to work. But prior to
> calling disable_nonboot_cpus(), the IPIs are disabled in dpm_suspend_noirq().
> 
> -Chenhui

Benh, Ack?

- k
Kumar Gala Sept. 13, 2012, 6:16 p.m. UTC | #6
On Aug 10, 2012, at 7:40 AM, Kumar Gala wrote:

> 
> On Aug 2, 2012, at 5:04 AM, Zhao Chenhui wrote:
> 
>> On Sat, Jul 28, 2012 at 08:20:31AM +1000, Benjamin Herrenschmidt wrote:
>>> On Fri, 2012-07-27 at 16:58 -0500, Kumar Gala wrote:
>>>> On Jul 20, 2012, at 7:47 AM, Zhao Chenhui wrote:
>>>> 
>>>>> During suspend, all interrupts including IPI will be disabled. In this case,
>>>>> the suspend process will hang in SMP. To prevent this, pass the flag
>>>>> IRQF_NO_SUSPEND when requesting IPI irq.
>>>>> 
>>>>> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
>>>>> Signed-off-by: Li Yang <leoli@freescale.com>
>>>>> ---
>>>>> arch/powerpc/kernel/smp.c |    2 +-
>>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>> 
>>>> BenH,
>>>> 
>>>> Can you ack?
>>> 
>>> No I'll merge it but not until it's been in next for a bit unless you
>>> have some strong emergency there, it's on my mental list of things to
>>> shovel into next after rc1.
>>> 
>>> Curiosity: didn't we use to disable all non-boot CPUs on suspend ?
>>> 
>>> Cheers,
>>> Ben.
>> 
>> Yes, we disabled all non-boot CPUs on suspend by calling disable_nonboot_cpus().
>> The disable_nonboot_cpus() needs IPIs to work. But prior to
>> calling disable_nonboot_cpus(), the IPIs are disabled in dpm_suspend_noirq().
>> 
>> -Chenhui
> 
> Benh, Ack?

Ben?

- k
Benjamin Herrenschmidt Sept. 13, 2012, 10:11 p.m. UTC | #7
On Thu, 2012-09-13 at 13:16 -0500, Kumar Gala wrote:
> >> Yes, we disabled all non-boot CPUs on suspend by calling
> disable_nonboot_cpus().
> >> The disable_nonboot_cpus() needs IPIs to work. But prior to
> >> calling disable_nonboot_cpus(), the IPIs are disabled in
> dpm_suspend_noirq().

Sure, no biggie on this one, forgot to ack it, just stick my ack in and
put it in your tree.

Cheers,
Ben.
Kumar Gala Sept. 19, 2012, 2:52 p.m. UTC | #8
On Jul 20, 2012, at 7:47 AM, Zhao Chenhui wrote:

> During suspend, all interrupts including IPI will be disabled. In this case,
> the suspend process will hang in SMP. To prevent this, pass the flag
> IRQF_NO_SUSPEND when requesting IPI irq.
> 
> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> arch/powerpc/kernel/smp.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

applied to next

- k
diff mbox

Patch

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index fecb038..d26bbf8 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -171,7 +171,7 @@  int smp_request_message_ipi(int virq, int msg)
 	}
 #endif
 	err = request_irq(virq, smp_ipi_action[msg],
-			  IRQF_PERCPU | IRQF_NO_THREAD,
+			  IRQF_PERCPU | IRQF_NO_THREAD | IRQF_NO_SUSPEND,
 			  smp_ipi_name[msg], 0);
 	WARN(err < 0, "unable to request_irq %d for %s (rc %d)\n",
 		virq, smp_ipi_name[msg], err);