From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752928AbdHGKl7 (ORCPT ); Mon, 7 Aug 2017 06:41:59 -0400 Received: from ozlabs.org ([103.22.144.67]:41145 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752846AbdHGKlz (ORCPT ); Mon, 7 Aug 2017 06:41:55 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: e1c1cfed54326fd2b17c78f0c85092167fc0783b In-Reply-To: <57ed82bcd92cd4d0af7ae5113710d597a331c433.1500631040.git.ego@linux.vnet.ibm.com> To: "Gautham R. Shenoy" , Michael Neuling , Nicholas Piggin , Vaidyanathan Srinivasan , Shilpasri G Bhat , Akshay Adiga From: Michael Ellerman Cc: "Gautham R. Shenoy" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [v3, 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle Message-Id: <3xQvGp1NXbz9tWT@ozlabs.org> Date: Mon, 7 Aug 2017 20:41:53 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2017-07-21 at 10:41:37 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > 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. > > In this patch, we define a SPR save area in PACA (since we have used > up the volatile register space in the stack) and on POWER9, we restore > SPRN_PID, SPRN_LDBAR, SPRN_FSCR, SPRN_HFSCR, SPRN_MMCRA, SPRN_MMCR1, > SPRN_MMCR2 to the values they had before entering stop. > > Signed-off-by: Gautham R. Shenoy > Reviewed-by: Nicholas Piggin Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/e1c1cfed54326fd2b17c78f0c85092 cheers