2022-11-17 16:31:53

by Phil Auld

[permalink] [raw]
Subject: [PATCH v5 2/2] cpuhp: 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 <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: "Peter Zijlstra (Intel)" <[email protected]>
Cc: Steven Price <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
---
kernel/cpu.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 979de993f853..3f704a8896b0 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);
}

/*
--
2.31.1



2022-12-01 12:26:33

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: smp/core] cpuhp: Set cpuhp target for boot cpu

The following commit has been merged into the smp/core branch of tip:

Commit-ID: f4576ee2315f1ad5f147a356c6e5c223462fd599
Gitweb: https://git.kernel.org/tip/f4576ee2315f1ad5f147a356c6e5c223462fd599
Author: Phil Auld <[email protected]>
AuthorDate: Thu, 17 Nov 2022 11:23:29 -05:00
Committer: Thomas Gleixner <[email protected]>
CommitterDate: Thu, 01 Dec 2022 12:35:08 +01:00

cpuhp: 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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Link: https://lore.kernel.org/r/[email protected]

---
kernel/cpu.c | 1 +
1 file changed, 1 insertion(+)

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);
}

/*

2022-12-02 12:18:50

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: smp/core] cpu/hotplug: Set cpuhp target for boot cpu

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 <[email protected]>
AuthorDate: Thu, 17 Nov 2022 11:23:29 -05:00
Committer: Thomas Gleixner <[email protected]>
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Valentin Schneider <[email protected]>
Link: https://lore.kernel.org/r/[email protected]


---
kernel/cpu.c | 1 +
1 file changed, 1 insertion(+)

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);
}

/*