mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
cpu/hotplug: Fix SMT supported evaluation
Josh reported that the late SMT evaluation in cpu_smt_state_init() sets
cpu_smt_control to CPU_SMT_NOT_SUPPORTED in case that 'nosmt' was supplied
on the kernel command line as it cannot differentiate between SMT disabled
by BIOS and SMT soft disable via 'nosmt'. That wreckages the state and
makes the sysfs interface unusable.
Rework this so that during bringup of the non boot CPUs the availability of
SMT is determined in cpu_smt_allowed(). If a newly booted CPU is not a
'primary' thread then set the local cpu_smt_available marker and evaluate
this explicitely right after the initial SMP bringup has finished.
SMT evaulation on x86 is a trainwreck as the firmware has all the
information _before_ booting the kernel, but there is no interface to query
it.
Fixes: 73d5e2b472
("cpu/hotplug: detect SMT disabled by BIOS")
Reported-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
5b76a3cff0
commit
bc2d8d262c
4 changed files with 33 additions and 14 deletions
|
@ -584,6 +584,8 @@ void __init smp_init(void)
|
|||
num_nodes, (num_nodes > 1 ? "s" : ""),
|
||||
num_cpus, (num_cpus > 1 ? "s" : ""));
|
||||
|
||||
/* Final decision about SMT support */
|
||||
cpu_smt_check_topology();
|
||||
/* Any cleanup work */
|
||||
smp_cpus_done(setup_max_cpus);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue