Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753104AbdF2MVo (ORCPT ); Thu, 29 Jun 2017 08:21:44 -0400 Received: from ozlabs.org ([103.22.144.67]:48545 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752920AbdF2MVb (ORCPT ); Thu, 29 Jun 2017 08:21:31 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 4d0d7c02df680740da41f5f92a238c35796ca5be In-Reply-To: <1498612609-13677-1-git-send-email-akshay.adiga@linux.vnet.ibm.com> To: Akshay Adiga , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org From: Michael Ellerman Cc: ego@linux.vnet.ibm.com, Akshay Adiga , npiggin@gmail.com Subject: Re: powernv:idle: Clear r12 on wakeup from stop lite Message-Id: <3wyzKc5KLkz9s76@ozlabs.org> Date: Thu, 29 Jun 2017 22:21:24 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 29 On Wed, 2017-06-28 at 01:16:49 UTC, Akshay Adiga wrote: > pnv_wakeup_noloss expects R12 to contain SRR1 value to determine if > the wakeup reason is an HMI in CHECK_HMI_INTERRUPT. > > When we wakeup with ESL=0, SRR1 will not contain the wakeup reason, so > there is no point setting R12 to SRR1. > > However, we don't set R12 at all and R12 contains garbage, and still > being used to check HMI assuming that it had SRR1. causing the > OPAL msglog to be filled with the following print: > HMI: Received HMI interrupt: HMER = 0x0040000000000000 > > This patch clears R12 after waking up from stop with ESL=EC=0, so that > we don't accidentally enter the HMI handler in pnv_wakeup_noloss if > the R12[42:45] corresponds to HMI as wakeup reason. > > Bug existed prior to "commit 9d29250136f6 ("powerpc/64s/idle: Avoid SRR > usage in idle sleep/wake paths") but was never hit in practice > > Signed-off-by: Akshay Adiga > Fixes: 9d29250136f6 ("powerpc/64s/idle: Avoid SRR usage in idle > sleep/wake paths") > Reviewed-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/4d0d7c02df680740da41f5f92a238c cheers