Commit f926cac3 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] use cpu_has macros

Code cleanup..
parent 88458af4
...@@ -141,7 +141,7 @@ static void __init init_amd(struct cpuinfo_x86 *c) ...@@ -141,7 +141,7 @@ static void __init init_amd(struct cpuinfo_x86 *c)
* here. * here.
*/ */
if (c->x86_model == 6 || c->x86_model == 7) { if (c->x86_model == 6 || c->x86_model == 7) {
if (!test_bit(X86_FEATURE_XMM, c->x86_capability)) { if (!cpu_has(c, X86_FEATURE_XMM)) {
printk(KERN_INFO "Enabling disabled K7/SSE Support.\n"); printk(KERN_INFO "Enabling disabled K7/SSE Support.\n");
rdmsr(MSR_K7_HWCR, l, h); rdmsr(MSR_K7_HWCR, l, h);
l &= ~0x00008000; l &= ~0x00008000;
......
...@@ -62,8 +62,7 @@ int __init ppro_with_ram_bug(void) ...@@ -62,8 +62,7 @@ int __init ppro_with_ram_bug(void)
static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c) static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
{ {
if( test_bit(X86_FEATURE_PN, c->x86_capability) && if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) {
disable_x86_serial_nr ) {
/* Disable processor serial number */ /* Disable processor serial number */
unsigned long lo,hi; unsigned long lo,hi;
rdmsr(MSR_IA32_BBL_CR_CTL,lo,hi); rdmsr(MSR_IA32_BBL_CR_CTL,lo,hi);
...@@ -292,7 +291,7 @@ static void __init init_intel(struct cpuinfo_x86 *c) ...@@ -292,7 +291,7 @@ static void __init init_intel(struct cpuinfo_x86 *c)
strcpy(c->x86_model_id, p); strcpy(c->x86_model_id, p);
#ifdef CONFIG_X86_HT #ifdef CONFIG_X86_HT
if (test_bit(X86_FEATURE_HT, c->x86_capability) && !disable_P4_HT) { if (cpu_has(c, X86_FEATURE_HT) && !disable_P4_HT) {
extern int phys_proc_id[NR_CPUS]; extern int phys_proc_id[NR_CPUS];
u32 eax, ebx, ecx, edx; u32 eax, ebx, ecx, edx;
......
...@@ -66,7 +66,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -66,7 +66,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
else else
seq_printf(m, "stepping\t: unknown\n"); seq_printf(m, "stepping\t: unknown\n");
if ( test_bit(X86_FEATURE_TSC, c->x86_capability) ) { if ( cpu_has(c, X86_FEATURE_TSC) ) {
seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n", seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
cpu_khz / 1000, (cpu_khz % 1000)); cpu_khz / 1000, (cpu_khz % 1000));
} }
......
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