public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: fix APIC warning on 32bit
@ 2008-05-23  0:35 Yinghai Lu
  2008-05-23  1:22 ` [PATCH] x86: fix APIC warning on 32bit v2 Yinghai Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2008-05-23  0:35 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton,
	Rafael J. Wysocki, Gabriel C
  Cc: Linux Kernel Mailing List


for
[Bug #10613] BIOS bug, APIC version is 0 for CPU#0!
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)

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

Index: linux-2.6/arch/x86/kernel/acpi/boot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/acpi/boot.c
+++ linux-2.6/arch/x86/kernel/acpi/boot.c
@@ -242,12 +242,17 @@ static int __init acpi_parse_madt(struct
 
 static void __cpuinit acpi_register_lapic(int id, u8 enabled)
 {
+	unsigned int ver = 0;
+
 	if (!enabled) {
 		++disabled_cpus;
 		return;
 	}
 
-	generic_processor_info(id, 0);
+	if (boot_cpu_physical_apicid != -1U)
+		ver = apic_version[boot_cpu_physical_apicid];
+
+	generic_processor_info(id, ver);
 }
 
 static int __init
@@ -763,8 +768,11 @@ static void __init acpi_register_lapic_a
 	mp_lapic_addr = address;
 
 	set_fixmap_nocache(FIX_APIC_BASE, address);
-	if (boot_cpu_physical_apicid == -1U)
+	if (boot_cpu_physical_apicid == -1U) {
+		unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR));
 		boot_cpu_physical_apicid  = GET_APIC_ID(read_apic_id());
+		apic_version[boot_cpu_physical_apicid] = ver;
+	}
 }
 
 static int __init early_acpi_parse_madt_lapic_addr_ovr(void)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-23  1:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-23  0:35 [PATCH] x86: fix APIC warning on 32bit Yinghai Lu
2008-05-23  1:22 ` [PATCH] x86: fix APIC warning on 32bit v2 Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox