linux/arch/x86/kernel
Yinghai Lu fd19dce7ac x86: Fix x2apic preenabled system with kexec
Found one x2apic system kexec loop test failed
when CONFIG_NMI_WATCHDOG=y (old) or CONFIG_LOCKUP_DETECTOR=y (current tip)

first kernel can kexec second kernel, but second kernel can not kexec third one.

it can be duplicated on another system with BIOS preenabled x2apic.
First kernel can not kexec second kernel.

It turns out, when kernel boot with pre-enabled x2apic, it will not execute
disable_local_APIC on shutdown path.

when init_apic_mappings() is called in setup_arch, it will skip setting of
apic_phys when x2apic_mode is set. ( x2apic_mode is much early check_x2apic())
Then later, disable_local_APIC() will bail out early because !apic_phys.

So check !x2apic_mode in x2apic_mode in disable_local_APIC with !apic_phys.

another solution could be updating init_apic_mappings() to set apic_phys even
for preenabled x2apic system. Actually even for x2apic system, that lapic
address is mapped already in early stage.

BTW: is there any x2apic preenabled system with apicid of boot cpu > 255?

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4C3EB22B.3000701@kernel.org>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: stable@kernel.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-07-16 16:49:41 -07:00
..
acpi x86, irq: Rename gsi_end gsi_top, and fix off by one errors 2010-06-09 13:34:06 -07:00
apic x86: Fix x2apic preenabled system with kexec 2010-07-16 16:49:41 -07:00
cpu Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-07-04 20:20:53 -07:00
.gitignore
alternative.c
amd_iommu_init.c x86/amd-iommu: Fall back to GART if initialization fails 2010-06-01 10:20:15 +02:00
amd_iommu.c x86/amd-iommu: Fall back to GART if initialization fails 2010-06-01 10:20:15 +02:00
apb_timer.c
aperture_64.c
apm_32.c
asm-offsets_32.c
asm-offsets_64.c
asm-offsets.c
audit_64.c
bios_uv.c
bootflag.c
check.c
cpuid.c x86: convert cpu notifier to return encapsulate errno value 2010-05-27 09:12:48 -07:00
crash_dump_32.c
crash_dump_64.c
crash.c
doublefault_32.c
dumpstack_32.c
dumpstack_64.c
dumpstack.c
dumpstack.h
e820.c suspend: Move NVS save/restore code to generic suspend functionality 2010-06-10 11:02:34 -04:00
early_printk.c earlyprintk,vga,kdb: Fix \b and \r for earlyprintk=vga with kdb 2010-05-20 21:04:31 -05:00
early-quirks.c x86: Force HPET readback_cmp for all ATI chipsets 2010-07-15 17:10:02 +02:00
efi_32.c
efi_64.c
efi_stub_32.S
efi_stub_64.S
efi.c
entry_32.S
entry_64.S
ftrace.c
head32.c
head64.c
head_32.S
head_64.S
head.c
hpet.c
hw_breakpoint.c
i386_ksyms_32.c
i387.c
i8237.c
i8253.c
i8259.c
init_task.c
io_delay.c
ioport.c
irq_32.c
irq_64.c
irq.c
irqinit.c
k8.c
kdebugfs.c
kgdb.c x86,kgdb: Implement early hardware breakpoint debugging 2010-05-20 21:04:30 -05:00
kprobes.c Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:19:03 -07:00
kvm.c
kvmclock.c x86, paravirt: don't compute pvclock adjustments if we trust the tsc 2010-05-19 11:41:05 +03:00
ldt.c
machine_kexec_32.c
machine_kexec_64.c
Makefile
mca_32.c
microcode_amd.c
microcode_core.c driver core: add devname module aliases to allow module on-demand auto-loading 2010-05-25 15:08:26 -07:00
microcode_intel.c
mmconf-fam10h_64.c
module.c
mpparse.c x86, irq: Rename gsi_end gsi_top, and fix off by one errors 2010-06-09 13:34:06 -07:00
mrst.c x86, mrst: Add i8042_detect API for Moorestwon platform 2010-07-07 17:05:06 -07:00
msr.c x86: convert cpu notifier to return encapsulate errno value 2010-05-27 09:12:48 -07:00
olpc.c
paravirt_patch_32.c
paravirt_patch_64.c
paravirt-spinlocks.c
paravirt.c
pci-calgary_64.c x86, Calgary: Limit the max PHB number to 256 2010-06-30 22:41:42 -07:00
pci-dma.c
pci-gart_64.c
pci-nommu.c
pci-swiotlb.c x86: remove unnecessary sync_single_range_* in swiotlb_dma_ops 2010-05-27 09:12:52 -07:00
pcspeaker.c
pmtimer_64.c
probe_roms_32.c
process_32.c Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:58:16 -07:00
process_64.c Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:58:16 -07:00
process.c Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 08:58:16 -07:00
ptrace.c
pvclock.c x86, paravirt: don't compute pvclock adjustments if we trust the tsc 2010-05-19 11:41:05 +03:00
quirks.c x86: Force HPET readback_cmp for all ATI chipsets 2010-07-15 17:10:02 +02:00
reboot_fixups_32.c
reboot.c x86: Fix rebooting on Dell Precision WorkStation T7400 2010-06-20 09:24:13 +02:00
relocate_kernel_32.S
relocate_kernel_64.S
rtc.c
scx200_32.c
setup_percpu.c Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-06-03 15:47:22 -07:00
setup.c x86, setup: Phoenix BIOS fixup is needed on Dell Inspiron Mini 1012 2010-05-24 13:33:14 -07:00
sfi.c x86, irq: Rename gsi_end gsi_top, and fix off by one errors 2010-06-09 13:34:06 -07:00
signal.c
smp.c
smpboot.c x86, smpboot: Fix cores per node printing on boot 2010-06-02 09:38:53 +02:00
stacktrace.c
step.c
sys_i386_32.c
sys_x86_64.c
syscall_64.c
syscall_table_32.S
tboot.c Merge branch 'kvm-updates/2.6.35' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2010-05-21 17:16:21 -07:00
tce_64.c
test_nx.c
test_rodata.c
time.c
tlb_uv.c Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 09:46:35 -07:00
tls.c
tls.h
topology.c
trampoline_32.S
trampoline_64.S
trampoline.c
traps.c x86: Send a SIGTRAP for user icebp traps 2010-06-30 16:16:20 +02:00
tsc_sync.c
tsc.c
uv_irq.c Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-18 09:46:35 -07:00
uv_sysfs.c
uv_time.c
verify_cpu_64.S
visws_quirks.c
vm86_32.c
vmi_32.c
vmiclock_32.c
vmlinux.lds.S Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
vsmp_64.c
vsyscall_64.c
x86_init.c x86: Add i8042 pre-detection hook to x86_platform_ops 2010-07-07 17:05:06 -07:00
x8664_ksyms_64.c
xsave.c