Commit 8301d51f authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by Linus Torvalds

[PATCH] UP local APIC bootstrap cleanup

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.
Signed-off-by: default avatar"Maciej W. Rozycki" <macro@linux-mips.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4de0233e
......@@ -689,7 +689,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;
......@@ -703,8 +703,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;
......@@ -714,15 +713,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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment