提交 fb3bbd6a 编写于 作者: Y Yinghai Lu 提交者: Thomas Gleixner

x86: fix APIC warning on 32bit v2

for http://bugzilla.kernel.org/show_bug.cgi?id=10613

BIOS bug, APIC version is 0 for CPU#0! fixing up to 0x10. (tell your hw vendor)

v2: fix 64 bit compilation
Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Gabriel C <nix.or.die@googlemail.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 c3b25b32
...@@ -242,12 +242,19 @@ static int __init acpi_parse_madt(struct acpi_table_header *table) ...@@ -242,12 +242,19 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
static void __cpuinit acpi_register_lapic(int id, u8 enabled) static void __cpuinit acpi_register_lapic(int id, u8 enabled)
{ {
unsigned int ver = 0;
if (!enabled) { if (!enabled) {
++disabled_cpus; ++disabled_cpus;
return; return;
} }
generic_processor_info(id, 0); #ifdef CONFIG_X86_32
if (boot_cpu_physical_apicid != -1U)
ver = apic_version[boot_cpu_physical_apicid];
#endif
generic_processor_info(id, ver);
} }
static int __init static int __init
...@@ -767,8 +774,13 @@ static void __init acpi_register_lapic_address(unsigned long address) ...@@ -767,8 +774,13 @@ static void __init acpi_register_lapic_address(unsigned long address)
mp_lapic_addr = address; mp_lapic_addr = address;
set_fixmap_nocache(FIX_APIC_BASE, address); set_fixmap_nocache(FIX_APIC_BASE, address);
if (boot_cpu_physical_apicid == -1U) if (boot_cpu_physical_apicid == -1U) {
boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
#ifdef CONFIG_X86_32
apic_version[boot_cpu_physical_apicid] =
GET_APIC_VERSION(apic_read(APIC_LVR));
#endif
}
} }
static int __init early_acpi_parse_madt_lapic_addr_ovr(void) static int __init early_acpi_parse_madt_lapic_addr_ovr(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册