From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756472AbdELJhH (ORCPT ); Fri, 12 May 2017 05:37:07 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:35123 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755287AbdELJgD (ORCPT ); Fri, 12 May 2017 05:36:03 -0400 Date: Fri, 12 May 2017 19:35:44 +1000 From: Nicholas Piggin To: "Gautham R. Shenoy" Cc: Michael Ellerman , Michael Neuling , Vaidyanathan Srinivasan , Shilpasri G Bhat , Akshay Adiga , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powernv:idle: Set NAPSTATELOST after recovering paca on P9 DD1 Message-ID: <20170512193544.258914c5@roar.ozlabs.ibm.com> In-Reply-To: <1494580926-17590-1-git-send-email-ego@linux.vnet.ibm.com> References: <1494580926-17590-1-git-send-email-ego@linux.vnet.ibm.com> Organization: IBM X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 12 May 2017 14:52:06 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup > from a stop on P9 DD1") promises to set the NAPSTATELOST bit in paca > after recovering the correct paca for the thread waking up from stop1 > on DD1, so that the GPRs can be correctly restored on the stop exit > path. However, it loads the value 1 into r3, but stores the value in > r0 into NAPSTATELOST(r13). > > Fix this by correctly set the NAPSTATELOST bit in paca after > recovering the paca on POWER9 DD1. > > Fixes: commit 17ed4c8f81da ("powerpc/powernv: Recover correct PACA on wakeup > from a stop on P9 DD1") > > Signed-off-by: Gautham R. Shenoy This looks obviously correct to me. Reviewed-by: Nicholas Piggin > --- > arch/powerpc/kernel/idle_book3s.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S > index 07d4e0a..4898d67 100644 > --- a/arch/powerpc/kernel/idle_book3s.S > +++ b/arch/powerpc/kernel/idle_book3s.S > @@ -416,7 +416,7 @@ power9_dd1_recover_paca: > * which needs to be restored from the stack. > */ > li r3, 1 > - stb r0,PACA_NAPSTATELOST(r13) > + stb r3,PACA_NAPSTATELOST(r13) > blr > > /*