linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Nicholas Piggin <npiggin@gmail.com>
Subject: Re: powerpc/64s: return more carefully from sreset NMI
Date: Wed,  4 Apr 2018 02:03:40 +1000 (AEST)	[thread overview]
Message-ID: <40Fv5m40Rxz9s3c@ozlabs.org> (raw)
In-Reply-To: <20180326150103.22941-1-npiggin@gmail.com>

On Mon, 2018-03-26 at 15:01:03 UTC, Nicholas Piggin wrote:
> System Reset, being an NMI, must return more carefully than other
> interrupts. It has traditionally returned via the nromal return
> from exception path, but that has a number of problems.
> 
> - r13 does not get restored if returning to kernel. This is for
>   interrupts which may cause a context switch, which sreset will
>   never do. Interrupting OPAL (which uses a different r13) is one
>   place where this causes breakage.
> 
> - It may cause several other problems returning to kernel with
>   preempt or TIF_EMULATE_STACK_STORE if it hits at the wrong time.
> 
> It's safer just to have a simple restore and return, like machine
> check which is the other NMI.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/15b4dd7981496f51c5f9262a5e0761

cheers

      reply	other threads:[~2018-04-03 16:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 15:01 [PATCH] powerpc/64s: return more carefully from sreset NMI Nicholas Piggin
2018-04-03 16:03 ` 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=40Fv5m40Rxz9s3c@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    /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).