cpu/hotplug: Set cpuhp target for boot cpu
authorPhil Auld <pauld@redhat.com>
Thu, 17 Nov 2022 16:23:29 +0000 (11:23 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 2 Dec 2022 11:43:02 +0000 (12:43 +0100)
Since the boot cpu does not go through the hotplug process it ends
up with state == CPUHP_ONLINE but target == CPUHP_OFFLINE.
So set the target to match in boot_cpu_hotplug_init().

Signed-off-by: Phil Auld <pauld@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
Link: https://lore.kernel.org/r/20221117162329.3164999-3-pauld@redhat.com
kernel/cpu.c

index 979de993f85384172dfe5704518781d379164c42..3f704a8896b09148977748bd448b318d83ca0860 100644 (file)
@@ -2690,6 +2690,7 @@ void __init boot_cpu_hotplug_init(void)
        cpumask_set_cpu(smp_processor_id(), &cpus_booted_once_mask);
 #endif
        this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);
+       this_cpu_write(cpuhp_state.target, CPUHP_ONLINE);
 }
 
 /*