From: Ingo Molnar Date: Tue, 27 Feb 2024 09:09:49 +0000 (+0100) Subject: Merge branch 'x86/urgent' into x86/apic, to resolve conflicts X-Git-Tag: v6.9-rc1~202^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b9c280b9af2aa851d83e7d0b79f36a3d869d745;p=thirdparty%2Flinux.git Merge branch 'x86/urgent' into x86/apic, to resolve conflicts Conflicts: arch/x86/kernel/cpu/common.c arch/x86/kernel/cpu/intel.c Signed-off-by: Ingo Molnar --- 9b9c280b9af2aa851d83e7d0b79f36a3d869d745 diff --cc arch/x86/kernel/cpu/common.c index 05e0b31f75e9b,fbc4e60d027cb..087d217342867 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@@ -1543,10 -1589,9 +1543,11 @@@ static void __init early_identify_cpu(s get_cpu_vendor(c); get_cpu_cap(c); setup_force_cpu_cap(X86_FEATURE_CPUID); + get_cpu_address_sizes(c); cpu_parse_early_param(); + cpu_init_topology(c); + if (this_cpu->c_early_init) this_cpu->c_early_init(c); @@@ -1557,11 -1602,9 +1558,10 @@@ this_cpu->c_bsp_init(c); } else { setup_clear_cpu_cap(X86_FEATURE_CPUID); + get_cpu_address_sizes(c); + cpu_init_topology(c); } - get_cpu_address_sizes(c); - setup_force_cpu_cap(X86_FEATURE_ALWAYS); cpu_set_bug_bits(c); diff --cc arch/x86/kernel/cpu/intel.c index 1bb37a69d8379,40dec9b56f87d..be30d7fa2e66b --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@@ -315,6 -399,20 +399,13 @@@ static void early_init_intel(struct cpu } check_memory_type_self_snoop_errata(c); + - /* - * Get the number of SMT siblings early from the extended topology - * leaf, if available. Otherwise try the legacy SMT detection. - */ - if (detect_extended_topology_early(c) < 0) - detect_ht_early(c); - + /* + * Adjust the number of physical bits early because it affects the + * valid bits of the MTRR mask registers. + */ + if (cpu_has(c, X86_FEATURE_TME)) + detect_tme_early(c); } static void bsp_init_intel(struct cpuinfo_x86 *c)