Re: [ACPI] Re: [BKPATCH] LAPIC fix for 2.6

From: Maciej W. Rozycki
Date: Sun Oct 10 2004 - 20:46:44 EST


On Sun, 10 Oct 2004, [ISO-8859-1] Sérgio Monteiro Basto wrote:

> The problem is: trying enable some local apic's (for example on via
> mother boards on my laptop), cause many problem, like hang on boot (with
> ACPI), hang on Fn-F3 (video switch), power-off fails, etc. and no one
> knows how resolved the problem.

Ah, laptops seem to be inherently insane... Your symptoms suggest your
firmware/BIOS is buggy, doing probably something under the OS, which
cannot be controlled and without taking proper care of the state of
hardware. That's the infamous SMM code.

How about only disabling the APIC if power-management is in use? And
announcing it so that a user sees the APIC has been kept deliberately
disabled, as opposed to be unable to be enabled? Like below -- for ACPI
only, as I assume APM gives no trouble or the change would have been
proposed much earlier. Untested.

> So keep it disable if BIOS vendors say so, can be reasonable idea.

BIOS vendors usually say so, because they have no clue, or in other
words, they do not really mean to say anything with this. They just don't
enable the APIC as they see no use for it, but the same can be true of
plenty of other hardware that has no use for the firmware.

I don't like the idea of "punishing" good hardware, because something
behaves ill out there.

Maciej

patch-mips-2.6.9-rc2-20040920-lapic-0
diff -up --recursive --new-file linux-mips-2.6.9-rc2-20040920.macro/arch/i386/kernel/acpi/boot.c linux-mips-2.6.9-rc2-20040920/arch/i386/kernel/acpi/boot.c
--- linux-mips-2.6.9-rc2-20040920.macro/arch/i386/kernel/acpi/boot.c 2004-08-25 03:57:43.000000000 +0000
+++ linux-mips-2.6.9-rc2-20040920/arch/i386/kernel/acpi/boot.c 2004-10-11 01:42:34.000000000 +0000
@@ -835,6 +835,19 @@ acpi_boot_init (void)
}

/*
+ * Don't override BIOS and enable the local APIC
+ * unless "lapic" specified.
+ */
+ if (!acpi_disabled && enable_local_apic == 0) {
+ printk(KERN_NOTICE PREFIX
+ "Local APIC won't be reenabled, "
+ "because of frequent BIOS bugs\n");
+ printk(KERN_NOTICE PREFIX
+ "You can enable it with \"lapic\"\n");
+ enable_local_apic = -1;
+ }
+
+ /*
* set sci_int and PM timer address
*/
acpi_table_parse(ACPI_FADT, acpi_parse_fadt);
diff -up --recursive --new-file linux-mips-2.6.9-rc2-20040920.macro/arch/i386/kernel/apic.c linux-mips-2.6.9-rc2-20040920/arch/i386/kernel/apic.c
--- linux-mips-2.6.9-rc2-20040920.macro/arch/i386/kernel/apic.c 2004-09-20 03:57:43.000000000 +0000
+++ linux-mips-2.6.9-rc2-20040920/arch/i386/kernel/apic.c 2004-10-11 01:37:13.000000000 +0000
@@ -667,7 +667,7 @@ static int __init detect_init_APIC (void
u32 h, l, features;
extern void get_cpu_vendor(struct cpuinfo_x86*);

- /* Disabled by DMI scan or kernel option? */
+ /* Disabled by DMI scan, ACPI or kernel option? */
if (enable_local_apic < 0)
return -1;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/