[PATCH] ARM: Temporary fix for broken arch reboot

Shilimkar, Santosh santosh.shilimkar at ti.com
Fri Nov 12 05:31:25 EST 2010


> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
> Sent: Wednesday, November 10, 2010 9:16 PM
> To: Shilimkar, Santosh
> Cc: Catalin Marinas; linux-arm-kernel at lists.infradead.org; Gadiyar, Anand
> Subject: Re: [PATCH] ARM: Temporary fix for broken arch reboot
> 
> On Wed, Nov 10, 2010 at 09:13:21PM +0530, Shilimkar, Santosh wrote:
> >
> >
> > > -----Original Message-----
> > > From: Catalin Marinas [mailto:catalin.marinas at arm.com]
> > > Sent: Wednesday, November 10, 2010 7:35 PM
> > > To: Russell King - ARM Linux
> > > Cc: Shilimkar, Santosh; linux-arm-kernel at lists.infradead.org; Gadiyar,
> > > Anand
> > > Subject: Re: [PATCH] ARM: Temporary fix for broken arch reboot
> > >
> > > The printing only happens for SYSTEM_BOOTING or SYSTEM_RUNNING. I
> > > suspect in this case we have SYSTEM_RESTARTING and the condition in
> > > ipi_cpu_stop() is false, therefore no printing. It may be worth
> putting
> > > some printks outside the 'if' to see whether the secondary CPUs get
> > > there.
> > >
> > While doing some experiments on this issue, one interesting
> > observation I made. Looks like there is race between two
> > Cores which makes system behave badly in reboot path.
> >
> > Just adding a delay in the ipi_cpu_stop() makes the reboot work
> > as well
> 
> That could just be that it's taking longer than 500us for the reboot CPU
> to get through setup_mm_for_reboot().

It not seems to be the case otherwise below patch should have worked.
Right ? Did I miss your point ?

diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index e76fcaa..c3ae1d6 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -103,6 +103,8 @@ void arm_machine_restart(char mode, const char *cmd)
         * soft boot works.
         */
        setup_mm_for_reboot(mode);
+
+       machine_shutdown();

        /* Clean and invalidate caches */
        flush_cache_all();
@@ -247,7 +249,6 @@ void machine_power_off(void)

 void machine_restart(char *cmd)
 {
-       machine_shutdown();
        arm_pm_restart(reboot_mode, cmd);
 }




More information about the linux-arm-kernel mailing list