[PATCH RESEND v4] reboot: support offline CPUs before reboot

Hsin-Yi Wang hsinyi at chromium.org
Thu Jan 16 20:20:56 PST 2020

On Fri, Jan 17, 2020 at 12:16 PM Rob Landley <rob at landley.net> wrote:
> On 1/14/20 5:06 AM, Hsin-Yi Wang wrote:
> > This patch adds a config ARCH_OFFLINE_CPUS_ON_REBOOT, which would offline cpus in
> > migrate_to_reboot_cpu(). If non reboot cpus are all offlined here, the loop for
> > checking online cpus would be an empty loop. If architecture don't enable this
> > config, or some cpus somehow fails to offline, it would fallback to ipi
> > function.
> I'm curious:
> > +# Select to do a full offline on secondary CPUs before reboot.
> > +     bool "Support for offline CPUs before reboot"
> > +     depends on HOTPLUG_CPU
> The new symbol can't be selected without the other symbol.
> And the other symbol automatically selects the new one.
> Why are you adding a second symbol that means the same thing as the existing symbol?

I should make the arch selecting this symbol in other patches and let
the arch decides if they want to opt in, as Thomas pointed out in v5:

Current solution is not sufficient since it only solve problems for
system that enables HOTPLUG_CPU.

> > +extern int freeze_secondary_cpus(int primary, bool reboot);
> > +#endif
> Couldn't that just test HOTPLUG_CPU? What's the second symbol for? (You can have
> empty stub functions when architectures don't support a thing...)
> Rob

More information about the linux-arm-kernel mailing list