public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] x86_64: warn if unable to configure apic main timer
@ 2006-02-23  9:17 Chuck Ebbert
  2006-02-23  9:24 ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Ebbert @ 2006-02-23  9:17 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Andrew Morton, linux-kernel

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'.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>

--- 2.6.16-rc4-64.orig/arch/x86_64/kernel/apic.c
+++ 2.6.16-rc4-64/arch/x86_64/kernel/apic.c
@@ -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",
-- 
Chuck
"Equations are the Devil's sentences."  --Stephen Colbert

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] x86_64: warn if unable to configure apic main timer
  2006-02-23  9:17 [patch] x86_64: warn if unable to configure apic main timer Chuck Ebbert
@ 2006-02-23  9:24 ` Andi Kleen
  0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2006-02-23  9:24 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Andrew Morton, linux-kernel

On Thursday 23 February 2006 10:17, Chuck Ebbert wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] x86_64: warn if unable to configure apic main timer
@ 2006-02-23 18:07 Chuck Ebbert
  0 siblings, 0 replies; 3+ messages in thread
From: Chuck Ebbert @ 2006-02-23 18:07 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel, Andrew Morton

In-Reply-To: <200602231024.38599.ak@suse.de>

On Thu, 23 Feb 2006 at 10:24:38 +0100, Andi Kleen wrote:
> On Thursday 23 February 2006 10:17, Chuck Ebbert wrote:
> > 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 was thinking of this more as a band-aid for 2.6.16.

 But this patch is broken anyway; it will print the message on
non-bootstrap CPUs.

> 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.

 Yeah, I saw the Intel patch that does the exact opposite of
apicmaintimer.  It's kind of funny having both of them in there.

-- 
Chuck
"Equations are the Devil's sentences."  --Stephen Colbert


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-23 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-23  9:17 [patch] x86_64: warn if unable to configure apic main timer Chuck Ebbert
2006-02-23  9:24 ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2006-02-23 18:07 Chuck Ebbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox