From: Gautham R Shenoy <ego@linux.vnet.ibm.com>
To: Pratik Rajesh Sampat <psampat@linux.ibm.com>
Cc: ego@linux.vnet.ibm.com, mikey@neuling.org,
pratik.r.sampat@gmail.com, vaidy@linux.ibm.com,
linux-kernel@vger.kernel.org, npiggin@gmail.com,
linuxppc-dev@ozlabs.org, oohall@gmail.com,
skiboot@lists.ozlabs.org
Subject: Re: [RFC 3/3] Introduce capability for firmware-enabled-stop
Date: Wed, 8 Apr 2020 16:24:43 +0530 [thread overview]
Message-ID: <20200408105443.GE950@in.ibm.com> (raw)
In-Reply-To: <55fa5021e4de901f05ded8b669777711bf2a9724.1583332695.git.psampat@linux.ibm.com>
Hi Pratik,
On Wed, Mar 04, 2020 at 09:31:23PM +0530, Pratik Rajesh Sampat wrote:
> Design patch that introduces the capability for firmware to handle the
> stop states instead. A bit is set based on the discovery of the feature
> and correspondingly also the responsibility to handle the stop states.
>
> The commit does not contain calling into the firmware to utilize
> firmware enabled stop.
>
> Signed-off-by: Pratik Rajesh Sampat <psampat at linux.ibm.com>
> ---
> arch/powerpc/include/asm/processor.h | 1 +
> arch/powerpc/kernel/dt_cpu_ftrs.c | 9 +++++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h
> index 277dbabafd02..978fab35d133 100644
> --- a/arch/powerpc/include/asm/processor.h
> +++ b/arch/powerpc/include/asm/processor.h
> @@ -430,6 +430,7 @@ extern unsigned long cpuidle_disable;
> enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF};
>
> #define STOP_ENABLE 0x00000001
> +#define FIRMWARE_STOP_ENABLE 0x00000010
This could be made a bit in the "version" variable.
>
> #define STOP_VERSION_P9 0x1
> #define STOP_VERSION_P9_V1 0x2
> diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
> index 63e30aa49356..e00f8afabc46 100644
> --- a/arch/powerpc/kernel/dt_cpu_ftrs.c
> +++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
> @@ -313,6 +313,14 @@ static int __init feat_enable_idle_stop_quirk(struct dt_cpu_feature *f)
>
> return 1;
> }
> +
> +static int __init feat_enable_firmware_stop(struct dt_cpu_feature *f)
> +{
> + stop_dep.cpuidle_prop |= FIRMWARE_STOP_ENABLE;
stop_dep.cpuidle_version |= FIRMWARE_STOP_V1; or some such
variant.
> +
> + return 1;
> +}
> +
> static int __init feat_enable_mmu_hash(struct dt_cpu_feature *f)
> {
> u64 lpcr;
> @@ -608,6 +616,7 @@ static struct dt_cpu_feature_match __initdata
> {"alignment-interrupt-dsisr", feat_enable_align_dsisr, 0},
> {"idle-stop", feat_enable_idle_stop, 0},
> {"idle-stop-v1", feat_enable_idle_stop_quirk, 0},
> + {"firmware-stop-supported", feat_enable_firmware_stop, 0},
> {"machine-check-power8", feat_enable_mce_power8, 0},
> {"performance-monitor-power8", feat_enable_pmu_power8, 0},
> {"data-stream-control-register", feat_enable_dscr, CPU_FTR_DSCR},
> --
> 2.24.1
>
prev parent reply other threads:[~2020-04-08 10:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 16:01 [RFC 0/3] cpuidle/powernv: Interface to handle idle-stop versioning Pratik Rajesh Sampat
2020-03-04 16:01 ` [RFC 1/3] Interface for an idle-stop dependency structure Pratik Rajesh Sampat
2020-04-08 10:51 ` Gautham R Shenoy
2020-04-12 12:18 ` Pratik Sampat
2020-03-04 16:01 ` [RFC 2/3] Demonstration of handling an idle-stop quirk version Pratik Rajesh Sampat
2020-03-04 16:01 ` [RFC 3/3] Introduce capability for firmware-enabled-stop Pratik Rajesh Sampat
2020-04-08 10:54 ` 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=20200408105443.GE950@in.ibm.com \
--to=ego@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=npiggin@gmail.com \
--cc=oohall@gmail.com \
--cc=pratik.r.sampat@gmail.com \
--cc=psampat@linux.ibm.com \
--cc=skiboot@lists.ozlabs.org \
--cc=vaidy@linux.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).