From patchwork Tue Jan 10 09:07:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gautham R Shenoy X-Patchwork-Id: 9506791 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6D6FF60710 for ; Tue, 10 Jan 2017 09:12:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E01D2838D for ; Tue, 10 Jan 2017 09:12:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 532B5284B0; Tue, 10 Jan 2017 09:12:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F26928487 for ; Tue, 10 Jan 2017 09:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754523AbdAJJJD (ORCPT ); Tue, 10 Jan 2017 04:09:03 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58631 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757496AbdAJJHl (ORCPT ); Tue, 10 Jan 2017 04:07:41 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id v0A9435f140444 for ; Tue, 10 Jan 2017 04:07:40 -0500 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 27vt6q5ahe-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 10 Jan 2017 04:07:40 -0500 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Jan 2017 02:07:38 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 10 Jan 2017 02:07:33 -0700 Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 70F6F3E4003E; Tue, 10 Jan 2017 02:07:32 -0700 (MST) Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v0A97WW510617204; Tue, 10 Jan 2017 02:07:32 -0700 Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 47034C6042; Tue, 10 Jan 2017 02:07:32 -0700 (MST) Received: from sofia.ibm.com (unknown [9.124.35.253]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP id AA583C6037; Tue, 10 Jan 2017 02:07:31 -0700 (MST) Received: by sofia.ibm.com (Postfix, from userid 1000) id 1B0972E2D89; Tue, 10 Jan 2017 14:37:30 +0530 (IST) From: "Gautham R. Shenoy" To: Michael Ellerman , 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" Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , , "Gautham R. Shenoy" Subject: [PATCH v5 2/5] powernv:stop: Uniformly rename power9 to arch300 Date: Tue, 10 Jan 2017 14:37:01 +0530 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1484039224-5630-1-git-send-email-ego@linux.vnet.ibm.com> References: <1484039224-5630-1-git-send-email-ego@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17011009-0020-0000-0000-00000AB108BF X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006407; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000199; SDB=6.00805581; UDB=6.00391927; IPR=6.00582915; BA=6.00005040; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013875; XFM=3.00000011; UTC=2017-01-10 09:07:37 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17011009-0021-0000-0000-000058BC6641 Message-Id: <1484039224-5630-3-git-send-email-ego@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-01-10_07:, , 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-1612050000 definitions=main-1701100129 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Gautham R. Shenoy" Balbir pointed out that in idle_book3s.S and powernv/idle.c some functions and variables had power9 in their names while some others had arch300. This patch uniformly renames all instances of "power9" in the variables/function/comments occuring in these files to "arch300" in order to make them consistent. Signed-off-by: Gautham R. Shenoy --- New patch in v5 arch/powerpc/include/asm/processor.h | 2 +- arch/powerpc/kernel/idle_book3s.S | 13 +++++++------ arch/powerpc/platforms/powernv/idle.c | 6 +++--- arch/powerpc/platforms/powernv/smp.c | 2 +- drivers/cpuidle/cpuidle-powernv.c | 2 +- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index c07c31b..4b47308 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -458,7 +458,7 @@ static inline unsigned long get_clean_sp(unsigned long sp, int is_32) extern unsigned long power7_nap(int check_irq); extern unsigned long power7_sleep(void); extern unsigned long power7_winkle(void); -extern unsigned long power9_idle_stop(unsigned long stop_level); +extern unsigned long arch300_idle_stop(unsigned long stop_level); extern void flush_instruction_cache(void); extern void hard_reset_now(void); diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S index be90e2f..7f6657f 100644 --- a/arch/powerpc/kernel/idle_book3s.S +++ b/arch/powerpc/kernel/idle_book3s.S @@ -106,8 +106,9 @@ core_idle_lock_held: /* * Pass requested state in r3: - * r3 - PNV_THREAD_NAP/SLEEP/WINKLE in POWER8 - * - Requested STOP state in POWER9 + * r3 - PNV_THREAD_NAP/SLEEP/WINKLE on ISA 2.07 or less + (POWER7,POWER8) + * - Requested STOP state on ISA 3.0 CPUs * * To check IRQ_HAPPENED in r4 * 0 - don't check @@ -357,7 +358,7 @@ ALT_FTR_SECTION_END_NESTED_IFSET(CPU_FTR_ARCH_207S, 66); \ /* * r3 - requested stop state */ -_GLOBAL(power9_idle_stop) +_GLOBAL(arch300_idle_stop) LOAD_REG_IMMEDIATE(r4, PSSCR_HV_TEMPLATE) or r4,r4,r3 mtspr SPRN_PSSCR, r4 @@ -377,7 +378,7 @@ _GLOBAL(pnv_restore_hyp_resource) BEGIN_FTR_SECTION ld r2,PACATOC(r13); /* - * POWER ISA 3. Use PSSCR to determine if we + * POWER ISA 3.0. Use PSSCR to determine if we * are waking up from deep idle state */ LOAD_REG_ADDRBASE(r5,pnv_first_deep_stop_state) @@ -429,8 +430,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300) /* * Called if waking up from idle state which can cause either partial or * complete hyp state loss. - * In POWER8, called if waking up from fastsleep or winkle - * In POWER9, called if waking up from stop state >= pnv_first_deep_stop_state + * In ISA 2.07 (POWER8),called if waking up from fastsleep or winkle + * In ISA 3.0, called if waking up from stop state >= pnv_first_deep_stop_state * * r13 - PACA * cr3 - gt if waking up with partial/complete hypervisor state loss diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index 479c256..c3a2fac 100644 --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c @@ -241,10 +241,10 @@ static DEVICE_ATTR(fastsleep_workaround_applyonce, 0600, /* * Used for ppc_md.power_save which needs a function with no parameters */ -static void power9_idle(void) +static void arch300_idle(void) { /* Requesting stop state 0 */ - power9_idle_stop(0); + arch300_idle_stop(0); } /* * First deep stop state. Used to figure out when to save/restore @@ -415,7 +415,7 @@ static int __init pnv_init_idle_states(void) if (supported_cpuidle_states & OPAL_PM_NAP_ENABLED) ppc_md.power_save = power7_idle; else if (supported_cpuidle_states & OPAL_PM_STOP_INST_FAST) - ppc_md.power_save = power9_idle; + ppc_md.power_save = arch300_idle; out: return 0; diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c index c789258..c931bb2 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c @@ -183,7 +183,7 @@ static void pnv_smp_cpu_kill_self(void) ppc64_runlatch_off(); if (cpu_has_feature(CPU_FTR_ARCH_300)) - srr1 = power9_idle_stop(pnv_deepest_stop_state); + srr1 = arch300_idle_stop(pnv_deepest_stop_state); else if (idle_states & OPAL_PM_WINKLE_ENABLED) srr1 = power7_winkle(); else if ((idle_states & OPAL_PM_SLEEP_ENABLED) || diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c index 7fe442c..a7f6528 100644 --- a/drivers/cpuidle/cpuidle-powernv.c +++ b/drivers/cpuidle/cpuidle-powernv.c @@ -102,7 +102,7 @@ static int stop_loop(struct cpuidle_device *dev, int index) { ppc64_runlatch_off(); - power9_idle_stop(stop_psscr_table[index]); + arch300_idle_stop(stop_psscr_table[index]); ppc64_runlatch_on(); return index; }