kernel_optimize_test/arch/powerpc/platforms
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
..
8xx powerpc/8xx: Implement support of hugepages 2016-12-09 22:49:07 -06:00
40x powerpc updates for 4.10 2016-12-16 09:26:42 -08:00
44x powerpc/44x/fsp2: Platform support for FSP2 (476fpe) board 2017-05-30 14:59:51 +10:00
52xx powerpc/mpc52xx: Don't select user-visible RTAS_PROC 2017-05-03 14:45:37 +10:00
82xx powerpc/e8248e: Select PHYLIB only if NETDEVICES is enabled 2016-09-24 23:59:47 -05:00
83xx powerpc/83xx/mpc832x_rdb: fix of_irq_to_resource() error check 2017-08-02 19:26:52 +10:00
85xx powerpc: Add struct smp_ops_t.cause_nmi_ipi operation 2017-04-28 21:02:25 +10:00
86xx powerpc: Add struct smp_ops_t.cause_nmi_ipi operation 2017-04-28 21:02:25 +10:00
512x powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
amigaone
cell Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-15 12:00:42 -07:00
chrp powerpc: Add struct smp_ops_t.cause_nmi_ipi operation 2017-04-28 21:02:25 +10:00
embedded6xx powerpc: Add support for relative exception tables 2016-11-14 11:11:51 +11:00
maple powerpc: Move isa bridge definitions to separate include 2017-01-31 13:54:17 +11:00
pasemi powerpc/pasemi: Do not process external or decrementer interrupts from sreset 2017-04-28 21:02:25 +10:00
powermac powerpc: Add struct smp_ops_t.cause_nmi_ipi operation 2017-04-28 21:02:25 +10:00
powernv powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails 2017-08-08 20:21:23 +10:00
ps3 powerpc: ps3: use dev_groups and not dev_attrs for bus_type 2017-06-09 11:00:46 +02:00
pseries powerpc/pseries: Fix of_node_put() underflow during reconfig remove 2017-07-26 16:41:53 +10:00
fsl_uli1575.c
Kconfig powerpc/book3s64: Move PPC_DT_CPU_FTRs and enable it by default 2017-06-08 20:42:57 +10:00
Kconfig.cputype powerpc/mm/hugetlb: add support for 1G huge pages 2017-07-06 16:24:33 -07:00
Makefile