Subject: Re: [PATCH 15/33] powerpc: Fix ABIv2 issues with stack offsets in assembly code

From: Philippe Bergheaud <[email-masked]>
Date: Tue, 01 Apr 2014 15:54:18 +0200

Anton Blanchard wrote:
> diff --git a/arch/powerpc/lib/memcpy_64.S b/arch/powerpc/lib/memcpy_64.S
> index 72ad055..01da956 100644
> --- a/arch/powerpc/lib/memcpy_64.S
> +++ b/arch/powerpc/lib/memcpy_64.S
> @@ -12,7 +12,7 @@
>  	.align	7
>  _GLOBAL(memcpy)
>  BEGIN_FTR_SECTION
> -	std	r3,48(r1)	/* save destination pointer for return value */
> +	std	r3,STK_PARAM(R3)(r1)	/* save destination pointer for return value */
>  FTR_SECTION_ELSE
>  #ifndef SELFTEST
>  	b	memcpy_power7

This chunk is rejected when applied to linux-3.14, because of the reference to SELTEST.
The last three context lines should rather read:

  FTR_SECTION_ELSE
  	b	memcpy_power7
  ALT_FTR_SECTION_END_IFCLR(CPU_FTR_VMX_COPY)

Same issue with [PATCH 16/33] powerpc: Fix unsafe accesses to parameter area in ELFv2.

Philippe