Эх сурвалжийг харах

x86/cpu: Remove the pointless CPU printout

The value of this printout is dubious at best and there is no point in
having it in two different places along with convoluted ways to reach it.

Remove it completely.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Thomas Gleixner 7 жил өмнө
parent
commit
55e6d279ab

+ 5 - 15
arch/x86/kernel/cpu/common.c

@@ -663,13 +663,12 @@ void detect_ht(struct cpuinfo_x86 *c)
 #ifdef CONFIG_SMP
 #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;
 
 
 	if (!cpu_has(c, X86_FEATURE_HT))
 	if (!cpu_has(c, X86_FEATURE_HT))
 		return;
 		return;
 
 
 	if (cpu_has(c, X86_FEATURE_CMP_LEGACY))
 	if (cpu_has(c, X86_FEATURE_CMP_LEGACY))
-		goto out;
+		return;
 
 
 	if (cpu_has(c, X86_FEATURE_XTOPOLOGY))
 	if (cpu_has(c, X86_FEATURE_XTOPOLOGY))
 		return;
 		return;
@@ -678,14 +677,14 @@ void detect_ht(struct cpuinfo_x86 *c)
 
 
 	smp_num_siblings = (ebx & 0xff0000) >> 16;
 	smp_num_siblings = (ebx & 0xff0000) >> 16;
 
 
+	if (!smp_num_siblings)
+		smp_num_siblings = 1;
+
 	if (smp_num_siblings == 1) {
 	if (smp_num_siblings == 1) {
 		pr_info_once("CPU0: Hyper-Threading is disabled\n");
 		pr_info_once("CPU0: Hyper-Threading is disabled\n");
-		goto out;
+		return;
 	}
 	}
 
 
-	if (smp_num_siblings <= 1)
-		goto out;
-
 	index_msb = get_count_order(smp_num_siblings);
 	index_msb = get_count_order(smp_num_siblings);
 	c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb);
 	c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb);
 
 
@@ -697,15 +696,6 @@ void detect_ht(struct cpuinfo_x86 *c)
 
 
 	c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) &
 	c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) &
 				       ((1 << core_bits) - 1);
 				       ((1 << core_bits) - 1);
-
-out:
-	if (!printed && (c->x86_max_cores * smp_num_siblings) > 1) {
-		pr_info("CPU: Physical Processor ID: %d\n",
-			c->phys_proc_id);
-		pr_info("CPU: Processor Core ID: %d\n",
-			c->cpu_core_id);
-		printed = 1;
-	}
 #endif
 #endif
 }
 }
 
 

+ 0 - 10
arch/x86/kernel/cpu/topology.c

@@ -33,7 +33,6 @@ int detect_extended_topology(struct cpuinfo_x86 *c)
 	unsigned int eax, ebx, ecx, edx, sub_index;
 	unsigned int eax, ebx, ecx, edx, sub_index;
 	unsigned int ht_mask_width, core_plus_mask_width;
 	unsigned int ht_mask_width, core_plus_mask_width;
 	unsigned int core_select_mask, core_level_siblings;
 	unsigned int core_select_mask, core_level_siblings;
-	static bool printed;
 
 
 	if (c->cpuid_level < 0xb)
 	if (c->cpuid_level < 0xb)
 		return -1;
 		return -1;
@@ -86,15 +85,6 @@ int detect_extended_topology(struct cpuinfo_x86 *c)
 	c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
 	c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
 
 
 	c->x86_max_cores = (core_level_siblings / smp_num_siblings);
 	c->x86_max_cores = (core_level_siblings / smp_num_siblings);
-
-	if (!printed) {
-		pr_info("CPU: Physical Processor ID: %d\n",
-		       c->phys_proc_id);
-		if (c->x86_max_cores > 1)
-			pr_info("CPU: Processor Core ID: %d\n",
-			       c->cpu_core_id);
-		printed = 1;
-	}
 #endif
 #endif
 	return 0;
 	return 0;
 }
 }