Skip to contentSkip to conversation

powernv/cpuidle: Fix idle states all being marked invalid

PATCH Applied Nicholas Piggin 3 participants 3 messages Aug 2, 2018 – Aug 3, 2018 PowerPC

lore
Share & tools
lore

Nicholas Piggin

author reviewer
#0 lore raw

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

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 <[email protected]>
Cc Gautham R. Shenoy <[email protected]>
---
 arch/powerpc/platforms/powernv/idle.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/powernv/idle.c +2 -1
index 3116bab10aa3..ecb002c5db83 100644
@@ -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;
Signature · 1 line
2.17.0
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Nicholas Piggin

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.

Quoted 3 lines
Cc Akshay Adiga <[email protected]>
Cc Gautham R. Shenoy <[email protected]>
Quoted 25 lines
---
 arch/powerpc/platforms/powernv/idle.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/powernv/idle.c +2 -1
index 3116bab10aa3..ecb002c5db83 100644
@@ -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;
Signature · 1 line
2.17.0
#2 lore raw
In reply to Nicholas Piggin
Quoted 8 lines · Nicholas Piggin

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.

Applied to powerpc next, thanks.

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

cheers