From patchwork Thu Jun 8 15:51:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 773374 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 3wk9XV6WCxz9s7B for ; Fri, 9 Jun 2017 02:16:26 +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="tQplYIsn"; 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 3wk9XV5LlDzDqLB for ; Fri, 9 Jun 2017 02:16:26 +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="tQplYIsn"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 3wk90f51cGzDqLs for ; Fri, 9 Jun 2017 01:52:18 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tQplYIsn"; dkim-atps=neutral Received: by mail-pf0-x243.google.com with SMTP id u1so5584052pfg.1 for ; Thu, 08 Jun 2017 08:52:18 -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=jtIbKVe79Abwfkqr2PtZyGccXkB25Tw0s9nEH00XleY=; b=tQplYIsnbx6nGeflbHUMkHPMkQ8PivWquZNWFLN42k1nbg36p1EzgncUA2xpRvhLHy h8h7GmhCh6f/B4PF6O2rU3H6Td0Xl9hZsI36r5dKEqo34m0c+tJK8UNxdQND82PsFbiZ 8/XtOvMoEwzcrU46wRShIj00Bfv2ZaBJRnUqRHvnAxmadm1p52uQVZJNlbb2CwpaIW9Z sYDVpqVtU6jLvI27SpkgAq8C9+/FyMoOLZe68Mnhxksssq0vXgXxgJ/fFHzC+44Z/p9B nM2TJjoQA4oZuW6xO6n0k8gukS3dbm4af/IdYpQTrSj8gEVLr+0wFTas1S/vkyB1pbeR stVQ== 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=jtIbKVe79Abwfkqr2PtZyGccXkB25Tw0s9nEH00XleY=; b=tlzleCXCfsIyBZr/yolO4BEBsh1j6BP7EfkUpjeuu51yr+xLa5iMxQlCSEJXQmpOU0 vI8laABFjHxHuMRNaPRH6PJVaR3qh3J9uyzRazHuxMM8DPZrijS6dIeFMrsh7MZhFz4Y +zAtksmLPqUpXTaM3zYYABz2CED91dQ1g/8EZmyiqAC1ox+CUTB461I+115Q3xDO5eiw a7j0K4tvBEnJHw1LUEZIIW0M2pqbocnNREo9z5yCLSraWoN7AXS0n0uymddW7eHeoHcV 4Yq8GOaitoXODEbz0tKJEScQlofn6ouSFZk6RFUnQx/ZaEDYUiTSzoBdh6yNx6ytYHB7 06wg== X-Gm-Message-State: AODbwcB0xTbx0Qre40LHcsMj9KOB0zx/WyZNb5d3KTVxKvHWbotaWjF7 tqW0JJsrxZUT3IYr X-Received: by 10.84.232.197 with SMTP id x5mr35221266plm.248.1496937136643; Thu, 08 Jun 2017 08:52:16 -0700 (PDT) Received: from roar.au.ibm.com (14-202-185-133.tpgi.com.au. [14.202.185.133]) by smtp.gmail.com with ESMTPSA id k186sm12327286pgd.51.2017.06.08.08.52.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jun 2017 08:52:15 -0700 (PDT) From: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 14/14] powerpc/64s: idle runlatch switch is done with MSR[EE]=0 Date: Fri, 9 Jun 2017 01:51:13 +1000 Message-Id: <20170608155113.21300-15-npiggin@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170608155113.21300-1-npiggin@gmail.com> References: <20170608155113.21300-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 , "Shreyas B . Prabhu" 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. 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 7c83a95f929e..8db49f9c2bd8 100644 --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c @@ -263,9 +263,9 @@ static unsigned long __power7_idle_type(unsigned long type) if (!prep_irq_for_idle()) return 0; - ppc64_runlatch_off(); + __ppc64_runlatch_off(); srr1 = power7_idle_insn(type); - ppc64_runlatch_on(); + __ppc64_runlatch_on(); return srr1; } @@ -300,9 +300,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(); trace_hardirqs_off(); @@ -336,7 +336,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; @@ -363,7 +363,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) HMT_medium(); } - ppc64_runlatch_on(); + __ppc64_runlatch_on(); return srr1; }