Skip to content

Commit 3c749b8

Browse files
committed
x86/CPU/AMD: Remove amd_get_topology_early()
... and fold its function body into its single call site. No functional changes: # arch/x86/kernel/cpu/amd.o: text data bss dec hex filename 5994 385 1 6380 18ec amd.o.before 5994 385 1 6380 18ec amd.o.after md5: 99ec6daa095b502297884e949c520f90 amd.o.before.asm 99ec6daa095b502297884e949c520f90 amd.o.after.asm Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 4144fdd commit 3c749b8

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,6 @@ static void legacy_fixup_core_id(struct cpuinfo_x86 *c)
319319
c->cpu_core_id %= cus_per_node;
320320
}
321321

322-
323-
static void amd_get_topology_early(struct cpuinfo_x86 *c)
324-
{
325-
if (cpu_has(c, X86_FEATURE_TOPOEXT))
326-
smp_num_siblings = ((cpuid_ebx(0x8000001e) >> 8) & 0xff) + 1;
327-
}
328-
329322
/*
330323
* Fixup core topology information for
331324
* (1) AMD multi-node processors
@@ -717,7 +710,8 @@ static void early_init_amd(struct cpuinfo_x86 *c)
717710
}
718711
}
719712

720-
amd_get_topology_early(c);
713+
if (cpu_has(c, X86_FEATURE_TOPOEXT))
714+
smp_num_siblings = ((cpuid_ebx(0x8000001e) >> 8) & 0xff) + 1;
721715
}
722716

723717
static void init_amd_k8(struct cpuinfo_x86 *c)

0 commit comments

Comments
 (0)