Skip to contentSkip to conversation

ppc32: backport Book-E decrementer handling fix from 2.6

PATCH Applied Eugene Surovegin 2 participants 2 messages Apr 26, 2005 – Apr 29, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc32: backport Book-E decrementer handling fix from 2.6

Marcelo,

this is backport of Matt Porter's patch for Book-E decrementer handling in timer_interrupt.

The fix has been in 2.6 from August but never made it to 2.4, and I re-discovered this fix last week :)

Original Matt's post to linuxppc-dev with explanation can be found at:
http://ozlabs.org/pipermail/linuxppc-dev/2004-August/017458.html

===== arch/ppc/kernel/time.c 1.16 vs edited =====

arch/ppc/kernel/time.c +1 -1
@@ -150,7 +150,7 @@
 
 	hardirq_enter(cpu);
 
-	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;
 		if (!user_mode(regs))
 			ppc_do_profile(instruction_pointer(regs));
#1 lore raw
Quoted 10 lines · Eugene Surovegin

Marcelo,

this is backport of Matt Porter's patch for Book-E decrementer handling in timer_interrupt.

The fix has been in 2.6 from August but never made it to 2.4, and I re-discovered this fix last week :)

Original Matt's post to linuxppc-dev with explanation can be found at:
http://ozlabs.org/pipermail/linuxppc-dev/2004-August/017458.html

Applied, thanks.

Quoted 14 lines

===== arch/ppc/kernel/time.c 1.16 vs edited =====

arch/ppc/kernel/time.c +1 -1
@@ -150,7 +150,7 @@
 
 	hardirq_enter(cpu);
 
-	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;
 		if (!user_mode(regs))
 			ppc_do_profile(instruction_pointer(regs));