lkml.org 
[lkml]   [2004]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.9-rc4 No local APIC present or hardware disabled
On Thu, 14 Oct 2004, Mikael Pettersson wrote:

> There are systems, such as the P3-based Dell Inspirons and Latitutes
> that caused the dmi blacklist to be implemented, that fail whether
> they're using APM or ACPI. So in the interest of consistency, we should
> either always automatically override the BIOS, requiring "nolapic" on
> broken systems, or never automatically override the BIOS, requiring
> "lapic" on systems that work but have stupid BIOSen.

It's a pity another useful feature gets disfavored due to firmware bugs
in newer systems.

> None of this is ACPI-specific, so I don't like the idea of tying
> auto-enable/disable to ACPI.

I hope I won't hit the length limit of the command line this way, sigh...

Anyway, if this is going to stay in, I think code needs to be cleaned up
to get rid of dead bits and inaccurate comments. Here's my proposal.
Does it make sense? I hope so.

Maciej

patch-2.6.9-rc4-lapic-6
diff -up --recursive --new-file linux-2.6.9-rc4.macro/arch/i386/kernel/apic.c linux-2.6.9-rc4/arch/i386/kernel/apic.c
--- linux-2.6.9-rc4.macro/arch/i386/kernel/apic.c 2004-10-12 23:57:01.000000000 +0000
+++ linux-2.6.9-rc4/arch/i386/kernel/apic.c 2004-10-14 21:42:57.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 kernel option? */
if (enable_local_apic < 0)
return -1;

@@ -681,8 +681,7 @@ static int __init detect_init_APIC (void
break;
goto no_apic;
case X86_VENDOR_INTEL:
- if (boot_cpu_data.x86 == 6 ||
- (boot_cpu_data.x86 == 15 && (cpu_has_apic || enable_local_apic > 0)) ||
+ if (boot_cpu_data.x86 == 6 || boot_cpu_data.x86 == 15 ||
(boot_cpu_data.x86 == 5 && cpu_has_apic))
break;
goto no_apic;
@@ -692,15 +691,20 @@ static int __init detect_init_APIC (void

if (!cpu_has_apic) {
/*
- * Over-ride BIOS and try to enable LAPIC
- * only if "lapic" specified
+ * Over-ride BIOS and try to enable the local
+ * APIC only if "lapic" specified.
*/
- if (enable_local_apic != 1)
- goto no_apic;
+ if (enable_local_apic <= 0) {
+ printk("Not enabling local APIC "
+ "because of frequent BIOS bugs\n");
+ printk("You can enable it with \"lapic\"\n");
+ return -1;
+ }
/*
* Some BIOSes disable the local APIC in the
* APIC_BASE MSR. This can only be done in
- * software for Intel P6 and AMD K7 (Model > 1).
+ * software for Intel P6, Intel P4 and AMD K7
+ * (Model > 1).
*/
rdmsr(MSR_IA32_APICBASE, l, h);
if (!(l & MSR_IA32_APICBASE_ENABLE)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.049 / U:42.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site