We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 882e0cf commit 5e40fb2Copy full SHA for 5e40fb2
arch/x86/kernel/cpu/topology.c
@@ -76,10 +76,7 @@ bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
76
#ifdef CONFIG_SMP
77
static void cpu_mark_primary_thread(unsigned int cpu, unsigned int apicid)
78
{
79
- /* Isolate the SMT bit(s) in the APICID and check for 0 */
80
- u32 mask = (1U << (fls(smp_num_siblings) - 1)) - 1;
81
-
82
- if (smp_num_siblings == 1 || !(apicid & mask))
+ if (!(apicid & (smp_num_siblings - 1)))
83
cpumask_set_cpu(cpu, &__cpu_primary_thread_mask);
84
}
85
#else
0 commit comments