public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
* [PATCH] powernv/cpuidle: Fix idle states all being marked invalid
@ 2018-08-02 15:39 Nicholas Piggin
  2018-08-03  6:14 ` Akshay Adiga
  2018-08-03 10:48 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Nicholas Piggin @ 2018-08-02 15:39 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Nicholas Piggin, Akshay Adiga, Gautham R . Shenoy

Commit 9c7b185ab2 ("powernv/cpuidle: Parse dt idle properties into
global structure") parses dt idle states into structs, but never
marks them valid. This results in all idle states being lost.

Cc: Akshay Adiga <akshay.adiga@linux•vnet.ibm.com>
Cc: Gautham R. Shenoy <ego@linux•vnet.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail•com>
---
 arch/powerpc/platforms/powernv/idle.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c
index 3116bab10aa3..ecb002c5db83 100644
--- a/arch/powerpc/platforms/powernv/idle.c
+++ b/arch/powerpc/platforms/powernv/idle.c
@@ -651,11 +651,12 @@ static int __init pnv_power9_idle_init(void)
 					      &state->psscr_mask,
 					      state->flags);
 		if (err) {
-			state->valid = false;
 			report_invalid_psscr_val(state->psscr_val, err);
 			continue;
 		}
 
+		state->valid = true;
+
 		if (max_residency_ns < state->residency_ns) {
 			max_residency_ns = state->residency_ns;
 			pnv_deepest_stop_psscr_val = state->psscr_val;
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powernv/cpuidle: Fix idle states all being marked invalid
  2018-08-02 15:39 [PATCH] powernv/cpuidle: Fix idle states all being marked invalid Nicholas Piggin
@ 2018-08-03  6:14 ` Akshay Adiga
  2018-08-03 10:48 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Akshay Adiga @ 2018-08-03  6:14 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: linuxppc-dev, Gautham R . Shenoy

On Fri, Aug 03, 2018 at 01:39:51AM +1000, Nicholas Piggin wrote:
> Commit 9c7b185ab2 ("powernv/cpuidle: Parse dt idle properties into
> global structure") parses dt idle states into structs, but never
> marks them valid. This results in all idle states being lost.
>
My bad. Thanks nick for fixing this. We definatetely need this.


> Cc: Akshay Adiga <akshay.adiga@linux•vnet.ibm.com>
> Cc: Gautham R. Shenoy <ego@linux•vnet.ibm.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail•com>

Acked-by: Akshay Adiga <akshay.adiga@linux•vnet.ibm.com>

> ---
>  arch/powerpc/platforms/powernv/idle.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c
> index 3116bab10aa3..ecb002c5db83 100644
> --- a/arch/powerpc/platforms/powernv/idle.c
> +++ b/arch/powerpc/platforms/powernv/idle.c
> @@ -651,11 +651,12 @@ static int __init pnv_power9_idle_init(void)
>  					      &state->psscr_mask,
>  					      state->flags);
>  		if (err) {
> -			state->valid = false;
>  			report_invalid_psscr_val(state->psscr_val, err);
>  			continue;
>  		}
> 
> +		state->valid = true;
> +
>  		if (max_residency_ns < state->residency_ns) {
>  			max_residency_ns = state->residency_ns;
>  			pnv_deepest_stop_psscr_val = state->psscr_val;
> -- 
> 2.17.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: powernv/cpuidle: Fix idle states all being marked invalid
  2018-08-02 15:39 [PATCH] powernv/cpuidle: Fix idle states all being marked invalid Nicholas Piggin
  2018-08-03  6:14 ` Akshay Adiga
@ 2018-08-03 10:48 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2018-08-03 10:48 UTC (permalink / raw)
  To: Nicholas Piggin, linuxppc-dev
  Cc: Gautham R . Shenoy, Akshay Adiga, Nicholas Piggin

On Thu, 2018-08-02 at 15:39:51 UTC, Nicholas Piggin wrote:
> Commit 9c7b185ab2 ("powernv/cpuidle: Parse dt idle properties into
> global structure") parses dt idle states into structs, but never
> marks them valid. This results in all idle states being lost.
> 
> Cc: Akshay Adiga <akshay.adiga@linux•vnet.ibm.com>
> Cc: Gautham R. Shenoy <ego@linux•vnet.ibm.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail•com>
> Acked-by: Akshay Adiga <akshay.adiga@linux•vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/3127692deba6eeb7ed6d416b25e91f

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-03 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02 15:39 [PATCH] powernv/cpuidle: Fix idle states all being marked invalid Nicholas Piggin
2018-08-03  6:14 ` Akshay Adiga
2018-08-03 10:48 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox