From patchwork Tue Jun 13 13:05:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 775170 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wn9dJ1XNbz9s81 for ; Tue, 13 Jun 2017 23:31:00 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="T3rql3Pa"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wn9dH6yBNzDqPX for ; Tue, 13 Jun 2017 23:30:59 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="T3rql3Pa"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3wn95Y45x2zDqLs for ; Tue, 13 Jun 2017 23:06:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="T3rql3Pa"; dkim-atps=neutral Received: by mail-pf0-x244.google.com with SMTP id y7so21384375pfd.3 for ; Tue, 13 Jun 2017 06:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=M9oQx158dVQOcBsA4rbmmSm9wi8h9eLj0oY3QvA2FpU=; b=T3rql3Pa8ucQhA3I1We836lOn4V0puUjJBRy4P/D4WtP2pH59yPiBt9o6cL2eYm1tq jYXlrJRHJo1/j1Hg7l50VQsy6g5Kwkip7sS3Fs6TzlvDpbBod4/8iK2txeNdJJ6qlSUG rg6RDz3jRWrU9e57iTrb1YuC9L61spIKYjcBQzguqYimUcGWb7rVqAROe3uHKuxJTjZv LPEqtRwECOA3z3LPJJjmmsQLMMt6CPin8Z8CNz+WtMQ4gUML3p0k25MMliVAFieLnRej sRBm74ls7RY8nXSUrhcycwVmB5F6YPpt3gMafT18pi8hplcapoSbx7i6/cM2CMfgAX5Y vqeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=M9oQx158dVQOcBsA4rbmmSm9wi8h9eLj0oY3QvA2FpU=; b=du+AtYC5hmLv8a4V67BqKxK4UABCIjLDsDB/47npc5nyesguCcVxC7niLP4/Iki/8p EFA8ck/GqOAHb1KUaWK0RNe41gE2QV88+ZvDs/1epwbr2TaAiKAO/r7mpa2jzbHrgSlc am4IcfEFGFYEst8xRDJl7WtmlOw9z9SvcPkBUrtQl7iE/Too18uyWa1QN++Y2U/YyC/V n/CURYArMQyKGhTH/LEICGqLE7/AVY3UluIbd5jynJ1outWWK+hSRLjE0/E4U2wXRfEU OgpPIvsx2/tU4sAhh+n0xsakG1IbVHELhk9MfNaDA9uKhf96PVJeLGJbHTV6wxtZMU6z mXVw== X-Gm-Message-State: AKS2vOz5HEhcfO/flzdGhr5WC7ADDYJfwWh05j3qtDy+Ci3qCnCXQATa jclMih8QoGygDexi X-Received: by 10.84.231.193 with SMTP id g1mr1803271pln.253.1497359215517; Tue, 13 Jun 2017 06:06:55 -0700 (PDT) Received: from roar.au.ibm.com ([210.185.119.63]) by smtp.gmail.com with ESMTPSA id y28sm27750667pfd.32.2017.06.13.06.06.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 06:06:54 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 13/13] powerpc/64s: idle runlatch switch is done with MSR[EE]=0 Date: Tue, 13 Jun 2017 23:05:57 +1000 Message-Id: <20170613130557.26315-14-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170613130557.26315-1-npiggin@gmail.com> References: <20170613130557.26315-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Gautham R . Shenoy" , Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 2*mfmsr and 2*mtmsr can be avoided in the idle sleep/wake code because we know the MSR[EE] is clear. Acked-by: Vaidyanathan Srinivasan Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/idle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index 1028df82cd2f..2abee070373f 100644 --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c @@ -291,9 +291,9 @@ static unsigned long __power7_idle_type(unsigned long type) if (!prep_irq_for_idle_irqsoff()) return 0; - ppc64_runlatch_off(); + __ppc64_runlatch_off(); srr1 = power7_idle_insn(type); - ppc64_runlatch_on(); + __ppc64_runlatch_on(); fini_irq_for_idle_irqsoff(); @@ -328,9 +328,9 @@ static unsigned long __power9_idle_type(unsigned long stop_psscr_val, psscr = mfspr(SPRN_PSSCR); psscr = (psscr & ~stop_psscr_mask) | stop_psscr_val; - ppc64_runlatch_off(); + __ppc64_runlatch_off(); srr1 = power9_idle_stop(psscr); - ppc64_runlatch_on(); + __ppc64_runlatch_on(); fini_irq_for_idle_irqsoff(); @@ -365,7 +365,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) unsigned long srr1; u32 idle_states = pnv_get_supported_cpuidle_states(); - ppc64_runlatch_off(); + __ppc64_runlatch_off(); if (cpu_has_feature(CPU_FTR_ARCH_300) && deepest_stop_found) { unsigned long psscr; @@ -392,7 +392,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) HMT_medium(); } - ppc64_runlatch_on(); + __ppc64_runlatch_on(); return srr1; }