powernv/cpuidle: Fix idle states all being marked invalid
Nicholas Piggin
reviewerPATCH 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.
--- arch/powerpc/platforms/powernv/idle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/powernv/idle.c +2 -1
@@ -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
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]>Signed-off-by Nicholas Piggin <[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@@ -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
Michael Ellerman
AppliedQuoted 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.Cc Akshay Adiga <[email protected]>Cc Gautham R. Shenoy <[email protected]>Signed-off-by Nicholas Piggin <[email protected]>Acked-by Akshay Adiga <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/3127692deba6eeb7ed6d416b25e91f
cheers