Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751804AbdIUBrM (ORCPT ); Wed, 20 Sep 2017 21:47:12 -0400 Received: from ozlabs.org ([103.22.144.67]:56131 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbdIUBqo (ORCPT ); Wed, 20 Sep 2017 21:46:44 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 5d298baa41883fc421acfd932799c0f4177249ae In-Reply-To: <1504180061-32345-1-git-send-email-ego@linux.vnet.ibm.com> To: "Gautham R. Shenoy" , Nicholas Piggin , Vaidyanathan Srinivasan , Shilpasri G Bhat , Akshay Adiga , Pavithra Prakash From: Michael Ellerman Cc: "Gautham R. Shenoy" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline Message-Id: <3xyKGW0mggz9s78@ozlabs.org> Date: Thu, 21 Sep 2017 11:46:43 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1453 Lines: 35 On Thu, 2017-08-31 at 11:47:41 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via > stop-api only on Hotplug") clears the PECE1 bit of the LPCR via > stop-api during CPU-Hotplug to prevent wakeup due to a decrementer on > an offlined CPU which is in a deep stop state. > > In the case where the stop-api support is found to be lacking, the > commit 785a12afdb4a ("powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT > states when stop-api fails") disables deep states that lose hypervisor > context. Thus in this case, the offlined CPU will be put to some > shallow idle state. > > However, we currently unconditionally clear the PECE1 in LPCR via > stop-api during CPU-Hotplug even when deep states are disabled due to > stop-api failure. > > Fix this by clearing PECE1 of LPCR via stop-api during CPU-Hotplug > *only* when the offlined CPU will be put to a deep state that loses > hypervisor context. > > Fixes: commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via > stop-api only on Hotplug") > > Reported-by: Pavithra Prakash > Signed-off-by: Gautham R. Shenoy > Reviewed-by: Nicholas Piggin > Tested-by: Pavithra Prakash Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/5d298baa41883fc421acfd932799c0 cheers