Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753380AbdGSMng (ORCPT ); Wed, 19 Jul 2017 08:43:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37271 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751448AbdGSMnf (ORCPT ); Wed, 19 Jul 2017 08:43:35 -0400 Date: Wed, 19 Jul 2017 18:13:28 +0530 From: Gautham R Shenoy To: Michael Ellerman Cc: Nicholas Piggin , "Gautham R. Shenoy" , Michael Neuling , Vaidyanathan Srinivasan , Shilpasri G Bhat , Akshay Adiga , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [v2 PATCH 1/2] powernv/powerpc:Save/Restore additional SPRs for stop4 cpuidle Reply-To: ego@linux.vnet.ibm.com References: <20170719190323.42a0c509@roar.ozlabs.ibm.com> <8760eoiqae.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8760eoiqae.fsf@concordia.ellerman.id.au> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 x-cbid: 17071912-0052-0000-0000-000002428AED X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007387; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00889802; UDB=6.00444495; IPR=6.00669974; BA=6.00005479; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016274; XFM=3.00000015; UTC=2017-07-19 12:43:33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071912-0053-0000-0000-000051611DFB Message-Id: <20170719124328.GB30836@in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-19_08:,, 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-1706020000 definitions=main-1707190206 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1732 Lines: 54 Hi Nicholas, Michael, On Wed, Jul 19, 2017 at 10:07:05PM +1000, Michael Ellerman wrote: > Nicholas Piggin writes: > >> diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c > >> index a7b5af3..0262283 100644 > >> --- a/arch/powerpc/kernel/asm-offsets.c > >> +++ b/arch/powerpc/kernel/asm-offsets.c > >> @@ -743,6 +743,18 @@ int main(void) > >> OFFSET(PACA_SUBCORE_SIBLING_MASK, paca_struct, subcore_sibling_mask); > >> OFFSET(PACA_SIBLING_PACA_PTRS, paca_struct, thread_sibling_pacas); > >> OFFSET(PACA_REQ_PSSCR, paca_struct, requested_psscr); > >> + > >> + OFFSET(PACA_PID, paca_struct, stop_spr_save_area[0]); > >> + OFFSET(PACA_LDBAR, paca_struct, stop_spr_save_area[1]); > >> + OFFSET(PACA_FSCR, paca_struct, stop_spr_save_area[2]); > >> + OFFSET(PACA_HFSCR, paca_struct, stop_spr_save_area[3]); > >> + > >> + /* On POWER9, we are already saving MMCR0 for ESL=EC=1 */ > >> + OFFSET(PACA_MMCRA, paca_struct, stop_spr_save_area[4]); > >> + OFFSET(PACA_MMCR1, paca_struct, stop_spr_save_area[5]); > >> + OFFSET(PACA_MMCR2, paca_struct, stop_spr_save_area[6]); > > > > Don't these offset names go against convention? > > > > Look at e.g., how PACA_EXGEN is used. I would prefer using that > > convention. You could make the name slightly shorter too, e.g., > > just stop_sprs or so. > > Yes please. > > If I see PACA_MMCRA I'm expecting that's paca->mmcra. Ah, ok. I will fix this. > > Also if the same values always go in the same place then please use a > proper struct, rather than an array. ie. > Ok, I will add the struct instead of a array. > struct stop_sprs > { > u64 pid; > u64 ldbar; > ... > } > > cheers > -- Thanks and Regards gautham.