Commit-ID: 5a19009043fcffd1591b04a588d53336a66855d5 Gitweb: https://git.kernel.org/tip/5a19009043fcffd1591b04a588d53336a66855d5 Author: David Wang <davidwang@xxxxxxxxxxx> AuthorDate: Thu, 3 May 2018 10:32:46 +0800 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitDate: Sun, 13 May 2018 12:06:13 +0200 x86/Centaur: Report correct CPU/cache topology Centaur CPUs enumerate the cache topology in the same way as Intel CPUs, but the function is unused so for. The Centaur init code also misses to initialize x86_info::max_cores, so the CPU topology can't be described correctly. Initialize x86_info::max_cores and invoke init_cacheinfo() to make CPU and cache topology information available and correct. Signed-off-by: David Wang <davidwang@xxxxxxxxxxx> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: lukelin@xxxxxxxxxx Cc: qiyuanwang@xxxxxxxxxxx Cc: gregkh@xxxxxxxxxxxxxxxxxxx Cc: brucechang@xxxxxxxxxxxxxxxx Cc: timguo@xxxxxxxxxxx Cc: cooperyan@xxxxxxxxxxx Cc: hpa@xxxxxxxxx Cc: benjaminpan@xxxxxxxxxxx Link: https://lkml.kernel.org/r/1525314766-18910-4-git-send-email-davidwang@xxxxxxxxxxx --- arch/x86/kernel/cpu/centaur.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c index 80d5110481ec..c265494234e6 100644 --- a/arch/x86/kernel/cpu/centaur.c +++ b/arch/x86/kernel/cpu/centaur.c @@ -160,6 +160,11 @@ static void init_centaur(struct cpuinfo_x86 *c) clear_cpu_cap(c, 0*32+31); #endif early_init_centaur(c); + init_intel_cacheinfo(c); + c->x86_max_cores = detect_num_cpu_cores(c); +#ifdef CONFIG_X86_32 + detect_ht(c); +#endif if (c->cpuid_level > 9) { unsigned int eax = cpuid_eax(10); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |