[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120825103257.GN31998@S2101-09.ap.freescale.net>
Date: Sat, 25 Aug 2012 18:33:01 +0800
From: Shawn Guo <shawn.guo@...aro.org>
To: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: Bill Huang <bilhuang@...dia.com>,
"'linux-tegra@...r.kernel.org'" <linux-tegra@...r.kernel.org>,
"'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
"'linux-arm-kernel@...ts.infradead.org'"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: Shutdown problem in SMP system happened on Tegra20
On Sat, Aug 25, 2012 at 08:52:21AM +0100, Russell King - ARM Linux wrote:
> On Sat, Aug 25, 2012 at 03:36:27PM +0800, Shawn Guo wrote:
> > On Fri, Aug 24, 2012 at 07:21:33PM +0100, Russell King - ARM Linux wrote:
> > > Why not just ensure that CONFIG_PM_SLEEP_SMP is enabled if your platform
> > > requires that the lowest CPU number be the CPU dealing with reboot?
> >
> > I have CONFIG_PM_SLEEP_SMP enabled for imx6q, but still see the imx6q
> > restart hook running on cpu1 than cpu0. It seems that
> > disable_nonboot_cpus is only called in kernel_power_off but never
> > kernel_restart. We should probably patch kernel_restart or
> > machine_restart to have disable_nonboot_cpus called?
>
> Remember that this path gets called from IRQ context which makes calling
> functions which sleep very dodgy.
I'm so familiar with the code/context. Are you saying disable_nonboot_cpus
sleeps and kernel_power_off never gets called from IRQ context?
I tested the code change below on kernel_restart with
CONFIG_DEBUG_ATOMIC_SLEEP enabled. It fixes imx6q restart issue (with
no change on cpu_relax) while no sleep-inside-atomic-section warning
is seen.
Regards,
Shawn
diff --git a/kernel/sys.c b/kernel/sys.c
index 241507f..0359328 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -373,6 +373,7 @@ void kernel_restart(char *cmd)
else
printk(KERN_EMERG "Restarting system with command '%s'.\n", cmd);
kmsg_dump(KMSG_DUMP_RESTART);
+ disable_nonboot_cpus();
machine_restart(cmd);
}
EXPORT_SYMBOL_GPL(kernel_restart);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists