]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
powernv/cpuidle: Fix idle states all being marked invalid
authorNicholas Piggin <npiggin@gmail.com>
Thu, 2 Aug 2018 15:39:51 +0000 (01:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 3 Aug 2018 08:30:33 +0000 (18:30 +1000)
Commit 9c7b185ab2fe ("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.

Fixes: 9c7b185ab2fe ("powernv/cpuidle: Parse dt idle properties into global structure")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/idle.c

index 3116bab10aa3585d60c52061178b3756adb58891..ecb002c5db83b311a89055fa3b35c6cd3e94e08d 100644 (file)
@@ -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;