[PATCH v2] powerpc/32: Fix unpaired stwcx. on interrupt exit

Segher Boessenkool segher at kernel.crashing.org
Fri Sep 12 23:24:31 AEST 2025


Hi!

On Fri, Sep 12, 2025 at 10:37:34AM +0200, Christophe Leroy wrote:
>  BEGIN_FTR_SECTION
> +	lwarx   r0,0,r1
> +END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
>  	stwcx.	r0,0,r1		/* to clear the reservation */
> -FTR_SECTION_ELSE
> -	lwarx	r0,0,r1
> -ALT_FTR_SECTION_END_IFCLR(CPU_FTR_STCX_CHECKS_ADDRESS)

Hrm.  So this is for V'ger (mpc7450)?  What kind of issues does that
old thing have with unpaired larx/stcx., some performance impact?

The extra "dummy" larx has serious performance impact itself, on most
implementations (also on all newer stuff).


Segher


More information about the Linuxppc-dev mailing list