aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-09-04 23:09:06 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-05 03:40:50 -0400
commitb9e67f00424e164dcd29391eb48dc941db8691ad (patch)
treeeb246e726a67bcecee64cb7f0c8248e4a1ec1106 /arch
parentfab334c1d5f24d23d12f98ad652d399279cd03ce (diff)
x86: cpu/common.c, merge default_init()
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/common.c4
-rw-r--r--arch/x86/kernel/cpu/common_64.c12
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 43d5287bb2a4..2c4bfa2e56ad 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -224,6 +224,9 @@ static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
224 224
225static void __cpuinit default_init(struct cpuinfo_x86 *c) 225static void __cpuinit default_init(struct cpuinfo_x86 *c)
226{ 226{
227#ifdef CONFIG_X86_64
228 display_cacheinfo(c);
229#else
227 /* Not much we can do here... */ 230 /* Not much we can do here... */
228 /* Check if at least it has cpuid */ 231 /* Check if at least it has cpuid */
229 if (c->cpuid_level == -1) { 232 if (c->cpuid_level == -1) {
@@ -233,6 +236,7 @@ static void __cpuinit default_init(struct cpuinfo_x86 *c)
233 else if (c->x86 == 3) 236 else if (c->x86 == 3)
234 strcpy(c->x86_model_id, "386"); 237 strcpy(c->x86_model_id, "386");
235 } 238 }
239#endif
236} 240}
237 241
238static struct cpu_dev __cpuinitdata default_cpu = { 242static struct cpu_dev __cpuinitdata default_cpu = {
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c
index d7b996518f86..2fda10974813 100644
--- a/arch/x86/kernel/cpu/common_64.c
+++ b/arch/x86/kernel/cpu/common_64.c
@@ -223,7 +223,19 @@ static struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = {};
223 223
224static void __cpuinit default_init(struct cpuinfo_x86 *c) 224static void __cpuinit default_init(struct cpuinfo_x86 *c)
225{ 225{
226#ifdef CONFIG_X86_64
226 display_cacheinfo(c); 227 display_cacheinfo(c);
228#else
229 /* Not much we can do here... */
230 /* Check if at least it has cpuid */
231 if (c->cpuid_level == -1) {
232 /* No cpuid. It must be an ancient CPU */
233 if (c->x86 == 4)
234 strcpy(c->x86_model_id, "486");
235 else if (c->x86 == 3)
236 strcpy(c->x86_model_id, "386");
237 }
238#endif
227} 239}
228 240
229static struct cpu_dev __cpuinitdata default_cpu = { 241static struct cpu_dev __cpuinitdata default_cpu = {