linux/arch/x86
Yinghai Lu 4401da6111 x86: read apic ID in the !acpi_lapic case
Ed found that on 32-bit, boot_cpu_physical_apicid is not read right,
when the mptable is broken.

Interestingly, actually three paths use/set it:

 1. acpi: at that time that is already read from reg
 2. mptable: only read from mptable
 3. no madt, and no mptable, that use default apic id 0 for 64-bit, -1 for 32-bit

so we could read the apic id for the 2/3 path. We trust the hardware
register more than we trust a BIOS data structure (the mptable).

We can also avoid the double set_fixmap() when acpi_lapic
is used, and also need to move cpu_has_apic earlier and
call apic_disable().

Also when need to update the apic id, we'd better read and
set the apic version as well - so that quirks are applied precisely.

v2: make path 3 with 64bit, use -1 as apic id, so could read it later.
v3: fix whitespace problem pointed out by Ed Swierk

[ Impact: get correct apic id for bsp other than acpi path ]

Reported-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
LKML-Reference: <49FC85A9.2070702@kernel.org>
[ v4: sanity-check in the ACPI case too ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-05-11 11:29:23 +02:00
..
boot x86, setup: un-resequence mode setting for VGA 80x34 and 80x60 modes 2009-04-07 10:59:25 -07:00
configs
crypto
ia32 Separate out common fstatat code into vfs_fstatat 2009-04-20 23:02:51 -04:00
include/asm Merge commit 'v2.6.30-rc5' into x86/apic 2009-05-11 09:50:02 +02:00
kernel x86: read apic ID in the !acpi_lapic case 2009-05-11 11:29:23 +02:00
kvm KVM: Unregister cpufreq notifier on unload 2009-04-22 13:54:33 +03:00
lguest clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
lib
math-emu Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
mm x86-64: finish cleanup_highmaps()'s job wrt. _brk_end 2009-05-07 21:51:34 -07:00
oprofile cpumask: x86: convert cpu_sibling_map/cpu_core_map to cpumask_var_t 2009-03-13 14:49:50 +10:30
pci x86/PCI: don't bother with root quirks if _CRS is used 2009-04-22 15:06:29 -07:00
power x86: disable stack-protector for __restore_processor_state() 2009-04-03 19:48:41 +02:00
vdso x86: gettimeofday() vDSO: fix segfault when tv == NULL 2009-04-30 12:31:45 +02:00
video
xen x86: xen, i386: reserve Xen pagetables 2009-05-08 10:49:11 +02:00
Kconfig Merge commit 'v2.6.30-rc5' into x86/apic 2009-05-11 09:50:02 +02:00
Kconfig.cpu x86: disable X86_PTRACE_BTS for now 2009-04-15 23:15:14 +02:00
Kconfig.debug generic debug pagealloc: build fix 2009-04-02 19:04:48 -07:00
Makefile x86, kbuild: make "make install" not depend on vmlinux 2009-04-17 22:43:12 +02:00
Makefile_32.cpu