Commit c8e56d20 authored by Borislav Petkov's avatar Borislav Petkov Committed by Ingo Molnar

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: default avatarBorislav 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.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 6471b825
...@@ -261,10 +261,6 @@ config X86_64_SMP ...@@ -261,10 +261,6 @@ config X86_64_SMP
def_bool y def_bool y
depends on X86_64 && SMP depends on X86_64 && SMP
config X86_HT
def_bool y
depends on SMP
config X86_32_LAZY_GS config X86_32_LAZY_GS
def_bool y def_bool y
depends on X86_32 && !CC_STACKPROTECTOR depends on X86_32 && !CC_STACKPROTECTOR
...@@ -865,7 +861,7 @@ config NR_CPUS ...@@ -865,7 +861,7 @@ config NR_CPUS
config SCHED_SMT config SCHED_SMT
bool "SMT (Hyperthreading) scheduler support" bool "SMT (Hyperthreading) scheduler support"
depends on X86_HT depends on SMP
---help--- ---help---
SMT scheduler support improves the CPU scheduler's decision making SMT scheduler support improves the CPU scheduler's decision making
when dealing with Intel Pentium 4 chips with HyperThreading at a when dealing with Intel Pentium 4 chips with HyperThreading at a
...@@ -875,7 +871,7 @@ config SCHED_SMT ...@@ -875,7 +871,7 @@ config SCHED_SMT
config SCHED_MC config SCHED_MC
def_bool y def_bool y
prompt "Multi-core scheduler support" prompt "Multi-core scheduler support"
depends on X86_HT depends on SMP
---help--- ---help---
Multi-core scheduler support improves the CPU scheduler's decision Multi-core scheduler support improves the CPU scheduler's decision
making when dealing with multi-core CPU chips at a cost of slightly making when dealing with multi-core CPU chips at a cost of slightly
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define _ASM_X86_TOPOLOGY_H #define _ASM_X86_TOPOLOGY_H
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
# ifdef CONFIG_X86_HT # ifdef CONFIG_SMP
# define ENABLE_TOPO_DEFINES # define ENABLE_TOPO_DEFINES
# endif # endif
#else #else
......
...@@ -288,7 +288,7 @@ static int nearby_node(int apicid) ...@@ -288,7 +288,7 @@ static int nearby_node(int apicid)
* Assumption: Number of cores in each internal node is the same. * Assumption: Number of cores in each internal node is the same.
* (2) AMD processors supporting compute units * (2) AMD processors supporting compute units
*/ */
#ifdef CONFIG_X86_HT #ifdef CONFIG_SMP
static void amd_get_topology(struct cpuinfo_x86 *c) static void amd_get_topology(struct cpuinfo_x86 *c)
{ {
u32 nodes, cores_per_cu = 1; u32 nodes, cores_per_cu = 1;
...@@ -341,7 +341,7 @@ static void amd_get_topology(struct cpuinfo_x86 *c) ...@@ -341,7 +341,7 @@ static void amd_get_topology(struct cpuinfo_x86 *c)
*/ */
static void amd_detect_cmp(struct cpuinfo_x86 *c) static void amd_detect_cmp(struct cpuinfo_x86 *c)
{ {
#ifdef CONFIG_X86_HT #ifdef CONFIG_SMP
unsigned bits; unsigned bits;
int cpu = smp_processor_id(); int cpu = smp_processor_id();
...@@ -420,7 +420,7 @@ static void srat_detect_node(struct cpuinfo_x86 *c) ...@@ -420,7 +420,7 @@ static void srat_detect_node(struct cpuinfo_x86 *c)
static void early_init_amd_mc(struct cpuinfo_x86 *c) static void early_init_amd_mc(struct cpuinfo_x86 *c)
{ {
#ifdef CONFIG_X86_HT #ifdef CONFIG_SMP
unsigned bits, ecx; unsigned bits, ecx;
/* Multi core CPU? */ /* Multi core CPU? */
......
...@@ -508,7 +508,7 @@ static void cpu_detect_tlb(struct cpuinfo_x86 *c) ...@@ -508,7 +508,7 @@ static void cpu_detect_tlb(struct cpuinfo_x86 *c)
void detect_ht(struct cpuinfo_x86 *c) void detect_ht(struct cpuinfo_x86 *c)
{ {
#ifdef CONFIG_X86_HT #ifdef CONFIG_SMP
u32 eax, ebx, ecx, edx; u32 eax, ebx, ecx, edx;
int index_msb, core_bits; int index_msb, core_bits;
static bool printed; static bool printed;
...@@ -844,7 +844,7 @@ static void generic_identify(struct cpuinfo_x86 *c) ...@@ -844,7 +844,7 @@ static void generic_identify(struct cpuinfo_x86 *c)
if (c->cpuid_level >= 0x00000001) { if (c->cpuid_level >= 0x00000001) {
c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF; c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF;
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
# ifdef CONFIG_X86_HT # ifdef CONFIG_SMP
c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
# else # else
c->apicid = c->initial_apicid; c->apicid = c->initial_apicid;
......
...@@ -654,7 +654,7 @@ unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c) ...@@ -654,7 +654,7 @@ unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c)
unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */
unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */
unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb;
#ifdef CONFIG_X86_HT #ifdef CONFIG_SMP
unsigned int cpu = c->cpu_index; unsigned int cpu = c->cpu_index;
#endif #endif
...@@ -773,19 +773,19 @@ unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c) ...@@ -773,19 +773,19 @@ unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c)
if (new_l2) { if (new_l2) {
l2 = new_l2; l2 = new_l2;
#ifdef CONFIG_X86_HT #ifdef CONFIG_SMP
per_cpu(cpu_llc_id, cpu) = l2_id; per_cpu(cpu_llc_id, cpu) = l2_id;
#endif #endif
} }
if (new_l3) { if (new_l3) {
l3 = new_l3; l3 = new_l3;
#ifdef CONFIG_X86_HT #ifdef CONFIG_SMP
per_cpu(cpu_llc_id, cpu) = l3_id; per_cpu(cpu_llc_id, cpu) = l3_id;
#endif #endif
} }
#ifdef CONFIG_X86_HT #ifdef CONFIG_SMP
/* /*
* If cpu_llc_id is not yet set, this means cpuid_level < 4 which in * If cpu_llc_id is not yet set, this means cpuid_level < 4 which in
* turns means that the only possibility is SMT (as indicated in * turns means that the only possibility is SMT (as indicated in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment