2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/arch/powerpc/platforms/powernv
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
..
eeh-powernv.c powerpc/powernv/pci: Dynamically allocate PHB diag data 2017-06-27 12:14:27 +10:00
idle.c powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails 2017-08-08 20:21:23 +10:00
Kconfig powerpc/powernv: Always enable SMP when building powernv 2017-04-13 23:37:17 +10:00
Makefile powerpc/powernv: Split cxl code out into a separate file 2016-07-14 20:26:31 +10:00
npu-dma.c powerpc/powernv/npu-dma: Add explicit flush when sending an ATSD 2017-06-22 21:21:08 +10:00
opal-async.c powerpc/opal: Wake up kopald polling thread before waiting for events 2016-07-08 19:53:26 +10:00
opal-dump.c powerpc/powernv : Drop reference added by kset_find_obj() 2016-08-29 12:48:21 +10:00
opal-elog.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
opal-flash.c powerpc/powernv: Add interfaces for flash device access 2015-04-11 20:49:21 +10:00
opal-hmi.c powerpc/powernv: Display the correct error info for CAPP errors. 2017-02-09 10:31:36 +11:00
opal-irqchip.c powerpc/opal-irqchip: Use interrupt names if present 2017-02-09 10:31:37 +11:00
opal-kmsg.c powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages 2016-01-13 12:35:17 +11:00
opal-lpc.c powerpc: Create asm/debugfs.h and move powerpc_debugfs_root there 2017-04-11 07:46:03 +10:00
opal-memory-errors.c powerpc/powernv: Fix spelling mistake "Retrived" -> "Retrieved" 2016-06-28 13:52:18 +10:00
opal-msglog.c powerpc/powernv: Report size of OPAL memcons log 2017-01-25 13:33:55 +11:00
opal-nvram.c powerpc/powernv: Add pstore support on powernv 2015-03-23 14:06:10 +11:00
opal-power.c powerpc/powernv: Add poweroff (EPOW, DPO) events support for PowerNV platform 2015-07-16 13:34:36 +10:00
opal-prd.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
opal-rtc.c powerpc/powernv: Only delay opal_rtc_read() retry when necessary 2015-12-27 19:12:40 +11:00
opal-sensor.c powerpc/powernv: Handle OPAL_WRONG_STATE in opal_get_sensor_data() 2017-03-31 15:22:56 +11:00
opal-sysparam.c powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg 2016-06-29 17:33:18 +10:00
opal-tracepoints.c tracing: Have the reg function allow to fail 2016-12-09 09:13:30 -05:00
opal-wrappers.S powerpc/64s: Fix OPAL_CALL non-maskable interrupt reentrancy 2017-05-30 14:59:51 +10:00
opal-xscom.c powerpc/powernv: Fix XSCOM address mangling for form 1 indirect 2017-03-28 10:52:03 +11:00
opal.c powerpc/powernv: Fix boot on Power8 bare metal due to opal_configure_cores() 2017-07-17 21:30:32 +10:00
pci-cxl.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
pci-ioda.c powerpc/powernv/pci: Return failure for some uses of dma_set_mask() 2017-07-28 23:02:55 +10:00
pci.c powerpc/powernv/pci: Add support for PHB4 diagnostics 2017-06-27 12:14:27 +10:00
pci.h powerpc/powernv/pci: Dynamically allocate PHB diag data 2017-06-27 12:14:27 +10:00
powernv.h powerpc/powernv: Move CPU-Offline idle state invocation from smp.c to idle.c 2017-04-11 08:45:09 +10:00
rng.c powerpc: Consolidate variants of real-mode MMIOs 2017-04-10 21:43:16 +10:00
setup.c powerpc/powernv: Tell OPAL about our MMU mode on POWER9 2017-07-10 21:12:27 +10:00
smp.c powerpc/smp: Convert NR_CPUS to nr_cpu_ids 2017-06-28 13:08:16 +10:00
subcore-asm.S powerpc/powernv: Add support for POWER8 split core on powernv 2014-05-28 13:35:37 +10:00
subcore.c powerpc updates for 4.13 2017-07-07 13:55:45 -07:00
subcore.h powernv/powerpc: Add winkle support for offline cpus 2014-12-15 10:46:41 +11:00