Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933214AbcK2GKw (ORCPT ); Tue, 29 Nov 2016 01:10:52 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54726 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933144AbcK2GKn (ORCPT ); Tue, 29 Nov 2016 01:10:43 -0500 Date: Tue, 29 Nov 2016 11:40:35 +0530 From: Gautham R Shenoy To: Michael Ellerman Cc: "Gautham R. Shenoy" , Benjamin Herrenschmidt , Paul Mackerras , "Rafael J. Wysocki" , Daniel Lezcano , Michael Neuling , Vaidyanathan Srinivasan , "Shreyas B. Prabhu" , Shilpasri G Bhat , Stewart Smith , Balbir Singh , "Oliver O'Halloran" , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, skiboot@lists.ozlabs.org Subject: Re: [PATCH v3 3/3] powernv: Pass PSSCR value and mask to power9_idle_stop Reply-To: ego@linux.vnet.ibm.com References: <87shqittgx.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87shqittgx.fsf@concordia.ellerman.id.au> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16112906-0056-0000-0000-000002108820 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006161; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000193; SDB=6.00786738; UDB=6.00380481; IPR=6.00564427; BA=6.00004923; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013476; XFM=3.00000011; UTC=2016-11-29 06:10:41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16112906-0057-0000-0000-000006439231 Message-Id: <20161129061035.GB30454@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-29_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611290104 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1809 Lines: 48 Hi Michael, On Wed, Nov 23, 2016 at 08:51:10PM +1100, Michael Ellerman wrote: > "Gautham R. Shenoy" writes: > > > From: "Gautham R. Shenoy" > > > > The power9_idle_stop method currently takes only the requested stop > > level as a parameter and picks up the rest of the PSSCR bits from a > > hand-coded macro. This is not a very flexible design, especially when > > the firmware has the capability to communicate the psscr value and the > > mask associated with a particular stop state via device tree. > > > > This patch modifies the power9_idle_stop API to take as parameters the > > PSSCR value and the PSSCR mask corresponding to the stop state that > > needs to be set. These PSSCR value and mask are respectively obtained > > by parsing the "ibm,cpu-idle-state-psscr" and > > "ibm,cpu-idle-state-psscr-mask" fields from the device tree. > > > > In addition to this, the patch adds support for handling stop states > > for which ESL and EC bits in the PSSCR are zero. As per the > > architecture, a wakeup from these stop states resumes execution from > > the subsequent instruction as opposed to waking up at the System > > Vector. > > > > The older firmware sets only the Requested Level (RL) field in the > > psscr and psscr-mask exposed in the device tree. For older firmware > > where psscr-mask=0xf, this patch will set the default sane values that > > the set for for remaining PSSCR fields (i.e PSLL, MTL, ESL, EC, and > > TR). > > So we're using psscr-mas=0xf as a signal that we're running on old > firmware. > > That's OK I think, but please send a patch to document it in the device > tree binding. > > And call it out below in the code. Sure will do this! Thanks for reviewing the code. > > cheers > -- Thanks and Regards gautham.