From patchwork Fri Aug 25 14:31:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 111028 Delivered-To: patch@linaro.org Received: by 10.37.128.210 with SMTP id c18csp1047613ybm; Fri, 25 Aug 2017 07:34:34 -0700 (PDT) X-Received: by 10.99.4.16 with SMTP id 16mr10017961pge.236.1503671674288; Fri, 25 Aug 2017 07:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503671674; cv=none; d=google.com; s=arc-20160816; b=F+JKXqTdgBJWVFkwDRipdad6ZcHBGPaJub4Bz5gCxBkEvLAv5jBHJfN/ey9wS9C75c gBtsbV7oLkubflzCliFwb/dfiA1lu8z+a5Y9DIbaFsZMlot8+cc9FrO6BccNIhotuR5o IcEJV7IUS3UMRJBTdM4EA+pA8hy41Fm6ohVTKy+oQDKwQ++UkEL3zJsCifkZUxD0VPLZ URfIdm93lId8pQ8lNSUBwT8PA4/D7dnNUQYjU8cE6EUg24GL5LDOuPbyMpm+fEC/mI2b EYjmoUnfW5fR5gLZ1i7KBX6vAUOf/Q0aS035Nx2qvKHIjX7udp/HjvyvqZ8QU+rs7a/f 8h1A== 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=eUl3cjsIK1+wZadRXIK+hBxGBVddPHUpasj6TLpMcJM=; b=kiGSZQx+mCdc7V+Ku5xZ/J2TUZGZtbD2yhsht15HOh4hNcWatbfiWDVzyAP2F9x5MB aBfLONDetKkOrh10Yp1dpWVvMC6IHp+K0VsSOhkdRpLufvXorbhdaWiyOYv/t7Z2Q2Xe O3YOr3Oht4NaonWXbyEHtih6IsAqn7v/UALN8EyeLTVqJMRt98Y7ALIwVStqNmtwtdi0 fsubEdxa+67ZHcP4ABhEemCuQJ0ANkepTozx801xopM1GH4iLZ4iadE4528L+CHkbOnN Bau9mie38bh4JUTCbo8xZ4YpMaLHWReOp/fJ+SRUYRBFOc+m/XAcojAEWf3/vOdgah12 GCfQ== 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 m11si4030767pla.363.2017.08.25.07.34.33; Fri, 25 Aug 2017 07:34:34 -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 S1756496AbdHYOec (ORCPT + 26 others); Fri, 25 Aug 2017 10:34:32 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54066 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756692AbdHYOce (ORCPT ); Fri, 25 Aug 2017 10:32:34 -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 E407D1682; Fri, 25 Aug 2017 07:32:33 -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 F1FB33F540; Fri, 25 Aug 2017 07:32:31 -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 , Juri Lelli , Vincent Guittot , Peter Zijlstra , Morten Rasmussen , Viresh Kumar , "Rafael J . Wysocki" , Sudeep Holla Subject: [PATCH v4 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function Date: Fri, 25 Aug 2017 15:31:59 +0100 Message-Id: <20170825143206.30467-4-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170825143206.30467-1-dietmar.eggemann@arm.com> References: <20170825143206.30467-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 Acked-by: Viresh Kumar --- drivers/cpufreq/arm_big_little.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.11.0 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)