On Mon, 19 Jun 2017 21:45:06 +1000 Michael Ellerman <m...@ellerman.id.au> wrote:
> Nicholas Piggin <npig...@gmail.com> writes: > > > The EXCEPTION_PROLOG_1 used by SLB miss already saves CTR when the > > kernel is built with CONFIG_RELOCATABLE. So it does not have to be > > saved and reloaded when branching to slb_miss_realmode. It can be > > restored from the PACA as usual. > > > > Signed-off-by: Nicholas Piggin <npig...@gmail.com> > > --- > > arch/powerpc/kernel/exceptions-64s.S | 13 +++++-------- > > 1 file changed, 5 insertions(+), 8 deletions(-) > > > > diff --git a/arch/powerpc/kernel/exceptions-64s.S > > b/arch/powerpc/kernel/exceptions-64s.S > > index a4a71bce35d6..486e205cc762 100644 > > --- a/arch/powerpc/kernel/exceptions-64s.S > > +++ b/arch/powerpc/kernel/exceptions-64s.S > > @@ -519,7 +519,7 @@ EXC_REAL_BEGIN(data_access_slb, 0x380, 0x80) > > * because the distance from here to there depends on where > > * the kernel ends up being put. > > */ > > - mfctr r11 > > + /* CTR is saved if RELOCATABLE */ > > LOAD_HANDLER(r10, slb_miss_realmode) > > mtctr r10 > > bctr > > AFAICS these can all use BRANCH_TO_COMMON(). > > So I'll drop all the comment additions from this and do a follow-up to > switch to BRANCH_TO_COMMON(). That will tidy up those ifdefs nicely. Good catch. Thanks, Nick