cpu/hotplug: Non-SMP machines do not make use of booted_once
authorAbel Vesa <abelvesa@linux.com>
Tue, 14 Aug 2018 21:26:00 +0000 (00:26 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Aug 2018 22:00:00 +0000 (15:00 -0700)
Commit 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once")
breaks non-SMP builds.

[ I suspect the 'bool' fields should just be made to be bitfields and be
  exposed regardless of configuration, but that's a separate cleanup
  that I'll leave to the owners of this file for later.   - Linus ]

Fixes: 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once")
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Abel Vesa <abelvesa@linux.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/cpu.c

index 90ec528a6e32072f1111a26a90788a583e893cd5..ed44d7d34c2d9bfc08093af4854dc78bf7232b21 100644 (file)
@@ -2278,6 +2278,8 @@ void __init boot_cpu_init(void)
  */
 void __init boot_cpu_hotplug_init(void)
 {
+#ifdef CONFIG_SMP
        this_cpu_write(cpuhp_state.booted_once, true);
+#endif
        this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);
 }