linux/drivers/cpuidle
Gautham R. Shenoy 785a12afdb powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails
Currently, we use the opal call opal_slw_set_reg() to inform the
Sleep-Winkle Engine (SLW) to restore the contents of some of the
Hypervisor state on wakeup from deep idle states that lose full
hypervisor context (characterized by the flag
OPAL_PM_LOSE_FULL_CONTEXT).

However, the current code has a bug in that if opal_slw_set_reg()
fails, we don't disable the use of these deep states (winkle on
POWER8, stop4 onwards on POWER9).

This patch fixes this bug by ensuring that if programing the
sleep-winkle engine to restore the hypervisor states in
pnv_save_sprs_for_deep_states() fails, then we exclude such states by
clearing the OPAL_PM_LOSE_FULL_CONTEXT flag from
supported_cpuidle_states. As a result POWER8 will be prevented from
using winkle for CPU-Hotplug, and POWER9 will put the offlined CPUs to
the default stop state when available.

Further, we ensure in the initialization of the cpuidle-powernv driver
to only include those states whose flags are present in
supported_cpuidle_states, thereby skipping OPAL_PM_LOSE_FULL_CONTEXT
states when they have been disabled due to stop-api failure.

Fixes: 1e1601b38e ("powerpc/powernv/idle: Restore SPRs for deep idle
states via stop API.")

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-08-08 20:21:23 +10:00
..
governors cpuidle: menu: allow state 0 to be disabled 2017-06-29 22:59:17 +02:00
coupled.c
cpuidle-arm.c ARM: cpuidle: Support asymmetric idle definition 2017-06-24 01:51:00 +02:00
cpuidle-at91.c
cpuidle-big_little.c
cpuidle-calxeda.c
cpuidle-clps711x.c
cpuidle-cps.c cpuidle: cpuidle-cps: remove unused variable 2017-04-19 23:04:54 +02:00
cpuidle-exynos.c
cpuidle-kirkwood.c
cpuidle-mvebu-v7.c
cpuidle-powernv.c powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails 2017-08-08 20:21:23 +10:00
cpuidle-pseries.c cpuidle: powerpc: no memory barrier after break from idle 2017-06-28 13:08:12 +10:00
cpuidle-ux500.c
cpuidle-zynq.c
cpuidle.c cpuidle: Fix idle time tracking 2017-05-15 10:15:20 +02:00
cpuidle.h
driver.c
dt_idle_states.c cpuidle: dt: Add missing 'of_node_put()' 2017-06-12 14:36:13 +02:00
dt_idle_states.h
governor.c
Kconfig
Kconfig.arm ARM: cpuidle: Support asymmetric idle definition 2017-06-24 01:51:00 +02:00
Kconfig.mips
Kconfig.powerpc
Makefile
sysfs.c cpuidle: Validate cpu_dev in cpuidle_add_sysfs() 2017-03-21 22:26:37 +01:00