[PATCH ] cell: enable pause(0) in cpu_idle

Paul Mackerras paulus at samba.org
Thu Dec 15 17:43:59 EST 2005


Arnd Bergmann writes:

> This patch enables support for pause(0) power management state
> for the Cell Broadband Processor, which is import for power efficient
> operation. The pervasive infrastructure will in the future enable
> us to introduce more functionality specific to the Cell's
> pervasive unit.

I put this in, but then took a closer look at this and reverted the
commit:

> +/* This is a new system reset handler for the BE processor.
> + * SRR1 stores wake information that must be decoded to determine why
> + * the processor was at the system reset handler.
> + */
> +
> +	.align 7
> +	.globl system_reset_check_common
> +system_reset_check_common:
> +BEGIN_FTR_SECTION
> +	mr	r22,r12    /* r12 has SRR1 saved */
> +	srwi	r22,r22,16
> +	andi.	r22,r22,MSR_WAKEMASK
> +	cmpwi	r22,MSR_WAKEEE
> +	beq	hardware_interrupt_common
> +	cmpwi	r22,MSR_WAKEDEC
> +	beq	decrementer_common
> +	cmpwi	r22,MSR_WAKEMT
> +	bne	system_reset_common

Why are you trashing r22 here?  It hasn't been saved.  You probably
should use r10 instead, which has been saved.

> +END_FTR_SECTION_IFSET(CPU_FTR_PAUSE_ZERO)
> +	EXCEPTION_PROLOG_COMMON(0x100, PACA_EXGEN);
> +	b	fast_exception_return

This is a change in behaviour from before the patch.  Instead of doing
the EXCEPTION_PROLOG_COMMON and then just returning, you should branch
to system_reset_common.

Paul.



More information about the Linuxppc64-dev mailing list