linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Michael Neuling <mikey@neuling.org>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	"Shreyas B. Prabhu" <shreyasbp@gmail.com>,
	Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>,
	Balbir Singh <bsingharora@gmail.com>,
	Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>,
	Anton Blanchard <anton@samba.org>
Cc: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [v2] powernv:idle: Fix bug due to labeling ambiguity in power_enter_stop
Date: Wed,  8 Mar 2017 18:25:54 +1100 (AEDT)	[thread overview]
Message-ID: <3vdQ6p4LMRz9sNG@ozlabs.org> (raw)
In-Reply-To: <1488174007-8732-1-git-send-email-ego@linux.vnet.ibm.com>

On Mon, 2017-02-27 at 05:40:07 UTC, "Gautham R. Shenoy" wrote:
> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
> 
> Commit 09206b600c76 ("powernv: Pass PSSCR value and mask to
> power9_idle_stop") added additional code in power_enter_stop() to
> distinguish between stop requests whose PSSCR had ESL=EC=1 from those
> which did not. When ESL=EC=1, we do a forward-jump to a location
> labelled by "1", which had the code to handle the ESL=EC=1 case.
> 
> Unforunately just a couple of instructions before this label, is the
> macro IDLE_STATE_ENTER_SEQ() which also has a label "1" in its
> expansion.
> 
> As a result, the current code can result in directly executing stop
> instruction for deep stop requests with PSSCR ESL=EC=1, without saving
> the hypervisor state.
> 
> Fix this BUG by labeling the location that handles ESL=EC=1 case with
> a more descriptive label ".Lhandle_esl_ec_set" (local label suggestion
> a la .Lxx from Anton Blanchard).
> 
> While at it, rename the label "2" labelling the location of the code
> handling entry into deep stop states with ".Lhandle_deep_stop".
> 
> For a good measure, change the label in IDLE_STATE_ENTER_SEQ() macro
> to an not-so commonly used value in order to avoid similar mishaps in
> the future.
> 
> Fixes: 09206b600c76 ("powernv: Pass PSSCR value and mask to
> power9_idle_stop")
> 
> Cc: Michael Neuling <mikey@neuling.org>
> Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/424f8acd328a111319ae30bf384e5d

cheers

      reply	other threads:[~2017-03-08  7:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-26 21:33 [PATCH] powernv:idle: Fix bug due to labeling ambiguity in power_enter_stop Gautham R. Shenoy
2017-02-26 23:37 ` Anton Blanchard
2017-02-27  5:15   ` Gautham R Shenoy
2017-02-27  5:40     ` [v2 PATCH] " Gautham R. Shenoy
2017-03-08  7:25       ` 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=3vdQ6p4LMRz9sNG@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=akshay.adiga@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=bsingharora@gmail.com \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mikey@neuling.org \
    --cc=shilpa.bhat@linux.vnet.ibm.com \
    --cc=shreyasbp@gmail.com \
    --cc=svaidy@linux.vnet.ibm.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).