diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-09-04 12:15:38 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-09-04 12:15:38 +0200 |
commit | eb876ea724835126f215c9a5bcc9e6148e2a6d15 (patch) | |
tree | 689c215270b023c2f94a6629c7f1d3ef8e49c28a /kernel/cpu.c | |
parent | 2dce993165088dbe728faa21547e3b74213b6732 (diff) | |
parent | 67784a74e258a467225f0e68335df77acd67b7ab (diff) |
Merge branch 'linus' into smp/core
Pull in upstream changes so further patches don't conflict.
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 16323610cd20..c16a9b66baba 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -2705,6 +2705,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; @@ -2715,7 +2725,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) |