diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2023-05-12 23:07:48 +0200 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2023-05-15 13:45:02 +0200 |
| commit | f54d4434c281f38b975d58de47adeca671beff4f (patch) | |
| tree | 2a381fa6ef750bb81f4bb9a4df8ababc2c296df4 /arch/x86/kernel/smpboot.c | |
| parent | 8b5a0f957cc5ca1f68486163d4da4683be3b47aa (diff) | |
| download | linux-f54d4434c281f38b975d58de47adeca671beff4f.tar.gz linux-f54d4434c281f38b975d58de47adeca671beff4f.tar.bz2 linux-f54d4434c281f38b975d58de47adeca671beff4f.zip | |
x86/apic: Provide cpu_primary_thread mask
Make the primary thread tracking CPU mask based in preparation for simpler
handling of parallel bootup.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Tested-by: Helge Deller <deller@gmx.de> # parisc
Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com> # Steam Deck
Link: https://lore.kernel.org/r/20230512205257.186599880@linutronix.de
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
| -rw-r--r-- | arch/x86/kernel/smpboot.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index a27941ac528c..51122f0ba3f6 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -102,6 +102,9 @@ EXPORT_PER_CPU_SYMBOL(cpu_die_map); DEFINE_PER_CPU_READ_MOSTLY(struct cpuinfo_x86, cpu_info); EXPORT_PER_CPU_SYMBOL(cpu_info); +/* CPUs which are the primary SMT threads */ +struct cpumask __cpu_primary_thread_mask __read_mostly; + /* Representing CPUs for which sibling maps can be computed */ static cpumask_var_t cpu_sibling_setup_mask; @@ -277,15 +280,6 @@ static void notrace start_secondary(void *unused) } /** - * topology_is_primary_thread - Check whether CPU is the primary SMT thread - * @cpu: CPU to check - */ -bool topology_is_primary_thread(unsigned int cpu) -{ - return apic_id_is_primary_thread(per_cpu(x86_cpu_to_apicid, cpu)); -} - -/** * topology_smt_supported - Check whether SMT is supported by the CPUs */ bool topology_smt_supported(void) |
