aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/amd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r--arch/x86/kernel/cpu/amd.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 1a3e1bb4d758..33d38f8305ee 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -68,7 +68,7 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
68 if (cpuid_eax(0x80000000) >= 0x80000007) { 68 if (cpuid_eax(0x80000000) >= 0x80000007) {
69 c->x86_power = cpuid_edx(0x80000007); 69 c->x86_power = cpuid_edx(0x80000007);
70 if (c->x86_power & (1<<8)) 70 if (c->x86_power & (1<<8))
71 set_bit(X86_FEATURE_CONSTANT_TSC, c->x86_capability); 71 set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
72 } 72 }
73} 73}
74 74
@@ -105,9 +105,9 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
105 105
106 /* 106 /*
107 * Bit 31 in normal CPUID used for nonstandard 3DNow ID; 107 * Bit 31 in normal CPUID used for nonstandard 3DNow ID;
108 * DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway 108 * 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
109 */ 109 */
110 clear_bit(0*32+31, c->x86_capability); 110 clear_cpu_cap(c, 0*32+31);
111 111
112 r = get_model_name(c); 112 r = get_model_name(c);
113 113
@@ -131,8 +131,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
131 if (c->x86_model < 6) { 131 if (c->x86_model < 6) {
132 /* Based on AMD doc 20734R - June 2000 */ 132 /* Based on AMD doc 20734R - June 2000 */
133 if (c->x86_model == 0) { 133 if (c->x86_model == 0) {
134 clear_bit(X86_FEATURE_APIC, c->x86_capability); 134 clear_cpu_cap(c, X86_FEATURE_APIC);
135 set_bit(X86_FEATURE_PGE, c->x86_capability); 135 set_cpu_cap(c, X86_FEATURE_PGE);
136 } 136 }
137 break; 137 break;
138 } 138 }
@@ -208,7 +208,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
208 /* Set MTRR capability flag if appropriate */ 208 /* Set MTRR capability flag if appropriate */
209 if (c->x86_model == 13 || c->x86_model == 9 || 209 if (c->x86_model == 13 || c->x86_model == 9 ||
210 (c->x86_model == 8 && c->x86_mask >= 8)) 210 (c->x86_model == 8 && c->x86_mask >= 8))
211 set_bit(X86_FEATURE_K6_MTRR, c->x86_capability); 211 set_cpu_cap(c, X86_FEATURE_K6_MTRR);
212 break; 212 break;
213 } 213 }
214 214
@@ -231,7 +231,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
231 rdmsr(MSR_K7_HWCR, l, h); 231 rdmsr(MSR_K7_HWCR, l, h);
232 l &= ~0x00008000; 232 l &= ~0x00008000;
233 wrmsr(MSR_K7_HWCR, l, h); 233 wrmsr(MSR_K7_HWCR, l, h);
234 set_bit(X86_FEATURE_XMM, c->x86_capability); 234 set_cpu_cap(c, X86_FEATURE_XMM);
235 } 235 }
236 } 236 }
237 237
@@ -256,14 +256,14 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
256 /* Use K8 tuning for Fam10h and Fam11h */ 256 /* Use K8 tuning for Fam10h and Fam11h */
257 case 0x10: 257 case 0x10:
258 case 0x11: 258 case 0x11:
259 set_bit(X86_FEATURE_K8, c->x86_capability); 259 set_cpu_cap(c, X86_FEATURE_K8);
260 break; 260 break;
261 case 6: 261 case 6:
262 set_bit(X86_FEATURE_K7, c->x86_capability); 262 set_cpu_cap(c, X86_FEATURE_K7);
263 break; 263 break;
264 } 264 }
265 if (c->x86 >= 6) 265 if (c->x86 >= 6)
266 set_bit(X86_FEATURE_FXSAVE_LEAK, c->x86_capability); 266 set_cpu_cap(c, X86_FEATURE_FXSAVE_LEAK);
267 267
268 display_cacheinfo(c); 268 display_cacheinfo(c);
269 269
@@ -304,10 +304,10 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
304 304
305 /* K6s reports MCEs but don't actually have all the MSRs */ 305 /* K6s reports MCEs but don't actually have all the MSRs */
306 if (c->x86 < 6) 306 if (c->x86 < 6)
307 clear_bit(X86_FEATURE_MCE, c->x86_capability); 307 clear_cpu_cap(c, X86_FEATURE_MCE);
308 308
309 if (cpu_has_xmm2) 309 if (cpu_has_xmm2)
310 set_bit(X86_FEATURE_MFENCE_RDTSC, c->x86_capability); 310 set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
311} 311}
312 312
313static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c, unsigned int size) 313static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c, unsigned int size)