Skip to contentSkip to conversation

x86_64: clean up timer messages

PATCH New Chuck Ebbert 1 participant 1 message Feb 27, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: clean up timer messages

Fix verbosity level for x86_64 io-apic timer messages. These appear when using ATI chipset systems with -rc5. Also, make exact APIC timer speed message depend on APIC_VERBOSE.

Before:
CPU: AMD Turion(tm) 64 Mobile Technology ML-28 stepping 02 ..MP-BIOS bug: 8254 timer not connected to IO-APIC
failed.
works.
Using local APIC timer interrupts.
result 12500904
Detected 12.500 MHz APIC timer.

After:
CPU: AMD Turion(tm) 64 Mobile Technology ML-28 stepping 02 Using local APIC timer interrupts.
Detected 12.500 MHz APIC timer.

---

 arch/x86_64/kernel/apic.c    |    3 +--
 arch/x86_64/kernel/io_apic.c |   11 ++++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)
arch/x86_64/kernel/io_apic.c +6 -5
@@ -1834,8 +1834,9 @@ static inline void check_timer(void)
 			return;
 		}
 		clear_IO_APIC_pin(apic1, pin1);
-		apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 timer not "
-				"connected to IO-APIC\n");
+		if (timer_over_8254 > 0)
+			apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: 8254 "
+					"timer not connected to IO-APIC\n");
 	}
 
 	apic_printk(APIC_VERBOSE,KERN_INFO "...trying to set up timer (IRQ0) "
@@ -1848,7 +1849,7 @@ static inline void check_timer(void)
 		 */
 		setup_ExtINT_IRQ0_pin(apic2, pin2, vector);
 		if (timer_irq_works()) {
-			printk("works.\n");
+			apic_printk(APIC_VERBOSE," works.\n");
 			nmi_watchdog_default();
 			if (nmi_watchdog == NMI_IO_APIC) {
 				setup_nmi();
@@ -1860,7 +1861,7 @@ static inline void check_timer(void)
 		 */
 		clear_IO_APIC_pin(apic2, pin2);
 	}
-	printk(" failed.\n");
+	apic_printk(APIC_VERBOSE," failed.\n");
 
 	if (nmi_watchdog == NMI_IO_APIC) {
 		printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n");
@@ -1875,7 +1876,7 @@ static inline void check_timer(void)
 	enable_8259A_irq(0);
 
 	if (timer_irq_works()) {
-		apic_printk(APIC_QUIET, " works.\n");
+		apic_printk(APIC_VERBOSE," works.\n");
 		return;
 	}
 	apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector);
arch/x86_64/kernel/apic.c +1 -2
@@ -786,8 +786,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,KERN_INFO "result %d\n", result);
 
 	printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n",
 		result / 1000 / 1000, result / 1000 % 1000);
Signature · 2 lines
Chuck
"Equations are the Devil's sentences."  --Stephen Colbert