Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1346035ybh; Sun, 19 Jul 2020 16:59:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9wmjd8wV45AfkHZIgTADWZDOlVe2gBF37/1tBOM+bC1/SnsT77oiTbSN24tpheNQOw8mt X-Received: by 2002:a17:906:1756:: with SMTP id d22mr18395862eje.29.1595203166075; Sun, 19 Jul 2020 16:59:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595203166; cv=none; d=google.com; s=arc-20160816; b=Tr15gnPWWSBxWw95TFkjCuT6+EchfHhwnF8R7XQ3S4h/55oGSrz/++om1tdx9Aavu1 XSii4qcF/91aIzWAtk8aO+WA6G8YamVTasDE92YqwKsCx6t7h8JE8MPBmGEnZg2Gk6kC k/l+tupKAAkLe33v2kIaDV+hcv0SkEQzDUQhAnjKDrukBOY3z/uO+l0FpDnlGYQCAFCh uM94YX6P96CgnU4cBygQpJ08kufTn+4a3rVXOzTEdfZKli6rmXxee4O6uPG53ivM4NCm hym2GnKuV8dbK5XTyDfOsIGu7xbrZvJKMHfyaVxRtTrln1iakM9mxusK60xMMkzk+hHi bRVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:message-id :mime-version:in-reply-to:references:to:subject:from:date :dkim-signature; bh=dSG09n2oHE5/NB8epYDiKNjgxgruVUEVoorNceuh6EY=; b=vssoGqnGFcfOERUKuL87XQAsBnxfvbw58fZqS2rHh+uOWDMnEGnTAIveL97kJTrad2 eYAuuv8t8CgNfNGFmPnc4p4tJw0hThznaxlzrSGe5bvYfQdiOghJqNL0DTa+iLMPsx6Q w0Z5nAhAMgEriGvoymAzikb2x/dB0I2N6W4elZz/ff8JZZgMtjq7JrRYU/Key7FsgS8b UIKFDkMHF9c4Wb2argCikoPf2xsGiNx8bVYdNoV4ol7o2rzmr+ctpcQGRRmrkG5lhq0m qQBb6YdxMQ9N6aF7LdXt+nkTkU3udWShwIidXQHKb4XCWrGUXfKt6nps+8n8sAbGjobv hf+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uT2+zaTb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs1si10945754edb.76.2020.07.19.16.59.00; Sun, 19 Jul 2020 16:59:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uT2+zaTb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726710AbgGSX5t (ORCPT + 99 others); Sun, 19 Jul 2020 19:57:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726312AbgGSX5s (ORCPT ); Sun, 19 Jul 2020 19:57:48 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF12C0619D2 for ; Sun, 19 Jul 2020 16:57:48 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id t11so8138719pfq.11 for ; Sun, 19 Jul 2020 16:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:references:in-reply-to:mime-version:message-id :content-transfer-encoding; bh=dSG09n2oHE5/NB8epYDiKNjgxgruVUEVoorNceuh6EY=; b=uT2+zaTbOowRyb+wAcQBYeUv45J/Uf3EtbdGezLqWCyzpuGEB8+JT+Bo9PbbWD6ZxT HtYgGwE6dkaBwIHbqKPqZw0CdpdMT8kJsUlOWH9kWg5v8oIM9UvKNbC03RX1ortX/ZMv Nl5Mck8Sn6oyAGelsP0GV48owyO7tKxHiiCkAvRGCbgmhblyKlMu5qgDEj2wvmSS1/fr W9wt3MPRdoyWV48fo5ooyqv4REhSo+evd6JGB2OJc1Ps4rKzt0bBhvPc3Pdv2qCB1gws d+MInfYr4ER9i5NEAx9Vpkbdt0oS//B2gOF3ggn/opFZP9oTjZLy0z7KxtwPGWxYpQqY iq0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=dSG09n2oHE5/NB8epYDiKNjgxgruVUEVoorNceuh6EY=; b=Py1uQHuTsK20RmRfWMu3OPKYI7C+My4EUiMLBeN2Bc+Je84KVxPuqy/mzQAYuXxub4 G+b20OpSAgZIjEDe8ENj1CDpxqniAhVjzecMEn4YyxyexCmYIMlJ3gzEKOskHLtJbkkl t6kmxjRNp+I3GkAdcKd5jwYekd4d2egLL13CdpjlqoJ4NqxiJi1vqse1vvsUtKYiT1KK IzKE95J/ivoeLzdH8/GjIbJo0w/EksBem4gfIR2YlozzBD9X7UX6P/YGOdbDpbmrCzLF 6Lc9ck/DqogmqeMBtN/wZA8GKeOwfyMbeBUeVQJ/KalbMya0IjfaLvjgvPtkxiHm4Vx/ itwg== X-Gm-Message-State: AOAM5313PkA7sCJFUOMMMzxWIvp+LNCB7/yj5r91DJOAwBnaGPzdlj1S sOaKMB3Ji45+ODPdto16bp26GCHj X-Received: by 2002:a62:7790:: with SMTP id s138mr16509948pfc.65.1595203068075; Sun, 19 Jul 2020 16:57:48 -0700 (PDT) Received: from localhost (110-174-173-27.tpgi.com.au. [110.174.173.27]) by smtp.gmail.com with ESMTPSA id b11sm14802158pfr.179.2020.07.19.16.57.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jul 2020 16:57:47 -0700 (PDT) Date: Mon, 20 Jul 2020 09:57:41 +1000 From: Nicholas Piggin Subject: Re: [PATCH v3 2/3] powerpc/powernv/idle: Rename pnv_first_spr_loss_level variable To: benh@kernel.crashing.org, ego@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mikey@neuling.org, mpe@ellerman.id.au, paulus@samba.org, pratik.r.sampat@gmail.com, Pratik Rajesh Sampat , svaidy@linux.ibm.com References: <20200717185306.60607-1-psampat@linux.ibm.com> <20200717185306.60607-3-psampat@linux.ibm.com> In-Reply-To: <20200717185306.60607-3-psampat@linux.ibm.com> MIME-Version: 1.0 Message-Id: <1595202681.bt4670u7q7.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Pratik Rajesh Sampat's message of July 18, 2020 4:53 am: > Replace the variable name from using "pnv_first_spr_loss_level" to > "pnv_first_fullstate_loss_level". >=20 > As pnv_first_spr_loss_level is supposed to be the earliest state that > has OPAL_PM_LOSE_FULL_CONTEXT set, however as shallow states too loose > SPR values, render an incorrect terminology. It also doesn't lose "full" state at this loss level though. From the=20 architecture it could be called "hv state loss level", but in POWER10=20 even that is not strictly true. >=20 > Signed-off-by: Pratik Rajesh Sampat > --- > arch/powerpc/platforms/powernv/idle.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) >=20 > diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platfor= ms/powernv/idle.c > index f62904f70fc6..d439e11af101 100644 > --- a/arch/powerpc/platforms/powernv/idle.c > +++ b/arch/powerpc/platforms/powernv/idle.c > @@ -48,7 +48,7 @@ static bool default_stop_found; > * First stop state levels when SPR and TB loss can occur. > */ > static u64 pnv_first_tb_loss_level =3D MAX_STOP_STATE + 1; > -static u64 pnv_first_spr_loss_level =3D MAX_STOP_STATE + 1; > +static u64 pnv_first_fullstate_loss_level =3D MAX_STOP_STATE + 1; > =20 > /* > * psscr value and mask of the deepest stop idle state. > @@ -657,7 +657,7 @@ static unsigned long power9_idle_stop(unsigned long p= sscr, bool mmu_on) > */ > mmcr0 =3D mfspr(SPRN_MMCR0); > } > - if ((psscr & PSSCR_RL_MASK) >=3D pnv_first_spr_loss_level) { > + if ((psscr & PSSCR_RL_MASK) >=3D pnv_first_fullstate_loss_level) { > sprs.lpcr =3D mfspr(SPRN_LPCR); > sprs.hfscr =3D mfspr(SPRN_HFSCR); > sprs.fscr =3D mfspr(SPRN_FSCR); > @@ -741,7 +741,7 @@ static unsigned long power9_idle_stop(unsigned long p= sscr, bool mmu_on) > * just always test PSSCR for SPR/TB state loss. > */ > pls =3D (psscr & PSSCR_PLS) >> PSSCR_PLS_SHIFT; > - if (likely(pls < pnv_first_spr_loss_level)) { > + if (likely(pls < pnv_first_fullstate_loss_level)) { > if (sprs_saved) > atomic_stop_thread_idle(); > goto out; > @@ -1088,7 +1088,7 @@ static void __init pnv_power9_idle_init(void) > * the deepest loss-less (OPAL_PM_STOP_INST_FAST) stop state. > */ > pnv_first_tb_loss_level =3D MAX_STOP_STATE + 1; > - pnv_first_spr_loss_level =3D MAX_STOP_STATE + 1; > + pnv_first_fullstate_loss_level =3D MAX_STOP_STATE + 1; > for (i =3D 0; i < nr_pnv_idle_states; i++) { > int err; > struct pnv_idle_states_t *state =3D &pnv_idle_states[i]; > @@ -1099,8 +1099,8 @@ static void __init pnv_power9_idle_init(void) > pnv_first_tb_loss_level =3D psscr_rl; > =20 > if ((state->flags & OPAL_PM_LOSE_FULL_CONTEXT) && > - (pnv_first_spr_loss_level > psscr_rl)) > - pnv_first_spr_loss_level =3D psscr_rl; > + (pnv_first_fullstate_loss_level > psscr_rl)) > + pnv_first_fullstate_loss_level =3D psscr_rl; > =20 > /* > * The idle code does not deal with TB loss occurring > @@ -1111,8 +1111,8 @@ static void __init pnv_power9_idle_init(void) > * compatibility. > */ > if ((state->flags & OPAL_PM_TIMEBASE_STOP) && > - (pnv_first_spr_loss_level > psscr_rl)) > - pnv_first_spr_loss_level =3D psscr_rl; > + (pnv_first_fullstate_loss_level > psscr_rl)) > + pnv_first_fullstate_loss_level =3D psscr_rl; > =20 > err =3D validate_psscr_val_mask(&state->psscr_val, > &state->psscr_mask, > @@ -1158,7 +1158,7 @@ static void __init pnv_power9_idle_init(void) > } > =20 > pr_info("cpuidle-powernv: First stop level that may lose SPRs =3D 0x%ll= x\n", > - pnv_first_spr_loss_level); > + pnv_first_fullstate_loss_level); > =20 > pr_info("cpuidle-powernv: First stop level that may lose timebase =3D 0= x%llx\n", > pnv_first_tb_loss_level); > --=20 > 2.25.4 >=20 >=20