Message ID | 20200427011703.65898-2-huntbag@linux.vnet.ibm.com |
---|---|
State | Superseded |
Headers | show |
Series | [RFC,1/2] opal : Support for pre-entry and post-exit of stop state in opal | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (0f1937ef40fca0c3212a9dff1010b832a24fb063) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | success | Signed-off-by present |
Hello Abhishek, On Sun, Apr 26, 2020 at 08:17:03PM -0500, Abhishek Goel wrote: > This patch introduces support for firmware-stop-support. If Kernel does > not know about stop version, it can fallback to opal for idle stop > support if firmware-stop-supported property is present. > > Just like "idle-stop", "idle-stop-quirk" can be defined in features if > there is some quirk that needs to be handled and if kernel identifies > the corresponding version it can use that or fallback to opal for idle > stop support. > > The complete idea was previosuly posted in this patch: > https://patchwork.ozlabs.org/project/skiboot/list/?series=162400 > > Signed-off-by: Pratik Rajesh Sampat <psampat@linux.ibm.com> > Signed-off-by: Abhishek Goel <huntbag@linux.vnet.ibm.com> > --- > > v1->v2 : This patch has been newly added in this series. > > core/cpufeatures.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/core/cpufeatures.c b/core/cpufeatures.c > index c6754abb..1f516028 100644 > --- a/core/cpufeatures.c > +++ b/core/cpufeatures.c > @@ -510,6 +510,19 @@ static const struct cpu_feature cpu_features_table[] = { > -1, -1, -1, > NULL, }, > > + /* > + * ISAv3.0B firmware-stop-support > + * Opal fallback for shallow stop states > + */ > +#ifdef HAVE_BIG_ENDIAN > + { "firmware-stop-supported", In this patchset, you are supporting only the non-hypervisor loss stop states (stop0, stop1, stop2) only in the opal cpuidle-driver. Is the string "firmware-stop-supported" intended for only that ? In that case it should be documented, so that in the presence of this feature, should the kernel choose to opt for opal cpuidle-driver, it will select only shallow states. > + CPU_P9, > + ISA_V3_0B, USABLE_HV|USABLE_OS, > + HV_CUSTOM, OS_CUSTOM, > + -1, -1, -1, > + NULL, }, > +#endif > + > /* > * ISAv3.0B Hypervisor Virtualization Interrupt > * Also associated system registers, LPCR EE, HEIC, HVICE, > -- > 2.17.1 >
Hi Gautham, On 04/27/2020 03:06 PM, Gautham R Shenoy wrote: > Hello Abhishek, > > On Sun, Apr 26, 2020 at 08:17:03PM -0500, Abhishek Goel wrote: >> This patch introduces support for firmware-stop-support. If Kernel does >> not know about stop version, it can fallback to opal for idle stop >> support if firmware-stop-supported property is present. >> >> Just like "idle-stop", "idle-stop-quirk" can be defined in features if >> there is some quirk that needs to be handled and if kernel identifies >> the corresponding version it can use that or fallback to opal for idle >> stop support. >> >> The complete idea was previosuly posted in this patch: >> https://patchwork.ozlabs.org/project/skiboot/list/?series=162400 >> >> Signed-off-by: Pratik Rajesh Sampat <psampat@linux.ibm.com> >> Signed-off-by: Abhishek Goel <huntbag@linux.vnet.ibm.com> >> --- >> >> v1->v2 : This patch has been newly added in this series. >> >> core/cpufeatures.c | 13 +++++++++++++ >> 1 file changed, 13 insertions(+) >> >> diff --git a/core/cpufeatures.c b/core/cpufeatures.c >> index c6754abb..1f516028 100644 >> --- a/core/cpufeatures.c >> +++ b/core/cpufeatures.c >> @@ -510,6 +510,19 @@ static const struct cpu_feature cpu_features_table[] = { >> -1, -1, -1, >> NULL, }, >> >> + /* >> + * ISAv3.0B firmware-stop-support >> + * Opal fallback for shallow stop states >> + */ >> +#ifdef HAVE_BIG_ENDIAN >> + { "firmware-stop-supported", > > In this patchset, you are supporting only the non-hypervisor > loss stop states (stop0, stop1, stop2) only in the opal > cpuidle-driver. Is the string "firmware-stop-supported" intended for > only that ? In that case it should be documented, so that in the > presence of this feature, should the kernel choose to opt for opal > cpuidle-driver, it will select only shallow states. > > > As of now, it is intended for only shallow states. Will include documentation for it in next iteration. Thanks, Abhishek
diff --git a/core/cpufeatures.c b/core/cpufeatures.c index c6754abb..1f516028 100644 --- a/core/cpufeatures.c +++ b/core/cpufeatures.c @@ -510,6 +510,19 @@ static const struct cpu_feature cpu_features_table[] = { -1, -1, -1, NULL, }, + /* + * ISAv3.0B firmware-stop-support + * Opal fallback for shallow stop states + */ +#ifdef HAVE_BIG_ENDIAN + { "firmware-stop-supported", + CPU_P9, + ISA_V3_0B, USABLE_HV|USABLE_OS, + HV_CUSTOM, OS_CUSTOM, + -1, -1, -1, + NULL, }, +#endif + /* * ISAv3.0B Hypervisor Virtualization Interrupt * Also associated system registers, LPCR EE, HEIC, HVICE,