Commit bfe4bb15 authored by Miklos Vajna's avatar Miklos Vajna Committed by Thomas Gleixner

x86: janitor work in bugs.c

Just moved trailing statements to the next line, removed space before
open/close parenthesis, wrapped long lines.
Signed-off-by: default avatarMiklos Vajna <vmiklos@frugalware.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 23eb271b
...@@ -59,8 +59,12 @@ static void __init check_fpu(void) ...@@ -59,8 +59,12 @@ static void __init check_fpu(void)
return; return;
} }
/* trap_init() enabled FXSR and company _before_ testing for FP problems here. */ /*
/* Test for the divl bug.. */ * trap_init() enabled FXSR and company _before_ testing for FP
* problems here.
*
* Test for the divl bug..
*/
__asm__("fninit\n\t" __asm__("fninit\n\t"
"fldl %1\n\t" "fldl %1\n\t"
"fdivl %2\n\t" "fdivl %2\n\t"
...@@ -108,10 +112,15 @@ static void __init check_popad(void) ...@@ -108,10 +112,15 @@ static void __init check_popad(void)
"movl $12345678,%%eax; movl $0,%%edi; pusha; popa; movl (%%edx,%%edi),%%ecx " "movl $12345678,%%eax; movl $0,%%edi; pusha; popa; movl (%%edx,%%edi),%%ecx "
: "=&a" (res) : "=&a" (res)
: "d" (inp) : "d" (inp)
: "ecx", "edi" ); : "ecx", "edi");
/* If this fails, it means that any user program may lock the CPU hard. Too bad. */ /*
if (res != 12345678) printk( "Buggy.\n" ); * If this fails, it means that any user program may lock the
else printk( "OK.\n" ); * CPU hard. Too bad.
*/
if (res != 12345678)
printk("Buggy.\n");
else
printk("OK.\n");
#endif #endif
} }
...@@ -137,7 +146,8 @@ static void __init check_config(void) ...@@ -137,7 +146,8 @@ static void __init check_config(void)
* i486+ only features! (WP works in supervisor mode and the * i486+ only features! (WP works in supervisor mode and the
* new "invlpg" and "bswap" instructions) * new "invlpg" and "bswap" instructions)
*/ */
#if defined(CONFIG_X86_WP_WORKS_OK) || defined(CONFIG_X86_INVLPG) || defined(CONFIG_X86_BSWAP) #if defined(CONFIG_X86_WP_WORKS_OK) || defined(CONFIG_X86_INVLPG) || \
defined(CONFIG_X86_BSWAP)
if (boot_cpu_data.x86 == 3) if (boot_cpu_data.x86 == 3)
panic("Kernel requires i486+ for 'invlpg' and other features"); panic("Kernel requires i486+ for 'invlpg' and other features");
#endif #endif
...@@ -170,6 +180,7 @@ void __init check_bugs(void) ...@@ -170,6 +180,7 @@ void __init check_bugs(void)
check_fpu(); check_fpu();
check_hlt(); check_hlt();
check_popad(); check_popad();
init_utsname()->machine[1] = '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86); init_utsname()->machine[1] =
'0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86);
alternative_instructions(); alternative_instructions();
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment