From patchwork Thu Jul 27 19:33:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 108852 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2484251qge; Thu, 27 Jul 2017 12:33:51 -0700 (PDT) X-Received: by 10.84.225.129 with SMTP id u1mr5414710plj.255.1501184031039; Thu, 27 Jul 2017 12:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501184031; cv=none; d=google.com; s=arc-20160816; b=FP/Rgudb/bE/RlrtqQqA9sc4y06H+Lphi34paID3S99Apb6ABuCZXSBAmknzIIS1A6 iql8Xa50PUE+zBphZv7a1iOzEfnGRsPyu4yNvQG+fTDy8TGzCRvlLFn0MjeWgl0D9MET j+S6/ri3VeJRo0aIJIXIVImxmPWBgSj48+LXvv20l08WM72NVNbLHrLMQW2Wnc6zYD8+ jkXmV/2yMog1dldc1um1Is6EpyrMevWTTW1b7x79ttYho4nQihKaICKlLKK52RjApe4H 3RKeiSL2BRpes0IzjALWCeDvsdH0/+lc2ihfk1XUzXtJnkIrdQvehN1KfNG8LdvG5nvX L4YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=WOtqZ7YgXlxvWih14PNV+BjDzHmWiG4XRrKJjX73EvA=; b=HUlfA2p2fwHKwobDTTzdLABYUomNKwe8qNM7rIszD0ABnYG40x1KeOPMUQF1ZuwXHZ NcMvp0KzRpWzPWHxUcC5FHH00nlAMlHA4y1LEkCsvEHUDLeJ4jBFkk2yoHP2wnvPnbaV 6WhjfZB6q471BK31hnDmoqi0m9vWO4K04Rlt7bsJgvvna5ei5TFwXFt9erRk/sc2UEkj 9JGUQjervzHrwnG/SVvRvH/b1ixueLZBpdHQV3U6lDYCqS/6/DI1N6HYY3Y+DKuNhFgi g1wLn6dBVaPNDdQY20HBg35KYniYbFWZ0YE0iZF/KSFEwB8HEYKFNk5OVVuVqEZtmqbW mEFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si12124886pli.880.2017.07.27.12.33.50; Thu, 27 Jul 2017 12:33:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751786AbdG0Tds (ORCPT + 26 others); Thu, 27 Jul 2017 15:33:48 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbdG0Tdp (ORCPT ); Thu, 27 Jul 2017 15:33:45 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB77615BF; Thu, 27 Jul 2017 12:33:44 -0700 (PDT) Received: from e107985-lin.cambridge.arm.com (e107985-lin.cambridge.arm.com [10.1.210.41]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 82AB33F540; Thu, 27 Jul 2017 12:33:42 -0700 (PDT) From: Dietmar Eggemann To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, linux@arm.linux.org.uk, Greg Kroah-Hartman , Russell King , Catalin Marinas , Will Deacon , Juri Lelli , Vincent Guittot , Peter Zijlstra , Morten Rasmussen , Viresh Kumar , "Rafael J . Wysocki" , Sudeep Holla Subject: [PATCH v3 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function Date: Thu, 27 Jul 2017 20:33:05 +0100 Message-Id: <20170727193312.9849-4-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170727193312.9849-1-dietmar.eggemann@arm.com> References: <20170727193312.9849-1-dietmar.eggemann@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call the frequency-invariance setter function arch_set_freq_scale() if the new frequency has been successfully set which is indicated by bL_cpufreq_set_rate() returning 0. Cc: Rafael J. Wysocki Cc: Viresh Kumar Cc: Sudeep Holla Signed-off-by: Dietmar Eggemann --- drivers/cpufreq/arm_big_little.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.11.0 Acked-by: Viresh Kumar diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index ea6d62547b10..8880f8d9d09d 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -213,6 +213,7 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy, { u32 cpu = policy->cpu, cur_cluster, new_cluster, actual_cluster; unsigned int freqs_new; + int ret; cur_cluster = cpu_to_cluster(cpu); new_cluster = actual_cluster = per_cpu(physical_cluster, cpu); @@ -229,7 +230,14 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy, } } - return bL_cpufreq_set_rate(cpu, actual_cluster, new_cluster, freqs_new); + ret = bL_cpufreq_set_rate(cpu, actual_cluster, new_cluster, freqs_new); + + if (!ret) { + arch_set_freq_scale(policy->related_cpus, freqs_new, + policy->cpuinfo.max_freq); + } + + return ret; } static inline u32 get_table_count(struct cpufreq_frequency_table *table)