diff options
author | Matt Porter <mporter@kernel.crashing.org> | 2004-08-22 22:27:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 22:27:29 -0700 |
commit | 07a134d6c649f83df71ee9a24999f9b2d3794a71 (patch) | |
tree | d4372448d5c76dee1502205cb01fbaf7d4e2b25a /arch | |
parent | d6e3c04a4e52818a073c51476f219d2923590d03 (diff) | |
download | history-07a134d6c649f83df71ee9a24999f9b2d3794a71.tar.gz |
[PATCH] ppc32: optimize/fix timer_interrupt loop
The following patch fixes the situation where the loop condition could
generate a next_dec of zero while exiting the loop. This is suboptimal on
Classic PPC because it forces another interrupt to occur and reenter the
handler. It is fatal on Book E cores, because their decrementer is stopped
when writing a zero (Classic interrupts on a 0->-1 transition, Book E
interrupts on a 1->0 transition). Instead, stay in the loop on a
next_dec==0.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc/kernel/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c index cfeff0479c2e6a..12f93af900ecc5 100644 --- a/arch/ppc/kernel/time.c +++ b/arch/ppc/kernel/time.c @@ -161,7 +161,7 @@ void timer_interrupt(struct pt_regs * regs) irq_enter(); - while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) < 0) { + while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) { jiffy_stamp += tb_ticks_per_jiffy; ppc_do_profile(regs); |