From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757669AbdAJJJH (ORCPT ); Tue, 10 Jan 2017 04:09:07 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45277 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757512AbdAJJHk (ORCPT ); Tue, 10 Jan 2017 04:07:40 -0500 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 1.9.4