diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-06 14:24:21 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-03-06 14:24:21 +0100 |
commit | 4fda87df09bee2b1bf236aba408c3236d4f1fbca (patch) | |
tree | f1ec4a5b8696c89141bcdc25b6920b3caf5c9f97 /arch/x86/xen/enlighten.c | |
parent | 70658b99490dd86cfdbf4fca117bbe2ef9a80d03 (diff) | |
parent | 3b8f4a70b840cff298010481d39404e9c39030d1 (diff) |
Merge tag 'asoc-fix-v4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linussound-4.0-rc3
ASoC: Fixes for v4.0
A few driver specific fixes here, none of them earth shattering in
themselves, that have accumliated since the opening of the merge window.
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r-- | arch/x86/xen/enlighten.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index bd8b8459c3d0..5240f563076d 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1070,6 +1070,23 @@ static inline void xen_write_cr8(unsigned long val) BUG_ON(val); } #endif + +static u64 xen_read_msr_safe(unsigned int msr, int *err) +{ + u64 val; + + val = native_read_msr_safe(msr, err); + switch (msr) { + case MSR_IA32_APICBASE: +#ifdef CONFIG_X86_X2APIC + if (!(cpuid_ecx(1) & (1 << (X86_FEATURE_X2APIC & 31)))) +#endif + val &= ~X2APIC_ENABLE; + break; + } + return val; +} + static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high) { int ret; @@ -1240,7 +1257,7 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .wbinvd = native_wbinvd, - .read_msr = native_read_msr_safe, + .read_msr = xen_read_msr_safe, .write_msr = xen_write_msr_safe, .read_tsc = native_read_tsc, @@ -1741,6 +1758,7 @@ asmlinkage __visible void __init xen_start_kernel(void) #ifdef CONFIG_X86_32 i386_start_kernel(); #else + cr4_init_shadow(); /* 32b kernel does this in i386_start_kernel() */ x86_64_start_reservations((char *)__pa_symbol(&boot_params)); #endif } |