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

2013-08-12 Thread Stephen Rothwell
Hi Mikey, On Tue, 13 Aug 2013 12:20:22 +1000 Michael Neuling 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) mflrreg ; s

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

2013-08-12 Thread Michael Neuling
When we have MMU on exceptions (POWER8) and a relocatable kernel, we need to branch from the initial exception vectors at 0x0 to up high where the kernel might be located. Currently we do this using the link register. Unfortunately this corrupts the link stack and instead we should use the count