linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: paulus@samba.org, matt@ozlabs.org
Subject: Re: powerpc/64: Simplify __secondary_start paca->kstack handling
Date: Tue, 26 Feb 2019 14:27:52 +1100 (AEDT)	[thread overview]
Message-ID: <447klr31G9z9sLw@ozlabs.org> (raw)
In-Reply-To: <20190223122439.24020-1-mpe@ellerman.id.au>

On Sat, 2019-02-23 at 12:24:39 UTC, Michael Ellerman wrote:
> In __secondary_start() we load the thread_info of the idle task of the
> secondary CPU from current_set[cpu], and then convert it into a stack
> pointer before storing that back to paca->kstack.
> 
> As pointed out in commit f761622e5943 ("powerpc: Initialise
> paca->kstack before early_setup_secondary") it's important that we
> initialise paca->kstack before calling the MMU setup code, in
> particular slb_initialize(), because it will bolt the SLB entry for
> the kstack into the SLB.
> 
> However we have already setup paca->kstack in cpu_idle_thread_init(),
> since commit 3b5750644b2f ("[POWERPC] Bolt in SLB entry for kernel
> stack on secondary cpus") (May 2008).
> 
> It's also in cpu_idle_thread_init() that we initialise current_set[cpu]
> with the thread_info pointer, so there is no issue of the timing being
> different between the two.
> 
> Therefore the initialisation of paca->kstack in __setup_secondary() is
> completely redundant, so remove it.
> 
> This has the added benefit of removing code that runs in real mode,
> and is therefore restricted by the RMO, and so opens the way for us to
> enable THREAD_INFO_IN_TASK.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/eafd825ed7106ac1ca84d20d8b3b8682

cheers

      reply	other threads:[~2019-02-26  3:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-23 12:24 [PATCH] powerpc/64: Simplify __secondary_start paca->kstack handling Michael Ellerman
2019-02-26  3:27 ` Michael Ellerman [this message]

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=447klr31G9z9sLw@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=matt@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /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).