diff options
| author | Greg Kroah-Hartman <[email protected]> | 2024-08-19 06:24:50 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-08-19 06:24:50 +0200 |
| commit | ebbe30f4bba127505c5664dd67f519e5e06d16be (patch) | |
| tree | 7285f44ba6e74a25876982cb50f9a430169cc42e /kernel/cpu.c | |
| parent | 1241b384efa53f4b7a95fe2b34d69359bb3ae1b5 (diff) | |
| parent | 47ac09b91befbb6a235ab620c32af719f8208399 (diff) | |
Merge 6.11-rc4 into tty-next
We need the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'kernel/cpu.c')
| -rw-r--r-- | kernel/cpu.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 1209ddaec026..b1fd2a3db91a 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2689,6 +2689,16 @@ int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval) return ret; } +/** + * Check if the core a CPU belongs to is online + */ +#if !defined(topology_is_core_online) +static inline bool topology_is_core_online(unsigned int cpu) +{ + return true; +} +#endif + int cpuhp_smt_enable(void) { int cpu, ret = 0; @@ -2699,7 +2709,7 @@ int cpuhp_smt_enable(void) /* Skip online CPUs and CPUs on offline nodes */ if (cpu_online(cpu) || !node_online(cpu_to_node(cpu))) continue; - if (!cpu_smt_thread_allowed(cpu)) + if (!cpu_smt_thread_allowed(cpu) || !topology_is_core_online(cpu)) continue; ret = _cpu_up(cpu, 0, CPUHP_ONLINE); if (ret) |