Thread (5 messages) 5 messages, 4 authors, 2020-01-17

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

From: Rob Landley <hidden>
Date: 2020-01-17 04:16:33
Also in: linux-mips, linux-pm, linux-s390, linux-sh, linuxppc-dev, lkml, sparclinux

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.
+config ARCH_OFFLINE_CPUS_ON_REBOOT
+	bool "Support for offline CPUs before reboot"
+	depends on HOTPLUG_CPU
The new symbol can't be selected without the other symbol.
+	select ARCH_OFFLINE_CPUS_ON_REBOOT if HOTPLUG_CPU
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?
+#if defined(CONFIG_PM_SLEEP_SMP) || defined(CONFIG_ARCH_OFFLINE_CPUS_ON_REBOOT)
+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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help