提交 adf85265 编写于 作者: P Paolo Ciarrocchi 提交者: Ingo Molnar

x86: coding style fixes to arch/x86/kernel/cpu/cyrix.c

Before:
   total: 46 errors, 10 warnings, 450 lines checked
After:
   total: 1 errors, 10 warnings, 449 lines checked

No code changed:

arch/x86/kernel/cpu/cyrix.o:

   text	   data	    bss	    dec	    hex	filename
   2048	    908	      4	   2960	    b90	cyrix.o.before
   2048	    908	      4	   2960	    b90	cyrix.o.after

md5:
   9add5e69dbd788f91ff24eea8462dad7  cyrix.o.before.asm
   9add5e69dbd788f91ff24eea8462dad7  cyrix.o.after.asm
Signed-off-by: NPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 7030760a
...@@ -37,8 +37,7 @@ static void __cpuinit do_cyrix_devid(unsigned char *dir0, unsigned char *dir1) ...@@ -37,8 +37,7 @@ static void __cpuinit do_cyrix_devid(unsigned char *dir0, unsigned char *dir1)
setCx86(CX86_CCR2, ccr2); setCx86(CX86_CCR2, ccr2);
*dir0 = 0xfe; *dir0 = 0xfe;
} }
} } else {
else {
setCx86(CX86_CCR3, ccr3); /* restore CCR3 */ setCx86(CX86_CCR3, ccr3); /* restore CCR3 */
/* read DIR0 and DIR1 CPU registers */ /* read DIR0 and DIR1 CPU registers */
...@@ -132,7 +131,7 @@ static void __cpuinit set_cx86_memwb(void) ...@@ -132,7 +131,7 @@ static void __cpuinit set_cx86_memwb(void)
/* set 'Not Write-through' */ /* set 'Not Write-through' */
write_cr0(read_cr0() | X86_CR0_NW); write_cr0(read_cr0() | X86_CR0_NW);
/* CCR2 bit 2: lock NW bit and set WT1 */ /* CCR2 bit 2: lock NW bit and set WT1 */
setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14 ); setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14);
} }
static void __cpuinit set_cx86_inc(void) static void __cpuinit set_cx86_inc(void)
...@@ -187,12 +186,14 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) ...@@ -187,12 +186,14 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
char *buf = c->x86_model_id; char *buf = c->x86_model_id;
const char *p = NULL; const char *p = NULL;
/* Bit 31 in normal CPUID used for nonstandard 3DNow ID; /*
3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ * Bit 31 in normal CPUID used for nonstandard 3DNow ID;
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
*/
clear_bit(0*32+31, c->x86_capability); clear_bit(0*32+31, c->x86_capability);
/* Cyrix used bit 24 in extended (AMD) CPUID for Cyrix MMX extensions */ /* Cyrix used bit 24 in extended (AMD) CPUID for Cyrix MMX extensions */
if ( test_bit(1*32+24, c->x86_capability) ) { if (test_bit(1*32+24, c->x86_capability)) {
clear_bit(1*32+24, c->x86_capability); clear_bit(1*32+24, c->x86_capability);
set_bit(X86_FEATURE_CXMMX, c->x86_capability); set_bit(X86_FEATURE_CXMMX, c->x86_capability);
} }
...@@ -250,16 +251,17 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) ...@@ -250,16 +251,17 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
{ {
u32 vendor, device; u32 vendor, device;
/* It isn't really a PCI quirk directly, but the cure is the /*
same. The MediaGX has deep magic SMM stuff that handles the * It isn't really a PCI quirk directly, but the cure is the
SB emulation. It throws away the fifo on disable_dma() which * same. The MediaGX has deep magic SMM stuff that handles the
is wrong and ruins the audio. * SB emulation. It throws away the fifo on disable_dma() which
* is wrong and ruins the audio.
Bug2: VSA1 has a wrap bug so that using maximum sized DMA *
causes bad things. According to NatSemi VSA2 has another * Bug2: VSA1 has a wrap bug so that using maximum sized DMA
bug to do with 'hlt'. I've not seen any boards using VSA2 * causes bad things. According to NatSemi VSA2 has another
and X doesn't seem to support it either so who cares 8). * bug to do with 'hlt'. I've not seen any boards using VSA2
VSA1 we work around however. * and X doesn't seem to support it either so who cares 8).
* VSA1 we work around however.
*/ */
printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n"); printk(KERN_INFO "Working around Cyrix MediaGX virtual DMA bugs.\n");
...@@ -279,7 +281,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) ...@@ -279,7 +281,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
mark_tsc_unstable("cyrix 5510/5520 detected"); mark_tsc_unstable("cyrix 5510/5520 detected");
} }
#endif #endif
c->x86_cache_size=16; /* Yep 16K integrated cache thats it */ c->x86_cache_size = 16; /* Yep 16K integrated cache thats it */
/* GXm supports extended cpuid levels 'ala' AMD */ /* GXm supports extended cpuid levels 'ala' AMD */
if (c->cpuid_level == 2) { if (c->cpuid_level == 2) {
...@@ -292,12 +294,11 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) ...@@ -292,12 +294,11 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
* ? : 0x7x * ? : 0x7x
* GX1 : 0x8x GX1 datasheet 56 * GX1 : 0x8x GX1 datasheet 56
*/ */
if((0x30 <= dir1 && dir1 <= 0x6f) || (0x80 <=dir1 && dir1 <= 0x8f)) if ((0x30 <= dir1 && dir1 <= 0x6f) || (0x80 <= dir1 && dir1 <= 0x8f))
geode_configure(); geode_configure();
get_model_name(c); /* get CPU marketing name */ get_model_name(c); /* get CPU marketing name */
return; return;
} } else { /* MediaGX */
else { /* MediaGX */
Cx86_cb[2] = (dir0_lsn & 1) ? '3' : '4'; Cx86_cb[2] = (dir0_lsn & 1) ? '3' : '4';
p = Cx86_cb+2; p = Cx86_cb+2;
c->x86_model = (dir1 & 0x20) ? 1 : 2; c->x86_model = (dir1 & 0x20) ? 1 : 2;
...@@ -305,14 +306,11 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) ...@@ -305,14 +306,11 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
break; break;
case 5: /* 6x86MX/M II */ case 5: /* 6x86MX/M II */
if (dir1 > 7) if (dir1 > 7) {
{
dir0_msn++; /* M II */ dir0_msn++; /* M II */
/* Enable MMX extensions (App note 108) */ /* Enable MMX extensions (App note 108) */
setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1); setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1);
} } else {
else
{
c->coma_bug = 1; /* 6x86MX, it has the bug. */ c->coma_bug = 1; /* 6x86MX, it has the bug. */
} }
tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0; tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0;
...@@ -343,7 +341,8 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) ...@@ -343,7 +341,8 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
break; break;
} }
strcpy(buf, Cx86_model[dir0_msn & 7]); strcpy(buf, Cx86_model[dir0_msn & 7]);
if (p) strcat(buf, p); if (p)
strcat(buf, p);
return; return;
} }
...@@ -352,7 +351,8 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) ...@@ -352,7 +351,8 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
*/ */
static void __cpuinit init_nsc(struct cpuinfo_x86 *c) static void __cpuinit init_nsc(struct cpuinfo_x86 *c)
{ {
/* There may be GX1 processors in the wild that are branded /*
* There may be GX1 processors in the wild that are branded
* NSC and not Cyrix. * NSC and not Cyrix.
* *
* This function only handles the GX processor, and kicks every * This function only handles the GX processor, and kicks every
...@@ -398,10 +398,10 @@ static inline int test_cyrix_52div(void) ...@@ -398,10 +398,10 @@ static inline int test_cyrix_52div(void)
return (unsigned char) (test >> 8) == 0x02; return (unsigned char) (test >> 8) == 0x02;
} }
static void __cpuinit cyrix_identify(struct cpuinfo_x86 * c) static void __cpuinit cyrix_identify(struct cpuinfo_x86 *c)
{ {
/* Detect Cyrix with disabled CPUID */ /* Detect Cyrix with disabled CPUID */
if ( c->x86 == 4 && test_cyrix_52div() ) { if (c->x86 == 4 && test_cyrix_52div()) {
unsigned char dir0, dir1; unsigned char dir0, dir1;
strcpy(c->x86_vendor_id, "CyrixInstead"); strcpy(c->x86_vendor_id, "CyrixInstead");
...@@ -413,12 +413,11 @@ static void __cpuinit cyrix_identify(struct cpuinfo_x86 * c) ...@@ -413,12 +413,11 @@ static void __cpuinit cyrix_identify(struct cpuinfo_x86 * c)
do_cyrix_devid(&dir0, &dir1); do_cyrix_devid(&dir0, &dir1);
dir0>>=4; dir0 >>= 4;
/* Check it is an affected model */ /* Check it is an affected model */
if (dir0 == 5 || dir0 == 3) if (dir0 == 5 || dir0 == 3) {
{
unsigned char ccr3; unsigned char ccr3;
unsigned long flags; unsigned long flags;
printk(KERN_INFO "Enabling CPUID on Cyrix processor.\n"); printk(KERN_INFO "Enabling CPUID on Cyrix processor.\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册