Merge branch 'x86/cpu' into x86/asm, to merge more patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -1561,7 +1561,7 @@ void __init check_x2apic(void)
|
||||
pr_info("x2apic: enabled by BIOS, switching to x2apic ops\n");
|
||||
x2apic_mode = 1;
|
||||
x2apic_state = X2APIC_ON;
|
||||
} else if (!cpu_has_x2apic) {
|
||||
} else if (!boot_cpu_has(X86_FEATURE_X2APIC)) {
|
||||
x2apic_state = X2APIC_DISABLED;
|
||||
}
|
||||
}
|
||||
|
@@ -751,7 +751,7 @@ static void init_amd(struct cpuinfo_x86 *c)
|
||||
if (c->x86 >= 0xf)
|
||||
set_cpu_cap(c, X86_FEATURE_K8);
|
||||
|
||||
if (cpu_has_xmm2) {
|
||||
if (cpu_has(c, X86_FEATURE_XMM2)) {
|
||||
/* MFENCE stops RDTSC speculation */
|
||||
set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
|
||||
}
|
||||
|
@@ -152,9 +152,9 @@ static void early_init_intel(struct cpuinfo_x86 *c)
|
||||
* the TLB when any changes are made to any of the page table entries.
|
||||
* The operating system must reload CR3 to cause the TLB to be flushed"
|
||||
*
|
||||
* As a result cpu_has_pge() in arch/x86/include/asm/tlbflush.h should
|
||||
* be false so that __flush_tlb_all() causes CR3 insted of CR4.PGE
|
||||
* to be modified
|
||||
* As a result, boot_cpu_has(X86_FEATURE_PGE) in arch/x86/include/asm/tlbflush.h
|
||||
* should be false so that __flush_tlb_all() causes CR3 insted of CR4.PGE
|
||||
* to be modified.
|
||||
*/
|
||||
if (c->x86 == 5 && c->x86_model == 9) {
|
||||
pr_info("Disabling PGE capability bit\n");
|
||||
@@ -456,7 +456,7 @@ static void init_intel(struct cpuinfo_x86 *c)
|
||||
set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);
|
||||
}
|
||||
|
||||
if (cpu_has_xmm2)
|
||||
if (cpu_has(c, X86_FEATURE_XMM2))
|
||||
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
|
||||
|
||||
if (boot_cpu_has(X86_FEATURE_DS)) {
|
||||
@@ -468,7 +468,7 @@ static void init_intel(struct cpuinfo_x86 *c)
|
||||
set_cpu_cap(c, X86_FEATURE_PEBS);
|
||||
}
|
||||
|
||||
if (c->x86 == 6 && cpu_has_clflush &&
|
||||
if (c->x86 == 6 && boot_cpu_has(X86_FEATURE_CLFLUSH) &&
|
||||
(c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
|
||||
set_cpu_bug(c, X86_BUG_CLFLUSH_MONITOR);
|
||||
|
||||
|
@@ -137,7 +137,7 @@ static void prepare_set(void)
|
||||
u32 cr0;
|
||||
|
||||
/* Save value of CR4 and clear Page Global Enable (bit 7) */
|
||||
if (cpu_has_pge) {
|
||||
if (boot_cpu_has(X86_FEATURE_PGE)) {
|
||||
cr4 = __read_cr4();
|
||||
__write_cr4(cr4 & ~X86_CR4_PGE);
|
||||
}
|
||||
@@ -170,7 +170,7 @@ static void post_set(void)
|
||||
write_cr0(read_cr0() & ~X86_CR0_CD);
|
||||
|
||||
/* Restore value of CR4 */
|
||||
if (cpu_has_pge)
|
||||
if (boot_cpu_has(X86_FEATURE_PGE))
|
||||
__write_cr4(cr4);
|
||||
}
|
||||
|
||||
|
@@ -741,7 +741,7 @@ static void prepare_set(void) __acquires(set_atomicity_lock)
|
||||
wbinvd();
|
||||
|
||||
/* Save value of CR4 and clear Page Global Enable (bit 7) */
|
||||
if (cpu_has_pge) {
|
||||
if (boot_cpu_has(X86_FEATURE_PGE)) {
|
||||
cr4 = __read_cr4();
|
||||
__write_cr4(cr4 & ~X86_CR4_PGE);
|
||||
}
|
||||
@@ -771,7 +771,7 @@ static void post_set(void) __releases(set_atomicity_lock)
|
||||
write_cr0(read_cr0() & ~X86_CR0_CD);
|
||||
|
||||
/* Restore value of CR4 */
|
||||
if (cpu_has_pge)
|
||||
if (boot_cpu_has(X86_FEATURE_PGE))
|
||||
__write_cr4(cr4);
|
||||
raw_spin_unlock(&set_atomicity_lock);
|
||||
}
|
||||
|
@@ -94,7 +94,7 @@ static void __init vmware_platform_setup(void)
|
||||
*/
|
||||
static uint32_t __init vmware_platform(void)
|
||||
{
|
||||
if (cpu_has_hypervisor) {
|
||||
if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) {
|
||||
unsigned int eax;
|
||||
unsigned int hyper_vendor_id[3];
|
||||
|
||||
|
@@ -522,7 +522,7 @@ static noinline uint32_t __kvm_cpuid_base(void)
|
||||
if (boot_cpu_data.cpuid_level < 0)
|
||||
return 0; /* So we don't blow up on old processors */
|
||||
|
||||
if (cpu_has_hypervisor)
|
||||
if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
|
||||
return hypervisor_cpuid_base("KVMKVMKVM\0\0\0", 0);
|
||||
|
||||
return 0;
|
||||
|
@@ -40,7 +40,7 @@
|
||||
static inline void flush_tce(void* tceaddr)
|
||||
{
|
||||
/* a single tce can't cross a cache line */
|
||||
if (cpu_has_clflush)
|
||||
if (boot_cpu_has(X86_FEATURE_CLFLUSH))
|
||||
clflush(tceaddr);
|
||||
else
|
||||
wbinvd();
|
||||
|
Reference in New Issue
Block a user