Re: local apic timer ints not working with vmware: nolocalapic

From: Zwane Mwaikambo (zwane@linuxpower.ca)
Date: Sat May 31 2003 - 02:04:13 EST


On Sat, 31 May 2003, Brian J. Murrell wrote:

> Just to confirm now, I have modified Zwane's patch add another kernel arg,
> [no]locapictimer, which deals with dont_use_local_apic_timer in the same
> way his patch deals with the dont_enable_local_apic flag, and indeed, a
> kernel booted with "nolapic" does hang in the APIC timer calibration
> however a kernel booted with "nolocapictimer" does not.
>
> Is it really valid to go and try to calibrate the APIC timer if it was
> disabled by the user, or even DMI?

bah, the early boot hacks are just ugly, we do detect_init_APIC early in
traps code and then just blindly go frobbing the APIC anyway.

The following patch will honour the dont_enable_local_apic flag in the
necessary places. If it works for you i'll forward it.

Index: linux-2.5/arch/i386/kernel/apic.c
===================================================================
RCS file: /home/cvs/linux-2.5/arch/i386/kernel/apic.c,v
retrieving revision 1.50
diff -u -p -B -r1.50 apic.c
--- linux-2.5/arch/i386/kernel/apic.c 30 May 2003 20:14:41 -0000 1.50
+++ linux-2.5/arch/i386/kernel/apic.c 31 May 2003 05:53:34 -0000
@@ -665,6 +665,7 @@ static int __init detect_init_APIC (void
return 0;

no_apic:
+ dont_enable_local_apic = 1;
printk("No local APIC present or hardware disabled\n");
return -1;
}
@@ -1127,6 +1128,9 @@ asmlinkage void smp_error_interrupt(void
*/
int __init APIC_init_uniprocessor (void)
{
+ if (dont_enable_local_apic)
+ return -1;
+
if (!smp_found_config && !cpu_has_apic)
return -1;

--
function.linuxpower.ca
-
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/