linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] powerpc: powernv: Enable stop4 via cpuidle
@ 2017-07-18 14:28 Gautham R. Shenoy
  2017-07-18 14:28 ` [PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle Gautham R. Shenoy
  2017-07-18 14:28 ` [PATCH 2/2] powernv/powerpc: Clear PECE1 in LPCR via stop-api only on Hotplug Gautham R. Shenoy
  0 siblings, 2 replies; 7+ messages in thread
From: Gautham R. Shenoy @ 2017-07-18 14:28 UTC (permalink / raw)
  To: Michael Ellerman, Michael Neuling, Nicholas Piggin,
	Vaidyanathan Srinivasan, Shilpasri G Bhat, Akshay Adiga
  Cc: linuxppc-dev, linux-kernel, Gautham R. Shenoy

From: "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>

Hi,

The stop4 idle state on POWER9 is a deep idle state which loses
hypervisor resources, but whose latency is low enough that it can be
exposed via cpuidle.

Until now, the deep idle states which lose hypervisor resources (eg:
winkle) were only exposed via CPU-Hotplug.  Hence currently on wakeup
from such states, barring a few SPRs which need to be restored to
their older value, rest of the SPRS are reinitialized to their values
corresponding to that at boot time. When stop4 is used in the context
of cpuidle, we want these additional SPRs to be restored to their
older value, to ensure that the context on the CPU coming back from
idle is same as it was before going idle.

Additionally, the CPU which is in stop4 while idling can be woken up
by the decrementer interrupts. So we need to ensure that the LPCR is
programmed with PECE1 bit cleared via the stop-api only for the
CPU-Hotplug case and not for cpuidle.

The two patches in the series address this problem.

Gautham R. Shenoy (2):
  powernv/powerpc: Save/Restore additional SPRs for stop4 cpuidle
  powernv/powerpc: Clear PECE1 in LPCR via stop-api only on Hotplug

 arch/powerpc/include/asm/paca.h       |  7 ++++++
 arch/powerpc/kernel/asm-offsets.c     | 12 +++++++++
 arch/powerpc/kernel/idle_book3s.S     | 46 +++++++++++++++++++++++++++++++++--
 arch/powerpc/platforms/powernv/idle.c | 12 ++++++++-
 arch/powerpc/platforms/powernv/smp.c  | 28 ++++++++++++++++++---
 5 files changed, 98 insertions(+), 7 deletions(-)

-- 
1.9.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-25 10:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-18 14:28 [PATCH 0/2] powerpc: powernv: Enable stop4 via cpuidle Gautham R. Shenoy
2017-07-18 14:28 ` [PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle Gautham R. Shenoy
2017-07-18 14:28 ` [PATCH 2/2] powernv/powerpc: Clear PECE1 in LPCR via stop-api only on Hotplug Gautham R. Shenoy
2017-07-19  2:14   ` Nicholas Piggin
2017-07-19  5:04     ` Gautham R Shenoy
2017-07-19  5:20       ` Nicholas Piggin
2017-07-25 10:46         ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).