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

Marcelo Tosatti marcelo.tosatti at cyclades.com
Fri Apr 29 23:56:48 EST 2005


On Tue, Apr 26, 2005 at 11:48:28AM -0700, Eugene Surovegin wrote:
> 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. 

> 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