x86: cpu/common.c, merge default_init()
authorYinghai Lu <yhlu.kernel@gmail.com>
Fri, 5 Sep 2008 03:09:06 +0000 (20:09 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 5 Sep 2008 07:40:50 +0000 (09:40 +0200)
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/common_64.c

index 43d5287bb2a466bf90a04b73dff056b1cc8b8bc8..2c4bfa2e56ad3bec21fb93fe0e46d464b50e51b3 100644 (file)
@@ -224,6 +224,9 @@ static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
 
 static void __cpuinit default_init(struct cpuinfo_x86 *c)
 {
+#ifdef CONFIG_X86_64
+       display_cacheinfo(c);
+#else
        /* Not much we can do here... */
        /* Check if at least it has cpuid */
        if (c->cpuid_level == -1) {
@@ -233,6 +236,7 @@ static void __cpuinit default_init(struct cpuinfo_x86 *c)
                else if (c->x86 == 3)
                        strcpy(c->x86_model_id, "386");
        }
+#endif
 }
 
 static struct cpu_dev __cpuinitdata default_cpu = {
index d7b996518f865144a0a97bdf53f786956a3a7495..2fda10974813e0cf49da6fe232f8ac2101bdb3c1 100644 (file)
@@ -223,7 +223,19 @@ static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
 
 static void __cpuinit default_init(struct cpuinfo_x86 *c)
 {
+#ifdef CONFIG_X86_64
        display_cacheinfo(c);
+#else
+       /* Not much we can do here... */
+       /* Check if at least it has cpuid */
+       if (c->cpuid_level == -1) {
+               /* No cpuid. It must be an ancient CPU */
+               if (c->x86 == 4)
+                       strcpy(c->x86_model_id, "486");
+               else if (c->x86 == 3)
+                       strcpy(c->x86_model_id, "386");
+       }
+#endif
 }
 
 static struct cpu_dev __cpuinitdata default_cpu = {
This page took 0.031166 seconds and 5 git commands to generate.