|
2 | 2 | #include <linux/bitops.h> |
3 | 3 | #include <linux/mm.h> |
4 | 4 |
|
5 | | -#include <asm/io.h> |
| 5 | +#include <linux/io.h> |
6 | 6 | #include <asm/processor.h> |
7 | 7 | #include <asm/apic.h> |
8 | 8 | #include <asm/cpu.h> |
@@ -45,8 +45,8 @@ static void __cpuinit init_amd_k5(struct cpuinfo_x86 *c) |
45 | 45 | #define CBAR_ENB (0x80000000) |
46 | 46 | #define CBAR_KEY (0X000000CB) |
47 | 47 | if (c->x86_model == 9 || c->x86_model == 10) { |
48 | | - if (inl (CBAR) & CBAR_ENB) |
49 | | - outl (0 | CBAR_KEY, CBAR); |
| 48 | + if (inl(CBAR) & CBAR_ENB) |
| 49 | + outl(0 | CBAR_KEY, CBAR); |
50 | 50 | } |
51 | 51 | } |
52 | 52 |
|
@@ -87,9 +87,10 @@ static void __cpuinit init_amd_k6(struct cpuinfo_x86 *c) |
87 | 87 | d = d2-d; |
88 | 88 |
|
89 | 89 | if (d > 20*K6_BUG_LOOP) |
90 | | - printk("system stability may be impaired when more than 32 MB are used.\n"); |
| 90 | + printk(KERN_CONT |
| 91 | + "system stability may be impaired when more than 32 MB are used.\n"); |
91 | 92 | else |
92 | | - printk("probably OK (after B9730xxxx).\n"); |
| 93 | + printk(KERN_CONT "probably OK (after B9730xxxx).\n"); |
93 | 94 | printk(KERN_INFO "Please see http://membres.lycos.fr/poulot/k6bug.html\n"); |
94 | 95 | } |
95 | 96 |
|
@@ -219,8 +220,9 @@ static void __cpuinit init_amd_k7(struct cpuinfo_x86 *c) |
219 | 220 | if ((c->x86_model == 8 && c->x86_mask >= 1) || (c->x86_model > 8)) { |
220 | 221 | rdmsr(MSR_K7_CLK_CTL, l, h); |
221 | 222 | if ((l & 0xfff00000) != 0x20000000) { |
222 | | - printk ("CPU: CLK_CTL MSR was %x. Reprogramming to %x\n", l, |
223 | | - ((l & 0x000fffff)|0x20000000)); |
| 223 | + printk(KERN_INFO |
| 224 | + "CPU: CLK_CTL MSR was %x. Reprogramming to %x\n", |
| 225 | + l, ((l & 0x000fffff)|0x20000000)); |
224 | 226 | wrmsr(MSR_K7_CLK_CTL, (l & 0x000fffff)|0x20000000, h); |
225 | 227 | } |
226 | 228 | } |
@@ -398,7 +400,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) |
398 | 400 | u32 level; |
399 | 401 |
|
400 | 402 | level = cpuid_eax(1); |
401 | | - if((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58) |
| 403 | + if ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58) |
402 | 404 | set_cpu_cap(c, X86_FEATURE_REP_GOOD); |
403 | 405 | } |
404 | 406 | if (c->x86 == 0x10 || c->x86 == 0x11) |
@@ -487,27 +489,30 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) |
487 | 489 | * benefit in doing so. |
488 | 490 | */ |
489 | 491 | if (!rdmsrl_safe(MSR_K8_TSEG_ADDR, &tseg)) { |
490 | | - printk(KERN_DEBUG "tseg: %010llx\n", tseg); |
491 | | - if ((tseg>>PMD_SHIFT) < |
| 492 | + printk(KERN_DEBUG "tseg: %010llx\n", tseg); |
| 493 | + if ((tseg>>PMD_SHIFT) < |
492 | 494 | (max_low_pfn_mapped>>(PMD_SHIFT-PAGE_SHIFT)) || |
493 | | - ((tseg>>PMD_SHIFT) < |
| 495 | + ((tseg>>PMD_SHIFT) < |
494 | 496 | (max_pfn_mapped>>(PMD_SHIFT-PAGE_SHIFT)) && |
495 | | - (tseg>>PMD_SHIFT) >= (1ULL<<(32 - PMD_SHIFT)))) |
496 | | - set_memory_4k((unsigned long)__va(tseg), 1); |
| 497 | + (tseg>>PMD_SHIFT) >= (1ULL<<(32 - PMD_SHIFT)))) |
| 498 | + set_memory_4k((unsigned long)__va(tseg), 1); |
497 | 499 | } |
498 | 500 | } |
499 | 501 | #endif |
500 | 502 | } |
501 | 503 |
|
502 | 504 | #ifdef CONFIG_X86_32 |
503 | | -static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c, unsigned int size) |
| 505 | +static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c, |
| 506 | + unsigned int size) |
504 | 507 | { |
505 | 508 | /* AMD errata T13 (order #21922) */ |
506 | 509 | if ((c->x86 == 6)) { |
507 | | - if (c->x86_model == 3 && c->x86_mask == 0) /* Duron Rev A0 */ |
| 510 | + /* Duron Rev A0 */ |
| 511 | + if (c->x86_model == 3 && c->x86_mask == 0) |
508 | 512 | size = 64; |
| 513 | + /* Tbird rev A1/A2 */ |
509 | 514 | if (c->x86_model == 4 && |
510 | | - (c->x86_mask == 0 || c->x86_mask == 1)) /* Tbird rev A1/A2 */ |
| 515 | + (c->x86_mask == 0 || c->x86_mask == 1)) |
511 | 516 | size = 256; |
512 | 517 | } |
513 | 518 | return size; |
|
0 commit comments