linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Balbir Singh <bsingharora@gmail.com>
Cc: "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>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v3 1/3] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro
Date: Mon, 5 Dec 2016 14:52:11 +0530	[thread overview]
Message-ID: <20161205092211.GA24305@in.ibm.com> (raw)
In-Reply-To: <de9bf0bb-d188-86f5-86b1-b5931e587b63@gmail.com>

Hi Balbir,

On Tue, Nov 29, 2016 at 09:42:20PM +1100, Balbir Singh wrote:
> 
> 
> On 10/11/16 18:54, Gautham R. Shenoy wrote:
> > From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
> > 
> > Currently all the low-power idle states are expected to wake up
> > at reset vector 0x100. Which is why the macro IDLE_STATE_ENTER_SEQ
> > that puts the CPU to an idle state and never returns.
> > 
> > On ISA_300, when the ESL and EC bits in the PSSCR are zero, the
> > CPU is expected to wake up at the next instruction of the idle
> > instruction.
> > 
> > This patch adds a new macro named IDLE_STATE_ENTER_SEQ_NORET for the
> 
> I think something like IDLE_STATE_ENTER_SEQ_LOSE_CTX would be better?

As you pointed out below, the macro encapsulates the magic sequence
that needs to be executed to go to a particular idle-state.

The behaviour changes based on ESL=EC=1 (or nap,fastsleep,winkle on
POWER8) in which case wake up is at 0x100. When ESL=EC=0, the wakeup
happens at the subsequent instruction.

So, more than whether the context is lost or not, the intent is to
indicate whether the wakeup happens at the next instruction or at
0x100.

> 
> > no-return variant and reuses the name IDLE_STATE_ENTER_SEQ
> > for a variant that allows resuming operation at the instruction next
> > to the idle-instruction.
> > 
> <snip>
> > +
> > +#define	IDLE_STATE_ENTER_SEQ_NORET(IDLE_INST)			\
> > +	IDLE_STATE_ENTER_SEQ(IDLE_INST)                         \
> 
> So we start off with both as the same?
> 
> >  	b	.
> >  #endif /* CONFIG_PPC_P7_NAP */
> <snip>
> Balbir
> 
--
Thanks and Regards
gautham.

      reply	other threads:[~2016-12-05  9:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1478760806.git.ego@linux.vnet.ibm.com>
2016-11-10  7:54 ` [PATCH v3 1/3] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro Gautham R. Shenoy
2016-11-10  7:54 ` [PATCH v3 2/3] cpuidle:powernv: Add helper function to populate powernv idle states 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
     [not found] ` <9c2b5cae68b54ec5dcb2651f352f740f1d09051c.1478760806.git.ego@linux.vnet.ibm.com>
2016-11-23  9:49   ` [PATCH v3 2/3] cpuidle:powernv: Add helper function to populate powernv idle states Michael Ellerman
2016-11-29  6:09     ` Gautham R Shenoy
     [not found] ` <f3853e81d3b3a1cf51a920acbbddc8f64238d7b6.1478760806.git.ego@linux.vnet.ibm.com>
2016-11-23  9:51   ` [PATCH v3 3/3] powernv: Pass PSSCR value and mask to power9_idle_stop Michael Ellerman
2016-11-29  6:10     ` Gautham R Shenoy
2016-11-29  6:34 ` [PATCH v3 0/3] powernv:stop: Use psscr_val,mask provided by firmware Balbir Singh
     [not found] ` <e3af60739710139801505562b4f09d59a1786f65.1478760806.git.ego@linux.vnet.ibm.com>
2016-11-29 10:42   ` [PATCH v3 1/3] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro Balbir Singh
2016-12-05  9:22     ` Gautham R Shenoy [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=20161205092211.GA24305@in.ibm.com \
    --to=ego@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=bsingharora@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --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).