Skip to contentSkip to conversation

x86_64: warn if unable to configure apic main timer

PATCH In review Chuck Ebbert 2 participants 2 messages Feb 23, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: warn if unable to configure apic main timer

When using the APIC main timer option on x86_64, sometimes it fails to complete its setup. Warn about this and suggest the user try 'disable_timer_pin_1' if their system clock runs too fast. Also, make printing of the exact result of APIC timer calibration require 'apic=verbose'.

arch/x86_64/kernel/apic.c +7 -1
@@ -738,6 +738,12 @@ static void setup_APIC_timer(unsigned in
 		apic_runs_main_timer++;
 	}
 	local_irq_restore(flags);
+
+	if (apic_runs_main_timer == 1) {
+		printk(KERN_WARNING "Could not configure APIC main timer.\n");
+		printk(KERN_WARNING "Try boot option 'disable_timer_pin_1'"
+				    " if your system clock runs too fast.\n");
+	}
 }
 
 /*
@@ -786,7 +792,7 @@ static int __init calibrate_APIC_clock(v
 		result = (apic_start - apic) * 1000L * cpu_khz /
 					(tsc - tsc_start);
 	}
-	printk("result %d\n", result);
+	apic_printk(APIC_VERBOSE,"APIC timer result %d\n", result);
 
 
 	printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n",
Signature · 2 lines
Chuck
"Equations are the Devil's sentences."  --Stephen Colbert
#1 lore raw
Quoted 5 lines · Chuck Ebbert

When using the APIC main timer option on x86_64, sometimes it fails to complete its setup. Warn about this and suggest the user try 'disable_timer_pin_1' if their system clock runs too fast. Also, make printing of the exact result of APIC timer calibration require 'apic=verbose'.

This is not the right solution. Have to find out what's going wrong and fix that.

I'm also experimenting with a different way to run the timer because apicmaintimer doesn't work on a lot of laptops because they have trouble running the APIC timer during c2.

-Andi