[PATCH 2/4] tickless idle cpu: Skip ticks when CPU is idle

Paul Mackerras paulus at samba.org
Sat Apr 8 09:40:42 EST 2006


Srivatsa Vaddagiri writes:

> diff -puN arch/powerpc/kernel/idle_power4.S~no_idle_hz arch/powerpc/kernel/idle_power4.S
> --- linux-2.6.17-rc1/arch/powerpc/kernel/idle_power4.S~no_idle_hz	2006-04-07 04:14:39.000000000 +0530
> +++ linux-2.6.17-rc1-root/arch/powerpc/kernel/idle_power4.S	2006-04-07 04:14:58.000000000 +0530
> @@ -30,6 +30,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_CAN_NAP)
>  	cmpwi	0,r4,0
>  	beqlr
>  
> +	mflr	r4
> +	bl	.stop_hz_timer
> +	mtlr	r4

This won't work - r4 is volatile across function calls, that is,
stop_hz_timer() could change r4 and is not required to save and
restore it.

Paul.



More information about the Linuxppc-dev mailing list