Messages in this thread Patch in this message | | | Date | Mon, 1 Nov 2004 23:28:35 +0000 (GMT) | From | "Maciej W. Rozycki" <> | Subject | [PATCH] UP local APIC bootstrap cleanup |
| |
Hello,
Here is a patch to do some cleanup to code affected by the recent change to the bootstrap code responsible for enabling the local APIC. It adds a message about how to get the APIC enabled if previously disabled by the BIOS to aid people expecting the former behavior. It removes some P4-specific code that's become dead as a result of the change. Finally it improves a couple of inaccurate comments.
This has been agreed to be reasonable. Please apply
Maciej
Signed-off-by: "Maciej W. Rozycki" <macro@linux-mips.org>
patch-2.6.9-lapic-7 diff -up --recursive --new-file linux-2.6.9.macro/arch/i386/kernel/apic.c linux-2.6.9/arch/i386/kernel/apic.c --- linux-2.6.9.macro/arch/i386/kernel/apic.c 2004-10-12 23:57:01.000000000 +0000 +++ linux-2.6.9/arch/i386/kernel/apic.c 2004-10-24 00:30:29.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) { + apic_printk(APIC_VERBOSE, + "Local APIC disabled by BIOS -- " + "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 or later and AMD K7 + * (Model > 1) or later. */ 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/
| |