From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Ryan P Grimm <rgrimm@us.ibm.com>,
Michael Neuling <mikey@neuling.org>,
linuxppc-dev@lists.ozlabs.org,
Pratik Rajesh Sampat <psampat@linux.ibm.com>,
"Gautham R . Shenoy" <ego@linux.vnet.ibm.com>
Subject: Re: [PATCH] powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10
Date: Wed, 19 Aug 2020 23:06:56 +0530 [thread overview]
Message-ID: <20200819173656.GA21538@in.ibm.com> (raw)
In-Reply-To: <20200819094700.493399-1-npiggin@gmail.com>
On Wed, Aug 19, 2020 at 07:47:00PM +1000, Nicholas Piggin wrote:
> This driver does not restore stop > 3 state, so it limits itself
> to states which do not lose full state or TB.
>
> The POWER10 SPRs are sufficiently different from P9 that it seems
> easier to split out the P10 code. The POWER10 deep sleep code
> (e.g., the BHRB restore) has been taken out, but it can be re-added
> when stop > 3 support is added.
MMCRA[BHRB] save/restore was in the shallow stop-state path. But we
can add it back later.
>
> Cc: Ryan P Grimm <rgrimm@us.ibm.com>
> Cc: Michael Neuling <mikey@neuling.org>
> Cc: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> Cc: Pratik Rajesh Sampat <psampat@linux.ibm.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Just a minor comment below. But otherwise the patch looks good to me.
[..snip..]
> @@ -1093,11 +1200,15 @@ int validate_psscr_val_mask(u64 *psscr_val, u64 *psscr_mask, u32 flags)
> * @dt_idle_states: Number of idle state entries
> * Returns 0 on success
> */
> -static void __init pnv_power9_idle_init(void)
> +static void __init pnv_arch300_idle_init(void)
> {
> u64 max_residency_ns = 0;
> int i;
>
> + /* stop is not really architected, we only have p9,p10 drivers */
> + if (!pvr_version_is(PVR_POWER10) && !pvr_version_is(PVR_POWER9))
> + return;
> +
> /*
> * pnv_deepest_stop_{val,mask} should be set to values corresponding to
> * the deepest stop state.
> @@ -1112,6 +1223,11 @@ static void __init pnv_power9_idle_init(void)
> struct pnv_idle_states_t *state = &pnv_idle_states[i];
> u64 psscr_rl = state->psscr_val & PSSCR_RL_MASK;
>
> + /* No deep loss driver implemented for POWER10 yet */
> + if (pvr_version_is(PVR_POWER10) &&
> + state->flags & (OPAL_PM_TIMEBASE_STOP|OPAL_PM_LOSE_FULL_CONTEXT))
> + continue;
> +
Should we have a pr_info() informing the user the kernel is skipping
over these stop states ?
Reviewed-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
> if ((state->flags & OPAL_PM_TIMEBASE_STOP) &&
> (pnv_first_tb_loss_level > psscr_rl))
> pnv_first_tb_loss_level = psscr_rl;
--
Thanks and Regards
gautham.
next prev parent reply other threads:[~2020-08-19 17:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-19 9:47 [PATCH] powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10 Nicholas Piggin
2020-08-19 17:32 ` Vaidyanathan Srinivasan
2020-08-19 17:36 ` Gautham R Shenoy [this message]
2020-08-19 17:40 ` Pratik Sampat
2020-08-19 19:08 ` Pratik Sampat
2020-09-17 11:27 ` 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=20200819173656.GA21538@in.ibm.com \
--to=ego@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=npiggin@gmail.com \
--cc=psampat@linux.ibm.com \
--cc=rgrimm@us.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).