[PATCH] ARM: decouple CPU offlining from reboot/shutdown

Stephen Warren swarren at wwwdotorg.org
Wed Jun 12 14:15:11 EDT 2013


On 06/12/2013 12:09 PM, Russell King - ARM Linux wrote:
> On Tue, Jun 11, 2013 at 07:29:27PM +0100, Will Deacon wrote:
>> Yes. Usually this is a path of no return, but if we detect an error before
>> we've changed stack then I think we should at least try to propogate the
>> error.
> 
> Except, if you make soft_restart able to return an error, then you really
> need machine_restart() to do the same, but that's a cross-arch function.

I was tempted to just printk and make them return. It looks like kexec
will just return back out of its call path without issue.

I suppose adjusting the function signature of machine_kexec() to
propagate an error code back would be useful, and probably wouldn't be
too much churn.

> And what do you do when you hit a soft-watchdog event and it calls
> machine_restart(), which then decides to fail?  Or a panic event and
> machine_restart() fails?

Well, if you're using soft_restart with SMP, those case already don't
work, right?



More information about the linux-arm-kernel mailing list