Skip to content

Commit 594957d

Browse files
committed
x86/cpu: Remove pointless evaluation of x86_coreid_bits
cpuinfo_x86::x86_coreid_bits is only used by the AMD numa topology code. No point in evaluating it on non AMD systems. No functional change. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Juergen Gross <[email protected]> Tested-by: Sohil Mehta <[email protected]> Tested-by: Michael Kelley <[email protected]> Tested-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: Zhang Rui <[email protected]> Reviewed-by: Arjan van de Ven <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e3c0c5d commit 594957d

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

arch/x86/kernel/cpu/intel.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -314,19 +314,6 @@ static void early_init_intel(struct cpuinfo_x86 *c)
314314
setup_clear_cpu_cap(X86_FEATURE_PGE);
315315
}
316316

317-
if (c->cpuid_level >= 0x00000001) {
318-
u32 eax, ebx, ecx, edx;
319-
320-
cpuid(0x00000001, &eax, &ebx, &ecx, &edx);
321-
/*
322-
* If HTT (EDX[28]) is set EBX[16:23] contain the number of
323-
* apicids which are reserved per package. Store the resulting
324-
* shift value for the package management code.
325-
*/
326-
if (edx & (1U << 28))
327-
c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff);
328-
}
329-
330317
check_memory_type_self_snoop_errata(c);
331318

332319
/*

arch/x86/kernel/cpu/zhaoxin.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,6 @@ static void early_init_zhaoxin(struct cpuinfo_x86 *c)
6565
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
6666
set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);
6767
}
68-
69-
if (c->cpuid_level >= 0x00000001) {
70-
u32 eax, ebx, ecx, edx;
71-
72-
cpuid(0x00000001, &eax, &ebx, &ecx, &edx);
73-
/*
74-
* If HTT (EDX[28]) is set EBX[16:23] contain the number of
75-
* apicids which are reserved per package. Store the resulting
76-
* shift value for the package management code.
77-
*/
78-
if (edx & (1U << 28))
79-
c->x86_coreid_bits = get_count_order((ebx >> 16) & 0xff);
80-
}
81-
8268
}
8369

8470
static void init_zhaoxin(struct cpuinfo_x86 *c)

0 commit comments

Comments
 (0)