* [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case
@ 2013-06-12 11:30 Shawn Guo
2013-06-12 15:17 ` Catalin Marinas
0 siblings, 1 reply; 8+ messages in thread
From: Shawn Guo @ 2013-06-12 11:30 UTC (permalink / raw)
To: linux-arm-kernel
Commit c011470 (irqchip: gic: Perform the gic_secondary_init() call via
CPU notifier) moves gic_secondary_init() that used to be called in
.smp_secondary_init hook into a notifier call. But it changes the
system behavior a little bit. Before the commit, gic_cpu_init()
is called not only when kernel brings up the secondary cores but also
when system resuming procedure hot-plugs the cores back to kernel.
While after the commit, the function will not be called in the latter
case, where the 'action' will not be CPU_STARTING but
CPU_STARTING_FROZEN. This behavior difference at least causes the
following suspend/resume regression on imx6q.
$ echo mem > /sys/power/state
PM: Syncing filesystems ... done.
PM: Preparing system for mem sleep
mmc1: card e624 removed
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
PM: Entering mem sleep
PM: suspend of devices complete after 5.930 msecs
PM: suspend devices took 0.010 seconds
PM: late suspend of devices complete after 0.343 msecs
PM: noirq suspend of devices complete after 0.828 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
CPU2: shutdown
CPU3: shutdown
Enabling non-boot CPUs ...
CPU1: Booted secondary processor
INFO: rcu_sched detected stalls on CPUs/tasks: { 1 2 3} (detected by 0, t=2102 jiffies, g=4294967169, c=4294967168, q=17)
Task dump for CPU 1:
swapper/1 R running 0 0 1 0x00000000
Backtrace:
[<bf895ff4>] (0xbf895ff4) from [<00000000>] ( (null))
Backtrace aborted due to bad frame pointer <8007ccdc>
Task dump for CPU 2:
swapper/2 R running 0 0 1 0x00000000
Backtrace:
[<8075dbdc>] (0x8075dbdc) from [<00000000>] ( (null))
Backtrace aborted due to bad frame pointer <00000002>
Task dump for CPU 3:
swapper/3 R running 0 0 1 0x00000000
Backtrace:
[<8075dbdc>] (0x8075dbdc) from [<00000000>] ( (null))
Fix the regression by checking 'action' being CPU_STARTING_FROZEN to
have gic_cpu_init() called for secondary cores when system resumes.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/irqchip/irq-gic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 1760ceb..19ceaa6 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -705,7 +705,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
static int __cpuinit gic_secondary_init(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
- if (action == CPU_STARTING)
+ if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
gic_cpu_init(&gic_data[0]);
return NOTIFY_OK;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case 2013-06-12 11:30 [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case Shawn Guo @ 2013-06-12 15:17 ` Catalin Marinas 2013-06-14 12:33 ` Shawn Guo 0 siblings, 1 reply; 8+ messages in thread From: Catalin Marinas @ 2013-06-12 15:17 UTC (permalink / raw) To: linux-arm-kernel On Wed, Jun 12, 2013 at 12:30:27PM +0100, Shawn Guo wrote: > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > index 1760ceb..19ceaa6 100644 > --- a/drivers/irqchip/irq-gic.c > +++ b/drivers/irqchip/irq-gic.c > @@ -705,7 +705,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d, > static int __cpuinit gic_secondary_init(struct notifier_block *nfb, > unsigned long action, void *hcpu) > { > - if (action == CPU_STARTING) > + if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) > gic_cpu_init(&gic_data[0]); > return NOTIFY_OK; > } Acked-by: Catalin Marinas <catalin.marinas@arm.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case 2013-06-12 15:17 ` Catalin Marinas @ 2013-06-14 12:33 ` Shawn Guo 2013-06-19 7:02 ` Shawn Guo 0 siblings, 1 reply; 8+ messages in thread From: Shawn Guo @ 2013-06-14 12:33 UTC (permalink / raw) To: linux-arm-kernel On Wed, Jun 12, 2013 at 04:17:49PM +0100, Catalin Marinas wrote: > On Wed, Jun 12, 2013 at 12:30:27PM +0100, Shawn Guo wrote: > > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > > index 1760ceb..19ceaa6 100644 > > --- a/drivers/irqchip/irq-gic.c > > +++ b/drivers/irqchip/irq-gic.c > > @@ -705,7 +705,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d, > > static int __cpuinit gic_secondary_init(struct notifier_block *nfb, > > unsigned long action, void *hcpu) > > { > > - if (action == CPU_STARTING) > > + if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) > > gic_cpu_init(&gic_data[0]); > > return NOTIFY_OK; > > } > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> Thomas, Can you please send the fix for 3.10? Or are you fine with that I ask arm-soc folks to send it? Shawn ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case 2013-06-14 12:33 ` Shawn Guo @ 2013-06-19 7:02 ` Shawn Guo [not found] ` <20130619070253.GA3405-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Shawn Guo @ 2013-06-19 7:02 UTC (permalink / raw) To: linux-arm-kernel On Fri, Jun 14, 2013 at 08:33:59PM +0800, Shawn Guo wrote: > On Wed, Jun 12, 2013 at 04:17:49PM +0100, Catalin Marinas wrote: > > On Wed, Jun 12, 2013 at 12:30:27PM +0100, Shawn Guo wrote: > > > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > > > index 1760ceb..19ceaa6 100644 > > > --- a/drivers/irqchip/irq-gic.c > > > +++ b/drivers/irqchip/irq-gic.c > > > @@ -705,7 +705,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d, > > > static int __cpuinit gic_secondary_init(struct notifier_block *nfb, > > > unsigned long action, void *hcpu) > > > { > > > - if (action == CPU_STARTING) > > > + if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) > > > gic_cpu_init(&gic_data[0]); > > > return NOTIFY_OK; > > > } > > > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> > > Thomas, > > Can you please send the fix for 3.10? Or are you fine with that I ask > arm-soc folks to send it? Arnd, Olof, Can you help send the fix for 3.10? Shawn ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20130619070253.GA3405-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>]
* Re: [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case 2013-06-19 7:02 ` Shawn Guo @ 2013-06-20 2:09 ` Joseph Lo 0 siblings, 0 replies; 8+ messages in thread From: Joseph Lo @ 2013-06-20 2:09 UTC (permalink / raw) To: Shawn Guo Cc: arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Catalin Marinas, Thomas Gleixner, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA On Wed, 2013-06-19 at 15:02 +0800, Shawn Guo wrote: > On Fri, Jun 14, 2013 at 08:33:59PM +0800, Shawn Guo wrote: > > On Wed, Jun 12, 2013 at 04:17:49PM +0100, Catalin Marinas wrote: > > > On Wed, Jun 12, 2013 at 12:30:27PM +0100, Shawn Guo wrote: > > > > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > > > > index 1760ceb..19ceaa6 100644 > > > > --- a/drivers/irqchip/irq-gic.c > > > > +++ b/drivers/irqchip/irq-gic.c > > > > @@ -705,7 +705,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d, > > > > static int __cpuinit gic_secondary_init(struct notifier_block *nfb, > > > > unsigned long action, void *hcpu) > > > > { > > > > - if (action == CPU_STARTING) > > > > + if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) > > > > gic_cpu_init(&gic_data[0]); > > > > return NOTIFY_OK; > > > > } > > > > > > Acked-by: Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org> > > > > Thomas, > > > > Can you please send the fix for 3.10? Or are you fine with that I ask > > arm-soc folks to send it? > > Arnd, Olof, > > Can you help send the fix for 3.10? > The commit c011470 also break suspend/resume for Tegra platform on all 3.10-rcX. > Commit c011470 (irqchip: gic: Perform the gic_secondary_init() call via > CPU notifier) moves gic_secondary_init() that used to be called in > .smp_secondary_init hook into a notifier call. But it changes the > system behavior a little bit. Before the commit, gic_cpu_init() > is called not only when kernel brings up the secondary cores but also > when system resuming procedure hot-plugs the cores back to kernel. > While after the commit, the function will not be called in the latter > case, where the 'action' will not be CPU_STARTING but > CPU_STARTING_FROZEN. This behavior difference at least causes the > following suspend/resume regression on imx6q. > Shawn's patch fix the suspend/resume regression for Tegra also. Tested-by: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Thanks, Joseph ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case @ 2013-06-20 2:09 ` Joseph Lo 0 siblings, 0 replies; 8+ messages in thread From: Joseph Lo @ 2013-06-20 2:09 UTC (permalink / raw) To: linux-arm-kernel On Wed, 2013-06-19 at 15:02 +0800, Shawn Guo wrote: > On Fri, Jun 14, 2013 at 08:33:59PM +0800, Shawn Guo wrote: > > On Wed, Jun 12, 2013 at 04:17:49PM +0100, Catalin Marinas wrote: > > > On Wed, Jun 12, 2013 at 12:30:27PM +0100, Shawn Guo wrote: > > > > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > > > > index 1760ceb..19ceaa6 100644 > > > > --- a/drivers/irqchip/irq-gic.c > > > > +++ b/drivers/irqchip/irq-gic.c > > > > @@ -705,7 +705,7 @@ static int gic_irq_domain_xlate(struct irq_domain *d, > > > > static int __cpuinit gic_secondary_init(struct notifier_block *nfb, > > > > unsigned long action, void *hcpu) > > > > { > > > > - if (action == CPU_STARTING) > > > > + if (action == CPU_STARTING || action == CPU_STARTING_FROZEN) > > > > gic_cpu_init(&gic_data[0]); > > > > return NOTIFY_OK; > > > > } > > > > > > Acked-by: Catalin Marinas <catalin.marinas@arm.com> > > > > Thomas, > > > > Can you please send the fix for 3.10? Or are you fine with that I ask > > arm-soc folks to send it? > > Arnd, Olof, > > Can you help send the fix for 3.10? > The commit c011470 also break suspend/resume for Tegra platform on all 3.10-rcX. > Commit c011470 (irqchip: gic: Perform the gic_secondary_init() call via > CPU notifier) moves gic_secondary_init() that used to be called in > .smp_secondary_init hook into a notifier call. But it changes the > system behavior a little bit. Before the commit, gic_cpu_init() > is called not only when kernel brings up the secondary cores but also > when system resuming procedure hot-plugs the cores back to kernel. > While after the commit, the function will not be called in the latter > case, where the 'action' will not be CPU_STARTING but > CPU_STARTING_FROZEN. This behavior difference at least causes the > following suspend/resume regression on imx6q. > Shawn's patch fix the suspend/resume regression for Tegra also. Tested-by: Joseph Lo <josephl@nvidia.com> Thanks, Joseph ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1371694169.2155.12.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>]
* Re: [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case 2013-06-20 2:09 ` Joseph Lo @ 2013-06-20 12:52 ` Arnd Bergmann -1 siblings, 0 replies; 8+ messages in thread From: Arnd Bergmann @ 2013-06-20 12:52 UTC (permalink / raw) To: Joseph Lo Cc: Shawn Guo, arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Catalin Marinas, Thomas Gleixner, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA On Thursday 20 June 2013, Joseph Lo wrote: > > > > > > Can you please send the fix for 3.10? Or are you fine with that I ask > > > arm-soc folks to send it? > > > > Arnd, Olof, > > > > Can you help send the fix for 3.10? > > > Shawn's patch fix the suspend/resume regression for Tegra also. > > Tested-by: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Applied to fixes branch. Arnd ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case @ 2013-06-20 12:52 ` Arnd Bergmann 0 siblings, 0 replies; 8+ messages in thread From: Arnd Bergmann @ 2013-06-20 12:52 UTC (permalink / raw) To: linux-arm-kernel On Thursday 20 June 2013, Joseph Lo wrote: > > > > > > Can you please send the fix for 3.10? Or are you fine with that I ask > > > arm-soc folks to send it? > > > > Arnd, Olof, > > > > Can you help send the fix for 3.10? > > > Shawn's patch fix the suspend/resume regression for Tegra also. > > Tested-by: Joseph Lo <josephl@nvidia.com> Applied to fixes branch. Arnd ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-06-20 12:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-12 11:30 [PATCH] irqchip: gic: call gic_cpu_init() as well in CPU_STARTING_FROZEN case Shawn Guo
2013-06-12 15:17 ` Catalin Marinas
2013-06-14 12:33 ` Shawn Guo
2013-06-19 7:02 ` Shawn Guo
[not found] ` <20130619070253.GA3405-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-06-20 2:09 ` Joseph Lo
2013-06-20 2:09 ` Joseph Lo
[not found] ` <1371694169.2155.12.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-06-20 12:52 ` Arnd Bergmann
2013-06-20 12:52 ` Arnd Bergmann
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.