diff options
author | Andi Kleen <ak@suse.de> | 2006-03-25 10:29:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 12:10:53 -0500 |
commit | 9ede6b0945223d1e353501f41b988a3db56b4e27 (patch) | |
tree | 40ed5154dc041977e7e19da501eceee1e24ac369 /arch | |
parent | 51f62e186b78f8743246a349b09be370c8735479 (diff) |
[PATCH] x86_64: Don't need to read PIT in timer handler when PM timer is used
The PM timer path through main_timer_handler doesn't need
the delay variable because it figures it out in a different way.
Don't try to read it from the PIT. With stopped PIT timer
it is even useless.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/kernel/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index ee5ce3d3cbc3..86039baaaf18 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -354,7 +354,7 @@ void main_timer_handler(struct pt_regs *regs) | |||
354 | { | 354 | { |
355 | static unsigned long rtc_update = 0; | 355 | static unsigned long rtc_update = 0; |
356 | unsigned long tsc; | 356 | unsigned long tsc; |
357 | int delay, offset = 0, lost = 0; | 357 | int delay = 0, offset = 0, lost = 0; |
358 | 358 | ||
359 | /* | 359 | /* |
360 | * Here we are in the timer irq handler. We have irqs locally disabled (so we | 360 | * Here we are in the timer irq handler. We have irqs locally disabled (so we |
@@ -375,7 +375,7 @@ void main_timer_handler(struct pt_regs *regs) | |||
375 | */ | 375 | */ |
376 | offset = hpet_readl(HPET_T0_CMP) - hpet_tick; | 376 | offset = hpet_readl(HPET_T0_CMP) - hpet_tick; |
377 | delay = hpet_readl(HPET_COUNTER) - offset; | 377 | delay = hpet_readl(HPET_COUNTER) - offset; |
378 | } else { | 378 | } else if (!pmtmr_ioport) { |
379 | spin_lock(&i8253_lock); | 379 | spin_lock(&i8253_lock); |
380 | outb_p(0x00, 0x43); | 380 | outb_p(0x00, 0x43); |
381 | delay = inb_p(0x40); | 381 | delay = inb_p(0x40); |