Commit 9ede6b09 authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[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: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 51f62e18
...@@ -354,7 +354,7 @@ void main_timer_handler(struct pt_regs *regs) ...@@ -354,7 +354,7 @@ void main_timer_handler(struct pt_regs *regs)
{ {
static unsigned long rtc_update = 0; static unsigned long rtc_update = 0;
unsigned long tsc; unsigned long tsc;
int delay, offset = 0, lost = 0; int delay = 0, offset = 0, lost = 0;
/* /*
* Here we are in the timer irq handler. We have irqs locally disabled (so we * 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,7 +375,7 @@ void main_timer_handler(struct pt_regs *regs)
*/ */
offset = hpet_readl(HPET_T0_CMP) - hpet_tick; offset = hpet_readl(HPET_T0_CMP) - hpet_tick;
delay = hpet_readl(HPET_COUNTER) - offset; delay = hpet_readl(HPET_COUNTER) - offset;
} else { } else if (!pmtmr_ioport) {
spin_lock(&i8253_lock); spin_lock(&i8253_lock);
outb_p(0x00, 0x43); outb_p(0x00, 0x43);
delay = inb_p(0x40); delay = inb_p(0x40);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment