Skip to contentSkip to conversation

cpu_early_init() breakage

PATCH In review Mike Galbraith 2 participants 3 messages Nov 14, 2009 – Nov 15, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpu_early_init() breakage

0388423 typo caused loss of vendor data even with CONFIG_PROCESSOR_SELECT.

[    0.000000] CPU: vendor_id 'GenuineIntel' unknown, using generic init.
[    0.000000] CPU: Your system may be unstable.
[    0.044003] MCE: unknown CPU type - not enabling MCE support.
...
[    0.437241] Brought up 4 CPUs
[    0.440002] Total of 4 processors activated (19139.97 BogoMIPS).
[    0.448021] CPU0 attaching sched-domain:
[    0.448024]  domain 0: span 0-3 level MC
[    0.448026]   groups: 0 1 2 3
[    0.448031] CPU1 attaching sched-domain:
[    0.448033]  domain 0: span 0-3 level MC
[    0.448035]   groups: 1 2 3 0
[    0.448039] CPU2 attaching sched-domain:
[    0.448041]  domain 0: span 0-3 level MC
[    0.448043]   groups: 2 3 0 1
[    0.448047] CPU3 attaching sched-domain:
[    0.448048]  domain 0: span 0-3 level MC
[    0.448050]   groups: 3 0 1 2

x86: Fix typo in 0388423 "Minimise printk spew from per-vendor init code"

LKML-Reference: <new-submission>

arch/x86/kernel/cpu/common.c +4 -2
index 973080b..3c7f7fd 100644
@@ -651,11 +651,12 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
 
 void __init early_cpu_init(void)
 {
-#ifdef PROCESSOR_SELECT
 	const struct cpu_dev *const *cdev;
 	int count = 0;
 
+#ifdef CONFIG_PROCESSOR_SELECT
 	printk(KERN_INFO "KERNEL supported cpus:\n");
+#endif
 	for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
 		const struct cpu_dev *cpudev = *cdev;
 		unsigned int j;
@@ -668,11 +669,12 @@ void __init early_cpu_init(void)
 		for (j = 0; j < 2; j++) {
 			if (!cpudev->c_ident[j])
 				continue;
+#ifdef CONFIG_PROCESSOR_SELECT
 			printk(KERN_INFO "  %s %s\n", cpudev->c_vendor,
 				cpudev->c_ident[j]);
+#endif
 		}
 	}
-#endif
 	early_identify_cpu(&boot_cpu_data);
 }
 
#1 lore raw

Bah, missed quilt refresh after fixing my own typo :)

0388423 typo caused loss of vendor data even with CONFIG_PROCESSOR_SELECT.

[    0.000000] CPU: vendor_id 'GenuineIntel' unknown, using generic init.
[    0.000000] CPU: Your system may be unstable.
[    0.044003] MCE: unknown CPU type - not enabling MCE support.
...
[    0.437241] Brought up 4 CPUs
[    0.440002] Total of 4 processors activated (19139.97 BogoMIPS).
[    0.448021] CPU0 attaching sched-domain:
[    0.448024]  domain 0: span 0-3 level MC
[    0.448026]   groups: 0 1 2 3
[    0.448031] CPU1 attaching sched-domain:
[    0.448033]  domain 0: span 0-3 level MC
[    0.448035]   groups: 1 2 3 0
[    0.448039] CPU2 attaching sched-domain:
[    0.448041]  domain 0: span 0-3 level MC
[    0.448043]   groups: 2 3 0 1
[    0.448047] CPU3 attaching sched-domain:
[    0.448048]  domain 0: span 0-3 level MC
[    0.448050]   groups: 3 0 1 2

x86: Fix typo in 0388423 "Minimise printk spew from per-vendor init code"

LKML-Reference: <new-submission>

---
 arch/x86/kernel/cpu/common.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/common.c +4 -2
Index: linux-2.6/arch/x86/kernel/cpu/common.c
===================================================================
@@ -651,11 +651,12 @@ static void __init early_identify_cpu(st
 
 void __init early_cpu_init(void)
 {
-#ifdef PROCESSOR_SELECT
 	const struct cpu_dev *const *cdev;
 	int count = 0;
 
+#ifdef CONFIG_PROCESSOR_SELECT
 	printk(KERN_INFO "KERNEL supported cpus:\n");
+#endif
 	for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
 		const struct cpu_dev *cpudev = *cdev;
 		unsigned int j;
@@ -665,14 +666,15 @@ void __init early_cpu_init(void)
 		cpu_devs[count] = cpudev;
 		count++;
 
+#ifdef CONFIG_PROCESSOR_SELECT
 		for (j = 0; j < 2; j++) {
 			if (!cpudev->c_ident[j])
 				continue;
 			printk(KERN_INFO "  %s %s\n", cpudev->c_vendor,
 				cpudev->c_ident[j]);
 		}
-	}
 #endif
+	}
 	early_identify_cpu(&boot_cpu_data);
 }
 
#2 lore raw
Quoted 55 lines · Mike Galbraith

Bah, missed quilt refresh after fixing my own typo :)

0388423 typo caused loss of vendor data even with CONFIG_PROCESSOR_SELECT.

[    0.000000] CPU: vendor_id 'GenuineIntel' unknown, using generic init.
[    0.000000] CPU: Your system may be unstable.
[    0.044003] MCE: unknown CPU type - not enabling MCE support.
...
[    0.437241] Brought up 4 CPUs
[    0.440002] Total of 4 processors activated (19139.97 BogoMIPS).
[    0.448021] CPU0 attaching sched-domain:
[    0.448024]  domain 0: span 0-3 level MC
[    0.448026]   groups: 0 1 2 3
[    0.448031] CPU1 attaching sched-domain:
[    0.448033]  domain 0: span 0-3 level MC
[    0.448035]   groups: 1 2 3 0
[    0.448039] CPU2 attaching sched-domain:
[    0.448041]  domain 0: span 0-3 level MC
[    0.448043]   groups: 2 3 0 1
[    0.448047] CPU3 attaching sched-domain:
[    0.448048]  domain 0: span 0-3 level MC
[    0.448050]   groups: 3 0 1 2

x86: Fix typo in 0388423 "Minimise printk spew from per-vendor init code"

LKML-Reference: <new-submission>

---
 arch/x86/kernel/cpu/common.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/kernel/cpu/common.c
===================================================================

arch/x86/kernel/cpu/common.c +2 -1
@@ -651,11 +651,12 @@ static void __init early_identify_cpu(st
 
 void __init early_cpu_init(void)
 {
-#ifdef PROCESSOR_SELECT
 	const struct cpu_dev *const *cdev;
 	int count = 0;
 
+#ifdef CONFIG_PROCESSOR_SELECT
 	printk(KERN_INFO "KERNEL supported cpus:\n");
+#endif
 	for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {
 		const struct cpu_dev *cpudev = *cdev;
 		unsigned int j;
@@ -665,14 +666,15 @@ void __init early_cpu_init(void)
 		cpu_devs[count] = cpudev;
 		count++;

arch/x86/kernel/cpu/common.c void __init early_cpu_init(void) · line 676

Quoted 10 lines
arch/x86/kernel/cpu/common.c +1 -1
 
+#ifdef CONFIG_PROCESSOR_SELECT
 		for (j = 0; j < 2; j++) {
 			if (!cpudev->c_ident[j])
 				continue;
 			printk(KERN_INFO "  %s %s\n", cpudev->c_vendor,
 				cpudev->c_ident[j]);
 		}
-	}
 #endif

i did the same fix yesterday - could you check latest -tip whether it works for you too?

Thanks,

Ingo