From: Nicholas Piggin <npiggin@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/9] powerpc/64s: SLB miss already has CTR saved for relocatable kernel
Date: Tue, 20 Jun 2017 03:20:43 +1000 [thread overview]
Message-ID: <20170620032043.13bbd2fa@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <877f08urp9.fsf@concordia.ellerman.id.au>
On Mon, 19 Jun 2017 21:45:06 +1000
Michael Ellerman <mpe@ellerman.id.au> wrote:
> Nicholas Piggin <npiggin@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 <npiggin@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
next prev parent reply other threads:[~2017-06-19 17:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-21 13:15 [PATCH 0/9] Reduce PACA save areas Nicholas Piggin
2017-05-21 13:15 ` [PATCH 1/9] powerpc/64s: slb_allocate_realmode() preserve r3 Nicholas Piggin
2017-06-22 13:12 ` [1/9] " Michael Ellerman
2017-05-21 13:15 ` [PATCH 2/9] powerpc/64s: SLB miss handler avoid saving faulting address into EX_DAR Nicholas Piggin
2017-05-21 13:15 ` [PATCH 3/9] powerpc/64s: SLB miss already has CTR saved for relocatable kernel Nicholas Piggin
2017-06-19 11:45 ` Michael Ellerman
2017-06-19 17:20 ` Nicholas Piggin [this message]
2017-05-21 13:15 ` [PATCH 4/9] powerpc/64s: SLB miss handler avoid r3 save/restore Nicholas Piggin
2017-06-19 4:48 ` Michael Ellerman
2017-06-19 16:54 ` Nicholas Piggin
2017-05-21 13:15 ` [PATCH 5/9] powerpc/64s: paca add EX_SIZE definition for exception save areas Nicholas Piggin
2017-05-21 13:15 ` [PATCH 6/9] powerpc/64s: paca EX_SRR0 is unused, remove it Nicholas Piggin
2017-05-21 13:15 ` [PATCH 7/9] powerpc/64s: paca EX_LR can be merged with EX_DAR Nicholas Piggin
2017-05-21 13:15 ` [PATCH 8/9] powerpc/64s: paca EX_R3 " Nicholas Piggin
2017-05-21 13:15 ` [PATCH 9/9] powerpc/64s: paca EX_CTR is not used with !RELOCATABLE, remove it Nicholas Piggin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170620032043.13bbd2fa@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).