[tip:,smp/core] cpu/hotplug: Set cpuhp target for boot cpu

Message ID 166998185980.4906.17290345122563836511.tip-bot2@tip-bot2
State New
Headers
Series [tip:,smp/core] cpu/hotplug: Set cpuhp target for boot cpu |

Commit Message

tip-bot2 for Thomas Gleixner Dec. 2, 2022, 11:50 a.m. UTC
  The following commit has been merged into the smp/core branch of tip:

Commit-ID:     d385febc9a19635d4ef197bfad3e84729002f57c
Gitweb:        https://git.kernel.org/tip/d385febc9a19635d4ef197bfad3e84729002f57c
Author:        Phil Auld <pauld@redhat.com>
AuthorDate:    Thu, 17 Nov 2022 11:23:29 -05:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 02 Dec 2022 12:43:02 +01:00

cpu/hotplug: Set cpuhp target for boot cpu

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 | 1 +
 1 file changed, 1 insertion(+)
  

Patch

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 979de99..3f704a8 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -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);
 }
 
 /*