From: Nicholas Piggin <npiggin@gmail.com>
To: Balbir Singh <bsingharora@gmail.com>
Cc: "open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)"
<linuxppc-dev@lists.ozlabs.org>,
Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH v3 2/3] powerpc/powernv: Identify scom driven system reset
Date: Fri, 15 Dec 2017 12:58:48 +1000 [thread overview]
Message-ID: <20171215125848.71da3d0e@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <CAKTCnzm+Ha2SLqp1q4W0i82TFP3wjZzPjLsyP2qdCAZf34o9CA@mail.gmail.com>
On Fri, 15 Dec 2017 13:54:18 +1100
Balbir Singh <bsingharora@gmail.com> wrote:
> On Fri, Dec 15, 2017 at 1:44 PM, Nicholas Piggin <npiggin@gmail.com> wrote:
> > On Fri, 15 Dec 2017 12:27:39 +1100
> > Balbir Singh <bsingharora@gmail.com> wrote:
> >
> >> In irq_set_pending_from_srr1() we were missing 0x2 as system
> >> reset identified from SRR1 caused by back to back system
> >> resets or when interrupts are caused by SCOM when the thread
> >> is not in power saving mode.
> >>
> >> This helps us get to NMI handling in both the case where NMI
> >> is caused when in power-saving and not in power-saving mode.
> >> The actual exploitation is expected when we are doing a kdump
> >> and an offline CPU might not be in power-saving mode due to
> >> an already spurious IPI or any other reason.
> >>
> >> Signed-off-by: Balbir Singh <bsingharora@gmail.com>
> >
> > When not in power saving mode, we don't look at SRR1 at all, so
> > we don't need this. You should never be getting it returned as the
> > result of your idle instruction (except on DD1 which has a bug,
> > but firmware doesn't implement the NMI IPI).
> >
>
> I added this for the next patch. We call irq_set_pending_from_srr1
> while coming out of CPU idle, but if for any reason the IPI was spurious
> and then we see an NMI during kdump, I did want to detect that
> and callback into the NMI handler.
You'll never see it. The SRR1 value you get is the idle wakeup code.
So any scom-when-not-idle bit should never be set.
Thanks,
Nick
next prev parent reply other threads:[~2017-12-15 2:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 1:27 [PATCH v3 1/3] powerpc/crash: Remove the test for cpu_online in the IPI callback Balbir Singh
2017-12-15 1:27 ` [PATCH v3 2/3] powerpc/powernv: Identify scom driven system reset Balbir Singh
2017-12-15 2:44 ` Nicholas Piggin
2017-12-15 2:54 ` Balbir Singh
2017-12-15 2:58 ` Nicholas Piggin [this message]
2017-12-15 1:27 ` [PATCH v3 3/3] powernv/kdump: Fix cases where the kdump kernel can get HMI's Balbir Singh
2017-12-15 3:10 ` Nicholas Piggin
2017-12-15 3:34 ` Balbir Singh
2017-12-15 4:47 ` 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=20171215125848.71da3d0e@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=bsingharora@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).