linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Balbir Singh <bsingharora@gmail.com>
To: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Daniel Lezcano <daniel.lezcano@linaro.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>,
	Stewart Smith <stewart@linux.vnet.ibm.com>,
	Oliver O'Halloran <oohall@gmail.com>
Cc: "\"linuxppc-dev"@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, "skiboot\""@lists.ozlabs.org
Subject: Re: [PATCH v3 0/3] powernv:stop: Use psscr_val,mask provided by firmware
Date: Tue, 29 Nov 2016 17:34:03 +1100	[thread overview]
Message-ID: <9bde9678-56cf-a718-7f00-98f0eca45f22@gmail.com> (raw)
In-Reply-To: <cover.1478760806.git.ego@linux.vnet.ibm.com>



On 10/11/16 18:54, Gautham R. Shenoy wrote:
> From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
> 
> This is the third iteration of the patchset to use the psscr_val and
> psscr_mask provided by the firmware for each of the stop states.
> 
> The previous version can be found here:
> 
> [v2]: https://lkml.org/lkml/2016/10/27/143
> [v1]: https://lkml.org/lkml/2016/9/29/45
> 
> This version fixes a couple of bugs pertaining to strncpy and
> initialization of the target-residency values of nap and sleep
> which were pointed out by Paul and Oliver in the earlier version.
> 
> Synopsis
> ==========
> In the current implementation, the code for ISA
> v3.0 stop implementation has a couple of shortcomings.
> 
> a) The code hand-codes the values for ESL,EC,TR,MTL bits of PSSCR and
>    uses only the RL field from the firmware. While this is not
>    incorrect, since the hand-coded values are legitimate, it is not a
>    very flexible design since the firmware has the capability to
>    communicate these values via the "ibm,cpu-idle-state-psscr" and
>    "ibm,cpu-idle-state-psscr-mask" properties. In case where the
>    firmware provides values for these fields that is different from
>    the hand-coded values, the current code will not work as intended.
> 
> b) Due to issue a), the current code assumes that ESL=EC=1 for all the
>    stop states and hence the wakeup from the stop instruction will
>    happen at 0x100, the system-reset vector. However, the ISA v3.0
>    allows the ESL=EC=0 behaviour where the corresponding stop-state
>    loses no state and wakes up from the subsequent instruction. The
>    current code doesn't handle this case.
>    

Sounds reasonable

Balbir Singh.

      parent reply	other threads:[~2016-11-29  6:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10  7:54 [PATCH v3 0/3] powernv:stop: Use psscr_val,mask provided by firmware Gautham R. Shenoy
2016-11-10  7:54 ` [PATCH v3 1/3] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro Gautham R. Shenoy
2016-11-29 10:42   ` Balbir Singh
2016-11-10  7:54 ` [PATCH v3 2/3] cpuidle:powernv: Add helper function to populate powernv idle states Gautham R. Shenoy
2016-11-23  9:49   ` Michael Ellerman
2016-11-29  6:09     ` Gautham R Shenoy
2016-11-10  7:54 ` [PATCH v3 3/3] powernv: Pass PSSCR value and mask to power9_idle_stop Gautham R. Shenoy
2016-11-23  9:51   ` Michael Ellerman
2016-11-29  6:10     ` Gautham R Shenoy
2016-11-29  6:34 ` Balbir Singh [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=9bde9678-56cf-a718-7f00-98f0eca45f22@gmail.com \
    --to=bsingharora@gmail.com \
    --cc="\"linuxppc-dev"@lists.ozlabs.org \
    --cc="skiboot\""@lists.ozlabs.org \
    --cc=benh@kernel.crashing.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=ego@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mikey@neuling.org \
    --cc=mpe@ellerman.id.au \
    --cc=oohall@gmail.com \
    --cc=paulus@samba.org \
    --cc=rjw@rjwysocki.net \
    --cc=shilpa.bhat@linux.vnet.ibm.com \
    --cc=shreyasbp@gmail.com \
    --cc=stewart@linux.vnet.ibm.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).