diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-09-14 05:33:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-14 08:09:14 -0400 |
commit | afae865613c8292e8bdcce4f0b161988d761f033 (patch) | |
tree | 5a82d566ff67c86f8caf264faf8617cebca5c43d /arch/x86 | |
parent | aef93c8bd506a78983d91cd576a97fee6e934ac1 (diff) |
x86: move transmeta cap read to early_init_transmeta()
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/transmeta.c | 28 |
2 files changed, 15 insertions, 21 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index f5f25b85be95..3e2ce4d33d3a 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -465,14 +465,6 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c) | |||
465 | } | 465 | } |
466 | 466 | ||
467 | #ifdef CONFIG_X86_64 | 467 | #ifdef CONFIG_X86_64 |
468 | /* Transmeta-defined flags: level 0x80860001 */ | ||
469 | xlvl = cpuid_eax(0x80860000); | ||
470 | if ((xlvl & 0xffff0000) == 0x80860000) { | ||
471 | /* Don't set x86_cpuid_level here for now to not confuse. */ | ||
472 | if (xlvl >= 0x80860001) | ||
473 | c->x86_capability[2] = cpuid_edx(0x80860001); | ||
474 | } | ||
475 | |||
476 | if (c->extended_cpuid_level >= 0x80000008) { | 468 | if (c->extended_cpuid_level >= 0x80000008) { |
477 | u32 eax = cpuid_eax(0x80000008); | 469 | u32 eax = cpuid_eax(0x80000008); |
478 | 470 | ||
diff --git a/arch/x86/kernel/cpu/transmeta.c b/arch/x86/kernel/cpu/transmeta.c index 738e03244f95..52b3fefbd5af 100644 --- a/arch/x86/kernel/cpu/transmeta.c +++ b/arch/x86/kernel/cpu/transmeta.c | |||
@@ -5,6 +5,18 @@ | |||
5 | #include <asm/msr.h> | 5 | #include <asm/msr.h> |
6 | #include "cpu.h" | 6 | #include "cpu.h" |
7 | 7 | ||
8 | static void __cpuinit early_init_transmeta(struct cpuinfo_x86 *c) | ||
9 | { | ||
10 | u32 xlvl; | ||
11 | |||
12 | /* Transmeta-defined flags: level 0x80860001 */ | ||
13 | xlvl = cpuid_eax(0x80860000); | ||
14 | if ((xlvl & 0xffff0000) == 0x80860000) { | ||
15 | if (xlvl >= 0x80860001) | ||
16 | c->x86_capability[2] = cpuid_edx(0x80860001); | ||
17 | } | ||
18 | } | ||
19 | |||
8 | static void __cpuinit init_transmeta(struct cpuinfo_x86 *c) | 20 | static void __cpuinit init_transmeta(struct cpuinfo_x86 *c) |
9 | { | 21 | { |
10 | unsigned int cap_mask, uk, max, dummy; | 22 | unsigned int cap_mask, uk, max, dummy; |
@@ -12,6 +24,8 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c) | |||
12 | unsigned int cpu_rev, cpu_freq = 0, cpu_flags, new_cpu_rev; | 24 | unsigned int cpu_rev, cpu_freq = 0, cpu_flags, new_cpu_rev; |
13 | char cpu_info[65]; | 25 | char cpu_info[65]; |
14 | 26 | ||
27 | early_init_transmeta(c); | ||
28 | |||
15 | display_cacheinfo(c); | 29 | display_cacheinfo(c); |
16 | 30 | ||
17 | /* Print CMS and CPU revision */ | 31 | /* Print CMS and CPU revision */ |
@@ -84,23 +98,11 @@ static void __cpuinit init_transmeta(struct cpuinfo_x86 *c) | |||
84 | #endif | 98 | #endif |
85 | } | 99 | } |
86 | 100 | ||
87 | static void __cpuinit transmeta_identify(struct cpuinfo_x86 *c) | ||
88 | { | ||
89 | u32 xlvl; | ||
90 | |||
91 | /* Transmeta-defined flags: level 0x80860001 */ | ||
92 | xlvl = cpuid_eax(0x80860000); | ||
93 | if ((xlvl & 0xffff0000) == 0x80860000) { | ||
94 | if (xlvl >= 0x80860001) | ||
95 | c->x86_capability[2] = cpuid_edx(0x80860001); | ||
96 | } | ||
97 | } | ||
98 | |||
99 | static struct cpu_dev transmeta_cpu_dev __cpuinitdata = { | 101 | static struct cpu_dev transmeta_cpu_dev __cpuinitdata = { |
100 | .c_vendor = "Transmeta", | 102 | .c_vendor = "Transmeta", |
101 | .c_ident = { "GenuineTMx86", "TransmetaCPU" }, | 103 | .c_ident = { "GenuineTMx86", "TransmetaCPU" }, |
104 | .c_early_init = early_init_transmeta, | ||
102 | .c_init = init_transmeta, | 105 | .c_init = init_transmeta, |
103 | .c_identify = transmeta_identify, | ||
104 | .c_x86_vendor = X86_VENDOR_TRANSMETA, | 106 | .c_x86_vendor = X86_VENDOR_TRANSMETA, |
105 | }; | 107 | }; |
106 | 108 | ||