Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Thomas Gleixner:
 "A single fix for a APIC regression introduced in 4.0 which went
  undetected until now.

  I screwed up the x2apic cleanup in a subtle way.  The screwup is only
  visible on systems which have x2apic preenabled in the BIOS and need
  to disable it during boot"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/apic: Fix fallout from x2apic cleanup
This commit is contained in:
Linus Torvalds 2015-08-25 09:01:05 -07:00
commit b1713b135f

View file

@ -1424,7 +1424,7 @@ static inline void __x2apic_disable(void)
{
u64 msr;
if (cpu_has_apic)
if (!cpu_has_apic)
return;
rdmsrl(MSR_IA32_APICBASE, msr);
@ -1483,10 +1483,13 @@ void x2apic_setup(void)
static __init void x2apic_disable(void)
{
u32 x2apic_id;
u32 x2apic_id, state = x2apic_state;
if (x2apic_state != X2APIC_ON)
goto out;
x2apic_mode = 0;
x2apic_state = X2APIC_DISABLED;
if (state != X2APIC_ON)
return;
x2apic_id = read_apic_id();
if (x2apic_id >= 255)
@ -1494,9 +1497,6 @@ static __init void x2apic_disable(void)
__x2apic_disable();
register_lapic_address(mp_lapic_addr);
out:
x2apic_state = X2APIC_DISABLED;
x2apic_mode = 0;
}
static __init void x2apic_enable(void)