public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] x86_64:  Fix collision between pmtimer and pit/hpet timekeeping
@ 2005-12-07  5:00 john stultz
  2005-12-07 17:53 ` Andi Kleen
  0 siblings, 1 reply; 5+ messages in thread
From: john stultz @ 2005-12-07  5:00 UTC (permalink / raw)
  To: lkml; +Cc: Chris McDermott, Andi Kleen

Hello,
	I thought I had caught all the problems when the no-legacy HPET support
landed close to the time that the ACPI PM timer support landed, but
apparently not. :(

On systems that do not support the HPET legacy functions (basically the
IBM x460, but there could be others), in time_init() we accidentally
fall into a PM timer conditional and set the vxtime_hz value to the PM
timer's frequency. We then use this value with the HPET for timekeeping.

This patch (which mimics the behavior in time_init_gtod) corrects the
collision.

Andi, any objections or suggestions for a better way?

thanks
-john

diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index fdaddc4..fb389d2 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -913,7 +913,7 @@ void __init time_init(void)
 		cpu_khz = hpet_calibrate_tsc();
 		timename = "HPET";
 #ifdef CONFIG_X86_PM_TIMER
-	} else if (pmtmr_ioport) {
+	} else if (pmtmr_ioport && !vxtime.hpet_address) {
 		vxtime_hz = PM_TIMER_FREQUENCY;
 		timename = "PM";
 		pit_init();



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

end of thread, other threads:[~2005-12-08  9:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-07  5:00 [RFC][PATCH] x86_64: Fix collision between pmtimer and pit/hpet timekeeping john stultz
2005-12-07 17:53 ` Andi Kleen
2005-12-07 18:00   ` john stultz
2005-12-07 18:29     ` Andi Kleen
2005-12-08  9:34     ` Vojtech Pavlik

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