diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-20 02:18:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 01:47:39 -0400 |
commit | dcd32b6a1ffe6c040f8346f7fbaf4318bb8ae41c (patch) | |
tree | 51b06c0bf8bc80dd2a6f9155a4a295f5b0ccdccb /arch/x86/kernel/cpu/amd_64.c | |
parent | 3a27dd1ce5de08e21e0266ddf00e6f1f843bfe8b (diff) |
x86: make 64-bit identify_cpu use cpu_dev
we may need to move some functions to common.c later
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/amd_64.c')
-rw-r--r-- | arch/x86/kernel/cpu/amd_64.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/amd_64.c b/arch/x86/kernel/cpu/amd_64.c index 250bfe6064af..30b7557c9641 100644 --- a/arch/x86/kernel/cpu/amd_64.c +++ b/arch/x86/kernel/cpu/amd_64.c | |||
@@ -7,8 +7,7 @@ | |||
7 | 7 | ||
8 | #include <mach_apic.h> | 8 | #include <mach_apic.h> |
9 | 9 | ||
10 | extern int __cpuinit get_model_name(struct cpuinfo_x86 *c); | 10 | #include "cpu.h" |
11 | extern void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c); | ||
12 | 11 | ||
13 | int force_mwait __cpuinitdata; | 12 | int force_mwait __cpuinitdata; |
14 | 13 | ||
@@ -109,7 +108,7 @@ static void __cpuinit early_init_amd_mc(struct cpuinfo_x86 *c) | |||
109 | #endif | 108 | #endif |
110 | } | 109 | } |
111 | 110 | ||
112 | void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | 111 | static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) |
113 | { | 112 | { |
114 | early_init_amd_mc(c); | 113 | early_init_amd_mc(c); |
115 | 114 | ||
@@ -118,7 +117,7 @@ void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | |||
118 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); | 117 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); |
119 | } | 118 | } |
120 | 119 | ||
121 | void __cpuinit init_amd(struct cpuinfo_x86 *c) | 120 | static void __cpuinit init_amd(struct cpuinfo_x86 *c) |
122 | { | 121 | { |
123 | unsigned level; | 122 | unsigned level; |
124 | 123 | ||
@@ -200,3 +199,13 @@ void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
200 | set_memory_4k((unsigned long)__va(tseg), 1); | 199 | set_memory_4k((unsigned long)__va(tseg), 1); |
201 | } | 200 | } |
202 | } | 201 | } |
202 | |||
203 | static struct cpu_dev amd_cpu_dev __cpuinitdata = { | ||
204 | .c_vendor = "AMD", | ||
205 | .c_ident = { "AuthenticAMD" }, | ||
206 | .c_early_init = early_init_amd, | ||
207 | .c_init = init_amd, | ||
208 | }; | ||
209 | |||
210 | cpu_vendor_dev_register(X86_VENDOR_AMD, &amd_cpu_dev); | ||
211 | |||