Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1622036

[PATCH 2/3] powernv:idle: Decouple TB restore & Per-core SPRs restore

From "Gautham R. Shenoy" <ego@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] powernv:idle: Decouple TB restore & Per-core SPRs restore
Date 2017-04-12 13:50 +0200
Message-ID <tvoWC-3Wi-11@gated-at.bofh.it> (permalink)
References <tvoWB-3Wi-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

The idle-exit code assumes that if Timebase is not lost, then neither
are the per-core hypervisor resources lost. This was true on POWER8
where fast-sleep lost only TB but not per-core resources, and winkle
lost both.

This assumption is not true for POWER9 however, since there can be
states which do not lose timebase but can lose per-core SPRs.

Hence check if we need to restore the per-core hypervisor state even
if timebase is not lost.

Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/idle_book3s.S | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
index 9b747e9..6a9bd28 100644
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -723,13 +723,14 @@ timebase_resync:
 	 * Use cr3 which indicates that we are waking up with atleast partial
 	 * hypervisor state loss to determine if TIMEBASE RESYNC is needed.
 	 */
-	ble	cr3,clear_lock
+	ble	cr3,.Ltb_resynced
 	/* Time base re-sync */
 	bl	opal_resync_timebase;
 	/*
-	 * If waking up from sleep, per core state is not lost, skip to
-	 * clear_lock.
+	 * If waking up from sleep (POWER8), per core state
+	 * is not lost, skip to clear_lock.
 	 */
+.Ltb_resynced:
 	blt	cr4,clear_lock
 
 	/*
-- 
1.9.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 2/3] powernv:idle: Decouple TB restore & Per-core SPRs restore "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> - 2017-04-12 13:50 +0200
  Re: [PATCH 2/3] powernv:idle: Decouple TB restore & Per-core SPRs  restore Michael Neuling <mikey@neuling.org> - 2017-04-13 09:00 +0200
    Re: [PATCH 2/3] powernv:idle: Decouple TB restore & Per-core SPRs  restore Gautham R Shenoy <ego@linux.vnet.ibm.com> - 2017-04-13 14:00 +0200

csiph-web