RFC [PATCH] x86: trust amd new cpu families
trust family 10h later like K8 Opteron.
Signed-off-by Yinghai Lu <[email protected]>
arch/x86/kernel/apic_32.c +1 -1
@@ -1101,7 +1101,7 @@ static int __init detect_init_APIC(void)switch (boot_cpu_data.x86_vendor) {case X86_VENDOR_AMD :if ((boot_cpu_data.x86 ==6 && boot_cpu_data.x86_model >1 ) || - (boot_cpu_data.x86 ==15 )) + (boot_cpu_data.x86 >=0x0f ))break ; goto no_apic;case X86_VENDOR_INTEL :
arch/x86/kernel/cpu/addon_cpuid_features.c +1 -1
@@ -55,7 +55,7 @@ void __cpuinit validate_pat_support(struct cpuinfo_x86 *c) {switch (c->x86_vendor) {case X86_VENDOR_AMD : -if (c->x86 >=0xf && c->x86 <=0x11 ) +if (c->x86 >=0xf )return ;break ;case X86_VENDOR_INTEL :
arch/x86/kernel/cpu/mcheck/mce_64.c +2 -2
@@ -472,11 +472,11 @@ static void __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c) {/* This should be disabled by the BIOS, but isn't always */ if (c->x86_vendor ==X86_VENDOR_AMD ) { -if (c->x86 ==15 ) +if (c->x86 ==0x0f )/* disable GART TBL walk error reporting, which trips off incorrectly with the IOMMU & 3ware & Cerberus. */ clear_bit (10 , &bank[4 ]); -if (c->x86 <=17 && mce_bootlog <0 ) +if (mce_bootlog <0 )/* Lots of broken BIOS around that don't clear them by default and leave crap in there. Don't log. */ mce_bootlog =0 ;
arch/x86/kernel/cpu/mtrr/generic.c +1 -1
@@ -342,7 +342,7 @@ static void set_fixed_range(int msr, bool *changed, unsigned int *msrwords)if (lo != msrwords[0 ] || hi != msrwords[1 ]) {if (boot_cpu_data.x86_vendor ==X86_VENDOR_AMD && - (boot_cpu_data.x86 >=0x0f && boot_cpu_data.x86 <=0x11 ) && + boot_cpu_data.x86 >=0x0f && ((msrwords[0 ] | msrwords[1 ]) &K8_MTRR_RDMEM_WRMEM_MASK ))k8_enable_fixed_iorrs ();mtrr_wrmsr (msr, msrwords[0 ], msrwords[1 ]);
arch/x86/kernel/cpu/mtrr/main.c +1 -1
@@ -1398,7 +1398,7 @@ int __init amd_special_default_mtrr(void)if (boot_cpu_data.x86_vendor !=X86_VENDOR_AMD )return 0 ; -if (boot_cpu_data.x86 <0xf || boot_cpu_data.x86 >0x11 ) +if (boot_cpu_data.x86 <0xf )return 0 ;/* In case some hypervisor doesn't pass SYSCFG through */ if (rdmsr_safe (MSR_K8_SYSCFG , &l, &h) <0 )
arch/x86/kernel/cpu/perfctr-watchdog.c +1 -2
@@ -618,8 +618,7 @@ static void probe_nmi_watchdog(void) {switch (boot_cpu_data.x86_vendor) {case X86_VENDOR_AMD : -if (boot_cpu_data.x86 !=6 && boot_cpu_data.x86 !=15 && - boot_cpu_data.x86 !=16 ) +if (boot_cpu_data.x86 !=6 && boot_cpu_data.x86 <0x0f )return ; wd_ops = &k7_wd_ops;break ;