mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>,
	Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	ego@linux.vnet.ibm.com
Subject: Re: [PATCH] powernv:idle: Clear r12 on wakeup from stop lite
Date: Wed, 28 Jun 2017 22:32:53 +1000	[thread overview]
Message-ID: <87vangb8cq.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20170628143646.5e92bcb5@roar.ozlabs.ibm.com>

Nicholas Piggin <npiggin@gmail.com> writes:

> On Wed, 28 Jun 2017 06:46:49 +0530
> Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> wrote:
>
>> pnv_wakeup_noloss expects R12 to contain SRR1 value to determine if
>> the wakeup reason is an HMI in CHECK_HMI_INTERRUPT.
>> 
>> When we wakeup with ESL=0, SRR1 will not contain the wakeup reason, so
>> there is no point setting R12 to SRR1.
>> 
>> However, we don't set R12 at all and R12 contains garbage, and still
>> being used to check HMI assuming that it had SRR1. causing the
>> OPAL msglog to be filled with the following print:
>> 	HMI: Received HMI interrupt: HMER = 0x0040000000000000
>> 
>> This patch clears R12 after waking up from stop with ESL=EC=0, so that
>> we don't accidentally enter the HMI handler in pnv_wakeup_noloss if
>> the R12[42:45] corresponds to HMI as wakeup reason.
>> 
>> Bug existed prior to "commit 9d29250136f6 ("powerpc/64s/idle: Avoid SRR
>> usage in idle sleep/wake paths")  but was never hit in practice
>> 
>> Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
>> Fixes: 9d29250136f6 ("powerpc/64s/idle: Avoid SRR usage in idle
>> sleep/wake paths")
>
> Thanks guys, appreciate you finding and fixing my bug :)
>
> I think this looks like the best fix. Really minor nitpick but you
> could adjust the line widths on the comment slightly (mpe might do
> that when merging).

You know me too well :}

cheers

  reply	other threads:[~2017-06-28 12:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28  1:16 Akshay Adiga
2017-06-28  4:36 ` Nicholas Piggin
2017-06-28 12:32   ` Michael Ellerman [this message]
2017-06-29 12:21 ` Michael Ellerman

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=87vangb8cq.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=akshay.adiga@linux.vnet.ibm.com \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®