mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 04:34:11 +08:00
785a12afdb
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:
|
||
---|---|---|
.. | ||
eeh-powernv.c | ||
idle.c | ||
Kconfig | ||
Makefile | ||
npu-dma.c | ||
opal-async.c | ||
opal-dump.c | ||
opal-elog.c | ||
opal-flash.c | ||
opal-hmi.c | ||
opal-irqchip.c | ||
opal-kmsg.c | ||
opal-lpc.c | ||
opal-memory-errors.c | ||
opal-msglog.c | ||
opal-nvram.c | ||
opal-power.c | ||
opal-prd.c | ||
opal-rtc.c | ||
opal-sensor.c | ||
opal-sysparam.c | ||
opal-tracepoints.c | ||
opal-wrappers.S | ||
opal-xscom.c | ||
opal.c | ||
pci-cxl.c | ||
pci-ioda.c | ||
pci.c | ||
pci.h | ||
powernv.h | ||
rng.c | ||
setup.c | ||
smp.c | ||
subcore-asm.S | ||
subcore.c | ||
subcore.h |