From patchwork Fri May 1 16:06:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 47890 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6BC7920553 for ; Fri, 1 May 2015 16:15:30 +0000 (UTC) Received: by labgx2 with SMTP id gx2sf29850039lab.1 for ; Fri, 01 May 2015 09:15:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=yIbPMLAOYx/Bl9iK244fcnDDmQGibR0VWofOcZ1ejSw=; b=ZIVyp7TfPh2O9x50jpJYdAK1VeWjUufwy3dE0qtdzp61e8JVcK8p6rA1Pko/C60328 qLGJGRjiTTDKDGQUp9OFJD6FMorttm+AhJHUFdiNn+98o8b3qZ0XJFbHmUrNxoB9BIhU 217aZhDUbXWu845CbQes6BLMTE/jqOrjk8/BvgJuhHd5Z5FgYFGJ3P9SRKmPy4fl1h0r 91eoA9WJ65goTNeEhtFKmJ2cGLGYou9fva5sCkkhv3CBbW003Tg6o8M0EY0VmqeMDcZe 59CQewkkWvE+dnMAr3YvOiYtLfpTTnb/TP2xF3+n6+ujjbzNs33fXG3+r1tIsTn2hfSN FX+w== X-Gm-Message-State: ALoCoQlazF4hn28VY4Qnc5Hc8S6ChOZyPeKl4iGBEGQM18S+yU9k0WDulwv9lJRH4KsRY7NdAmk4 X-Received: by 10.180.216.12 with SMTP id om12mr7818686wic.1.1430496929315; Fri, 01 May 2015 09:15:29 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.7 with SMTP id js7ls491122lab.34.gmail; Fri, 01 May 2015 09:15:29 -0700 (PDT) X-Received: by 10.152.27.98 with SMTP id s2mr8823265lag.106.1430496929153; Fri, 01 May 2015 09:15:29 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id k5si4224283lbp.148.2015.05.01.09.15.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 09:15:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbuc2 with SMTP id uc2so67491953lbb.2 for ; Fri, 01 May 2015 09:15:29 -0700 (PDT) X-Received: by 10.112.13.6 with SMTP id d6mr7369982lbc.117.1430496929013; Fri, 01 May 2015 09:15:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp370210lbt; Fri, 1 May 2015 09:15:28 -0700 (PDT) X-Received: by 10.68.134.165 with SMTP id pl5mr19252593pbb.134.1430496927087; Fri, 01 May 2015 09:15:27 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id f5si8533650pat.128.2015.05.01.09.15.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 09:15:27 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YoDZQ-0005rb-VX; Fri, 01 May 2015 16:13:44 +0000 Received: from relais.videotron.ca ([24.201.245.36]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YoDTE-0007p2-8o for linux-arm-kernel@lists.infradead.org; Fri, 01 May 2015 16:07:21 +0000 Received: from yoda.home ([66.131.180.142]) by VL-VM-MR003.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0NNO001KWI3HZJW0@VL-VM-MR003.ip.videotron.ca> for linux-arm-kernel@lists.infradead.org; Fri, 01 May 2015 12:06:53 -0400 (EDT) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 544AD2DA0897; Fri, 01 May 2015 12:06:53 -0400 (EDT) From: Nicolas Pitre To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] ARM: MCPM: remove residency argument from mcpm_cpu_suspend() Date: Fri, 01 May 2015 12:06:32 -0400 Message-id: <1430496392-15956-6-git-send-email-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.1.0 In-reply-to: <1430496392-15956-1-git-send-email-nicolas.pitre@linaro.org> References: <1430496392-15956-1-git-send-email-nicolas.pitre@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150501_090720_428162_E005CB1E X-CRM114-Status: GOOD ( 15.47 ) X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [24.201.245.36 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [24.201.245.36 listed in wl.mailspike.net] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: linaro-kernel@lists.linaro.org, arm@kernel.org, Dave Martin , Wei Xu , Haojian Zhuang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: nicolas.pitre@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This is currently unused. If a suspend must be limited to CPU level only by preventing the last man from triggering a cluster level suspend then this should be determined according to many other criteria the MCPM layer is currently not aware of. It is unlikely that mcpm_cpu_suspend() would be the proper conduit for that information anyway. Signed-off-by: Nicolas Pitre --- arch/arm/common/mcpm_entry.c | 2 +- arch/arm/include/asm/mcpm.h | 15 +++++---------- arch/arm/mach-exynos/suspend.c | 8 +------- drivers/cpuidle/cpuidle-big_little.c | 8 +------- 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c index 492467587c..a923524d10 100644 --- a/arch/arm/common/mcpm_entry.c +++ b/arch/arm/common/mcpm_entry.c @@ -321,7 +321,7 @@ int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster) return ret; } -void mcpm_cpu_suspend(u64 expected_residency) +void mcpm_cpu_suspend(void) { if (WARN_ON_ONCE(!platform_ops)) return; diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h index 6a40d5f8db..acd4983d9b 100644 --- a/arch/arm/include/asm/mcpm.h +++ b/arch/arm/include/asm/mcpm.h @@ -137,17 +137,12 @@ int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster); /** * mcpm_cpu_suspend - bring the calling CPU in a suspended state * - * @expected_residency: duration in microseconds the CPU is expected - * to remain suspended, or 0 if unknown/infinity. - * - * The calling CPU is suspended. The expected residency argument is used - * as a hint by the platform specific backend to implement the appropriate - * sleep state level according to the knowledge it has on wake-up latency - * for the given hardware. + * The calling CPU is suspended. This is similar to mcpm_cpu_power_down() + * except for possible extra platform specific configuration steps to allow + * an asynchronous wake-up e.g. with a pending interrupt. * * If this CPU is found to be the "last man standing" in the cluster - * then the cluster may be prepared for power-down too, if the expected - * residency makes it worthwhile. + * then the cluster may be prepared for power-down too. * * This must be called with interrupts disabled. * @@ -157,7 +152,7 @@ int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster); * This will return if mcpm_platform_register() has not been called * previously in which case the caller should take appropriate action. */ -void mcpm_cpu_suspend(u64 expected_residency); +void mcpm_cpu_suspend(void); /** * mcpm_cpu_powered_up - housekeeping workafter a CPU has been powered up diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 3e6aea7f83..372bd0b099 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -311,13 +311,7 @@ static int exynos5420_cpu_suspend(unsigned long arg) if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) { mcpm_set_entry_vector(cpu, cluster, exynos_cpu_resume); - - /* - * Residency value passed to mcpm_cpu_suspend back-end - * has to be given clear semantics. Set to 0 as a - * temporary value. - */ - mcpm_cpu_suspend(0); + mcpm_cpu_suspend(); } pr_info("Failed to suspend the system\n"); diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c index 40c34faffe..db2ede565f 100644 --- a/drivers/cpuidle/cpuidle-big_little.c +++ b/drivers/cpuidle/cpuidle-big_little.c @@ -108,13 +108,7 @@ static int notrace bl_powerdown_finisher(unsigned long arg) unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); mcpm_set_entry_vector(cpu, cluster, cpu_resume); - - /* - * Residency value passed to mcpm_cpu_suspend back-end - * has to be given clear semantics. Set to 0 as a - * temporary value. - */ - mcpm_cpu_suspend(0); + mcpm_cpu_suspend(); /* return value != 0 means failure */ return 1;