[PATCH] powernv/cpuidle: Fix idle states all being marked invalid

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE2933d

3 messages, 3 authors, 2018-08-03 · open the first message on its own page

[PATCH] powernv/cpuidle: Fix idle states all being marked invalid

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2018-08-02 15:40:06

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 <redacted>
Cc: Gautham R. Shenoy <redacted>
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

Re: [PATCH] powernv/cpuidle: Fix idle states all being marked invalid

From: Akshay Adiga <hidden>
Date: 2018-08-03 06:14:32

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 <redacted>
Cc: Gautham R. Shenoy <redacted>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Akshay Adiga <redacted>
quoted hunk
---
 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

Re: powernv/cpuidle: Fix idle states all being marked invalid

From: Michael Ellerman <hidden>
Date: 2018-08-03 10:48:41

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 <redacted>
Cc: Gautham R. Shenoy <redacted>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Akshay Adiga <redacted>
Applied to powerpc next, thanks.

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

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help