[PATCH] ppc32: backport Book-E decrementer handling fix from 2.6

Eugene Surovegin ebs at ebshome.net
Wed Apr 27 04:48:28 EST 2005


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

Signed-off-by: Eugene Surovegin <ebs at ebshome.net>

===== arch/ppc/kernel/time.c 1.16 vs edited =====
--- 1.16/arch/ppc/kernel/time.c	2003-07-03 09:56:34 -07:00
+++ edited/arch/ppc/kernel/time.c	2005-04-26 11:37:58 -07:00
@@ -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));




More information about the Linuxppc-embedded mailing list