Commit f3b3f28493d9 ("powerpc/powernv/idle: Don't override default/deepest directly in kernel", 2017-03-22) made the following change in pnv_cpu_offline() in arch/powerpc/platforms/powernv/idle.c:
- if (cpu_has_feature(CPU_FTR_ARCH_300)) { + if (cpu_has_feature(CPU_FTR_ARCH_300) && deepest_stop_found) { srr1 = power9_idle_stop(pnv_deepest_stop_psscr_val, pnv_deepest_stop_psscr_mask); } else if (idle_states & OPAL_PM_WINKLE_ENABLED) { srr1 = power7_winkle(); Which seems to be saying that previously, on POWER9 we would always call power9_idle_stop(), but now we might possibly call power7_idle_insn() to do a nap or sleep or rvwinkle instruction. Is this really what was meant? Nap, sleep and rvwinkle are illegal instructions on POWER9. It looks to me as if that statement needs to be restructured to do what the commit description says, which is to call power9_idle_stop if we have found a valid stop state, and otherwise to poll. At present we are relying on idle_states not not having any of the nap/sleep/winkle bits set in it. Is that guaranteed on POWER9? If so it is at least deserving of a comment. Paul.