Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: Kill CONFIG_X86_HT

In talking to Aravind recently about making certain AMD topology
attributes available to the MCE injection module, it seemed like
that CONFIG_X86_HT thing is more or less superfluous. It is
def_bool y, depends on SMP and gets enabled in the majority of
.configs - distro and otherwise - out there.

So let's kill it and make code behind it depend directly on SMP.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Daniel Walter <dwalter@google.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jacob Shin <jacob.w.shin@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1433436928-31903-18-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Borislav Petkov and committed by
Ingo Molnar
c8e56d20 6471b825

+12 -16
+2 -6
arch/x86/Kconfig
··· 261 261 def_bool y 262 262 depends on X86_64 && SMP 263 263 264 - config X86_HT 265 - def_bool y 266 - depends on SMP 267 - 268 264 config X86_32_LAZY_GS 269 265 def_bool y 270 266 depends on X86_32 && !CC_STACKPROTECTOR ··· 861 865 862 866 config SCHED_SMT 863 867 bool "SMT (Hyperthreading) scheduler support" 864 - depends on X86_HT 868 + depends on SMP 865 869 ---help--- 866 870 SMT scheduler support improves the CPU scheduler's decision making 867 871 when dealing with Intel Pentium 4 chips with HyperThreading at a ··· 871 875 config SCHED_MC 872 876 def_bool y 873 877 prompt "Multi-core scheduler support" 874 - depends on X86_HT 878 + depends on SMP 875 879 ---help--- 876 880 Multi-core scheduler support improves the CPU scheduler's decision 877 881 making when dealing with multi-core CPU chips at a cost of slightly
+1 -1
arch/x86/include/asm/topology.h
··· 26 26 #define _ASM_X86_TOPOLOGY_H 27 27 28 28 #ifdef CONFIG_X86_32 29 - # ifdef CONFIG_X86_HT 29 + # ifdef CONFIG_SMP 30 30 # define ENABLE_TOPO_DEFINES 31 31 # endif 32 32 #else
+3 -3
arch/x86/kernel/cpu/amd.c
··· 288 288 * Assumption: Number of cores in each internal node is the same. 289 289 * (2) AMD processors supporting compute units 290 290 */ 291 - #ifdef CONFIG_X86_HT 291 + #ifdef CONFIG_SMP 292 292 static void amd_get_topology(struct cpuinfo_x86 *c) 293 293 { 294 294 u32 nodes, cores_per_cu = 1; ··· 341 341 */ 342 342 static void amd_detect_cmp(struct cpuinfo_x86 *c) 343 343 { 344 - #ifdef CONFIG_X86_HT 344 + #ifdef CONFIG_SMP 345 345 unsigned bits; 346 346 int cpu = smp_processor_id(); 347 347 ··· 420 420 421 421 static void early_init_amd_mc(struct cpuinfo_x86 *c) 422 422 { 423 - #ifdef CONFIG_X86_HT 423 + #ifdef CONFIG_SMP 424 424 unsigned bits, ecx; 425 425 426 426 /* Multi core CPU? */
+2 -2
arch/x86/kernel/cpu/common.c
··· 508 508 509 509 void detect_ht(struct cpuinfo_x86 *c) 510 510 { 511 - #ifdef CONFIG_X86_HT 511 + #ifdef CONFIG_SMP 512 512 u32 eax, ebx, ecx, edx; 513 513 int index_msb, core_bits; 514 514 static bool printed; ··· 844 844 if (c->cpuid_level >= 0x00000001) { 845 845 c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF; 846 846 #ifdef CONFIG_X86_32 847 - # ifdef CONFIG_X86_HT 847 + # ifdef CONFIG_SMP 848 848 c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); 849 849 # else 850 850 c->apicid = c->initial_apicid;
+4 -4
arch/x86/kernel/cpu/intel_cacheinfo.c
··· 654 654 unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ 655 655 unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ 656 656 unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; 657 - #ifdef CONFIG_X86_HT 657 + #ifdef CONFIG_SMP 658 658 unsigned int cpu = c->cpu_index; 659 659 #endif 660 660 ··· 773 773 774 774 if (new_l2) { 775 775 l2 = new_l2; 776 - #ifdef CONFIG_X86_HT 776 + #ifdef CONFIG_SMP 777 777 per_cpu(cpu_llc_id, cpu) = l2_id; 778 778 #endif 779 779 } 780 780 781 781 if (new_l3) { 782 782 l3 = new_l3; 783 - #ifdef CONFIG_X86_HT 783 + #ifdef CONFIG_SMP 784 784 per_cpu(cpu_llc_id, cpu) = l3_id; 785 785 #endif 786 786 } 787 787 788 - #ifdef CONFIG_X86_HT 788 + #ifdef CONFIG_SMP 789 789 /* 790 790 * If cpu_llc_id is not yet set, this means cpuid_level < 4 which in 791 791 * turns means that the only possibility is SMT (as indicated in