[PATCH] powerpc: Avoid link stack corruption for MMU on exceptions

Stephen Rothwell sfr at canb.auug.org.au
Tue Aug 13 15:06:17 EST 2013


Hi Mikey,

On Tue, 13 Aug 2013 12:20:22 +1000 Michael Neuling <mikey at neuling.org> wrote:
>
> @@ -101,14 +102,14 @@
>   * kernel, we need to use LR to get to the 2nd level handler.  So, save/restore
                             ^^
CTR

>   * it when required.
>   */
> -#define SAVE_LR(reg, area)	mflr	reg ; 	std	reg,area+EX_LR(r13)
> -#define GET_LR(reg, area) 			ld	reg,area+EX_LR(r13)
> -#define RESTORE_LR(reg, area)	ld	reg,area+EX_LR(r13) ; mtlr reg
> +#define SAVE_CTR(reg, area)	mfctr	reg ; 	std	reg,area+EX_CTR(r13)
> +#define GET_CTR(reg, area) 			ld	reg,area+EX_CTR(r13)
> +#define RESTORE_CTR(reg, area)	ld	reg,area+EX_CTR(r13) ; mtctr reg
>  #else
>  /* ...else LR is unused and in register. */
              ^^
and again

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20130813/6718ad0e/attachment.sig>


More information about the Linuxppc-dev mailing list