linux-stable/arch/x86/kernel/apic
Thomas Gleixner f7ccadac2d x86/apic: Clear stale x2apic mode
If x2apic got disabled on the kernel command line, then the following
issue can happen:

enable_IR_x2apic()
   ....
   x2apic_mode = 1;
   enable_x2apic();

     if (x2apic_disabled) {
	__disable_x2apic();
	return;
     }

That leaves X2APIC disabled in hardware, but x2apic_mode stays 1. So
all other code which checks x2apic_mode gets the wrong information.

Set x2apic_mode to 0 after disabling it in hardware.

This is just a hotfix. The proper solution is to rework this code so
it has seperate functions for the initial setup on the boot processor
and the secondary cpus, but that's beyond the scope of this fix.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: iommu@lists.linux-foundation.org
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: David Rientjes <rientjes@google.com>
Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Oren Twaig <oren@scalemp.com>
2015-01-15 11:24:22 +01:00
..
apic.c x86/apic: Clear stale x2apic mode 2015-01-15 11:24:22 +01:00
apic_flat_64.c x86, apic: Remove enable_apic_mode callback 2014-07-31 08:05:44 -07:00
apic_noop.c x86, apic: Remove enable_apic_mode callback 2014-07-31 08:05:44 -07:00
apic_numachip.c x86: numachip: APIC driver cleanups 2014-11-04 18:17:27 +01:00
bigsmp_32.c x86, apic: Remove enable_apic_mode callback 2014-07-31 08:05:44 -07:00
htirq.c x86, irq: Use helpers to access irq_cfg data structure associated with IRQ 2014-12-16 14:08:17 +01:00
hw_nmi.c x86/nmi: Fix use of unallocated cpumask_var_t 2014-11-25 14:15:30 -05:00
io_apic.c x86, irq: Use helpers to access irq_cfg data structure associated with IRQ 2014-12-16 14:08:17 +01:00
ipi.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
Makefile x86, irq: Move HT IRQ related code from io_apic.c into htirq.c 2014-12-16 14:08:17 +01:00
msi.c x86, irq: Use helpers to access irq_cfg data structure associated with IRQ 2014-12-16 14:08:17 +01:00
probe_32.c x86, apic: Remove enable_apic_mode callback 2014-07-31 08:05:44 -07:00
probe_64.c
vector.c x86, irq: Use helpers to access irq_cfg data structure associated with IRQ 2014-12-16 14:08:17 +01:00
x2apic_cluster.c percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t -fix 2014-09-09 07:17:43 +09:00
x2apic_phys.c x86, apic: Remove enable_apic_mode callback 2014-07-31 08:05:44 -07:00
x2apic_uv_x.c Merge branches 'x86-ras-for-linus', 'x86-uv-for-linus' and 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-10-14 02:31:22 +02:00