set-bit cleanup I: x86_capability.
Subsystems (2)
PATCH 1/1 set-bit cleanup I: x86_capability.
Cosmetic change: x86_capability. Makes it an unsigned long, and removes the gratuitous & operators (it is already an array). These produce warnings when set_bit() etc. takes an unsigned long * instead of a void *.
No object code changes,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
include/asm-i386/processor.h +1 -1
@@ -40,7 +40,7 @@char hard_math;char rfu;int cpuid_level;/* Maximum supported CPUID level, -1=no CPUID */ -__u32 x86_capability[NCAPINTS ]; +unsigned long x86_capability[NCAPINTS ];char x86_vendor_id[16 ];char x86_model_id[64 ];int x86_cache_size;/* in KB - valid for CPUS which support this
arch/i386/kernel/apic.c +1 -1
@@ -634,7 +634,7 @@printk ("Could not enable APIC!\n" );return -1 ; } -set_bit (X86_FEATURE_APIC , &boot_cpu_data.x86_capability); +set_bit (X86_FEATURE_APIC , boot_cpu_data.x86_capability); mp_lapic_addr =APIC_DEFAULT_PHYS_BASE ; boot_cpu_physical_apicid =0 ;if (nmi_watchdog !=NMI_NONE )
arch/i386/kernel/bluesmoke.c +2 -2
@@ -123,7 +123,7 @@* Check for MCE support */ -if ( !test_bit (X86_FEATURE_MCE , &c->x86_capability) ) +if ( !test_bit (X86_FEATURE_MCE , c->x86_capability) )return ;/*
@@ -153,7 +153,7 @@* Check for PPro style MCA */ -if ( !test_bit (X86_FEATURE_MCA , &c->x86_capability) ) +if ( !test_bit (X86_FEATURE_MCA , c->x86_capability) )return ;/* Ok machine check is available */
arch/i386/kernel/mtrr.c +6 -6
@@ -387,7 +387,7 @@return ;/* Save value of CR4 and clear Page Global Enable (bit 7) */ -if (test_bit (X86_FEATURE_PGE , &boot_cpu_data.x86_capability) ) { +if (test_bit (X86_FEATURE_PGE , boot_cpu_data.x86_capability) ) { ctxt->cr4val =read_cr4 ();write_cr4 (ctxt->cr4val & (unsigned char ) ~(1 <<7 )); }
@@ -448,7 +448,7 @@write_cr0 (read_cr0 () &0xbfffffff );/* Restore value of CR4 */ -if (test_bit (X86_FEATURE_PGE , &boot_cpu_data.x86_capability) ) +if (test_bit (X86_FEATURE_PGE , boot_cpu_data.x86_capability) )write_cr4 (ctxt->cr4val);/* Re-enable interrupts locally (if enabled previously) */
@@ -2123,7 +2123,7 @@static int __init mtrr_setup (void ) { -if (test_bit (X86_FEATURE_MTRR , &boot_cpu_data.x86_capability) ) { +if (test_bit (X86_FEATURE_MTRR , boot_cpu_data.x86_capability) ) {/* Intel (P6) standard MTRRs */ mtrr_if =MTRR_IF_INTEL ; get_mtrr = intel_get_mtrr;
@@ -2167,14 +2167,14 @@break ; } - }else if (test_bit (X86_FEATURE_K6_MTRR , &boot_cpu_data.x86_capability) ) { + }else if (test_bit (X86_FEATURE_K6_MTRR , boot_cpu_data.x86_capability) ) {/* Pre-Athlon (K6) AMD CPU MTRRs */ mtrr_if =MTRR_IF_AMD_K6 ; get_mtrr = amd_get_mtrr; set_mtrr_up = amd_set_mtrr_up; size_or_mask =0xfff00000 ;/* 32 bits */ size_and_mask =0 ; - }else if (test_bit (X86_FEATURE_CYRIX_ARR , &boot_cpu_data.x86_capability) ) { + }else if (test_bit (X86_FEATURE_CYRIX_ARR , boot_cpu_data.x86_capability) ) {/* Cyrix ARRs */ mtrr_if =MTRR_IF_CYRIX_ARR ; get_mtrr = cyrix_get_arr;
@@ -2183,7 +2183,7 @@cyrix_arr_init (); size_or_mask =0xfff00000 ;/* 32 bits */ size_and_mask =0 ; - }else if (test_bit (X86_FEATURE_CENTAUR_MCR , &boot_cpu_data.x86_capability) ) { + }else if (test_bit (X86_FEATURE_CENTAUR_MCR , boot_cpu_data.x86_capability) ) {/* Centaur MCRs */ mtrr_if =MTRR_IF_CENTAUR_MCR ; get_mtrr = centaur_get_mcr;
arch/i386/kernel/setup.c +35 -35
235 lines not on this page · raw message
drivers/char/mem.c +4 -4
@@ -173,10 +173,10 @@* caching for the high addresses through the KEN pin, but * we maintain the tradition of paranoia in this code. */ -return !(test_bit (X86_FEATURE_MTRR , &boot_cpu_data.x86_capability) || -test_bit (X86_FEATURE_K6_MTRR , &boot_cpu_data.x86_capability) || -test_bit (X86_FEATURE_CYRIX_ARR , &boot_cpu_data.x86_capability) || -test_bit (X86_FEATURE_CENTAUR_MCR , &boot_cpu_data.x86_capability) ) +return !(test_bit (X86_FEATURE_MTRR , boot_cpu_data.x86_capability) || +test_bit (X86_FEATURE_K6_MTRR , boot_cpu_data.x86_capability) || +test_bit (X86_FEATURE_CYRIX_ARR , boot_cpu_data.x86_capability) || +test_bit (X86_FEATURE_CENTAUR_MCR , boot_cpu_data.x86_capability) ) && addr >=__pa (high_memory);#else return addr >=__pa (high_memory);
drivers/char/random.c +1 -1
@@ -736,7 +736,7 @@int entropy =0 ;#if defined (__i386__) -if (test_bit (X86_FEATURE_TSC , &boot_cpu_data.x86_capability) ) { +if (test_bit (X86_FEATURE_TSC , boot_cpu_data.x86_capability) ) {__u32 high;rdtsc (time, high); num ^= high;
include/asm-i386/bugs.h +1 -1
@@ -194,7 +194,7 @@*/ #if defined(CONFIG_X86_LOCAL_APIC ) && defined(CONFIG_X86_GOOD_APIC )if (boot_cpu_data.x86_vendor ==X86_VENDOR_INTEL - &&test_bit (X86_FEATURE_APIC , &boot_cpu_data.x86_capability) + &&test_bit (X86_FEATURE_APIC , boot_cpu_data.x86_capability) && boot_cpu_data.x86 ==5 && boot_cpu_data.x86_model ==2 && (boot_cpu_data.x86_mask <6 || boot_cpu_data.x86_mask ==11 ))