Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The platform probe code might want to add things to it.
While at it, make add_cpu_idle_state_properties() local to slw.c
and call it from slw_init() instead of from add_opal_node().
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Match the fast-sleep name between OPAL and HB
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jeremy.kerr@au.ibm.com>
|
|
Commit 95932150: "slw: patch hsprg0 for wakeup from winkle" added
OPAL call for HSPRG0 to be patched via slw.
Extend it to all the sprs supported in libpore.
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
The idle flag IDLE_LOSE_HYP_CONTEXT can be wrongly interpreted for
IDLE_USE_INST_SLEEP if the kernel has endian bug, which would
incorrectly enable fastsleep even though the device tree does not
advertise it.
Unfortunately, some kernels currently do have such a bug.
Additionally, current fastsleep wakeup path makes opal calls to sync
timebase which is not endian safe. This can lead to checkstops.
Hence for now change the bits used in IDLE_LOSE_HYP_CONTEXT to avoid
misinterpretation with IDLE_USE_INST_SLEEP in LE kernels.
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
It's broken on all DD1.x chips.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Don't enable it if HB doesn't allow it and fix backward logic in
the code that was supposed to disable it. Also print out more
diagnostic info.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Don't bother writing 0*constant for the non-relevant instruction
bits in the various states and keep the "normal" sleep case in
add_cpu_idle_state_properties() so we don't have to add it back
later when we have a CPU that doesn't require the workaround.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Entering winkle results in hypervisor state loss. We can use PORE to
restore hypervisor registers. This opal call adds support for that.
This patch adds support for restoring HSPRG0. It can be extended to
restore other SPRs.
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Clean up current implementation of adding idle states to device tree,
to make it more generic.
Add winkle to list of cpu-idle states if slw image is intact.
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Power8 hardware supports deep idle states like sleep and winkle.
Both sleep and winkle have fast/deep modes.
Behaviour of each mode -
Fast sleep
Stop clocks to Core and L2 cache.
Drop Core & L2 voltage to retention.
Leave shared L3 cache running
Deep sleep
Power OFF the core and private L2 cache.
Leave shared L3 cache running.
Fast winkle
Stop clocks to entire chiplet.
Drop chiplet voltage to retention.
Deep winkle
Power OFF the entire chiplet.
Requires restore/re-init to wakeup.
PM GP1 register allows us to select fast/deep modes for sleep and winkle.
Currently we are setting PM GP1 register to use fast sleep and fast winkle.
Change it such that, sleep will use fast mode and winkle will use deep mode.
With deep winkle enabled, hotplug framework in kernel can send cores to winkle
when cpus are offlined.
Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Add OPAL calls to setup xscom before and after sleep
V1:https://w3-01.ibm.com/stg/linux/ltc/mailinglists/pipermail/sapphire/2014-July/003170.html
Changes in V2:
1.Store L2 Fir Action register contents in primary thread's pointer
2.Enable secondary threads also to call opal, now that the synchronization
across threads of a core will be taken care of by the kernel. We can
hence safely call fastsleep in smt on mode.
Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Due to an errata in P8, we cannot let the OS use the sleep instruction
without some extra workarounds in the OS. So let's use a different bit
to represent that support so that existing OSes without the workaround
don't enable support for sleep mode.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|