From patchwork Tue Sep 26 16:41:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 114277 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp4044196qgf; Tue, 26 Sep 2017 09:44:18 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAblX9L9GIRCpqyvcboNTz6elRczRB86ltxfKtQ+YLKNngkMfY+YWzrtiiTtYjSggc0yaQG X-Received: by 10.99.5.204 with SMTP id 195mr11582604pgf.231.1506444257961; Tue, 26 Sep 2017 09:44:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506444257; cv=none; d=google.com; s=arc-20160816; b=SkRrAxECqx112Le088mf7A8Q7UtJqJCENh7MBCpiBucCdAzWTlncLjw+img4Yjm1QK h8kCaIEoCZvG2EUEYHiHKyWi4BjgiUALJXKUz0x7BSvCsvta5CTNt4agJiLasxN90j3A /0G7U+/LYvrcElJPmBbRShue6SqZdahbaH5IuggiP/0Vz070gnsbHCeIwYqlNrKDnw3j GcNO119hdr845xlWdRyFu2s237EewgGQSgm5It1Ww6ZvdvNMILV3EleHOxzohugCrMZA Yz5crL+9WdNueAGod0y/Z4/rvFQJCqssWzsc/CHzk1FMpFVojGUv8EwiDbGdh7+tFrEb hl8g== 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=xBqk6gi4WAPYwqHE1QvfMHhzkC9rnQfXbCSDUdmrnzQ=; b=Xm8kLt7+T2P72Edjaj3FnW4/O7KIqOwWLd9C9UQNPaM3kB799s7InKew6RtUKK/l5Z Kalo4xuspFvwgb8ZCGeNILQJyDdCZO0QD60dmd1dBdjanqR+LOlce8TN/JVnnUWAhYxo WMEwaK6FxEEd7vHugLUdVz5s+8/D/zG8BSCsiEQTctljQRiOtZGj9lTJDM5PS7FChoD1 +cdZIwsem2yF1WoPqXPXEd1PDVRNt4e4yLFbTrkdSU7X9XDY14C2DOrqWihrFQDOYA12 jqXEoq+q76UusO5+y5vK25fCegBiA60Zlc3VDAFnc5tJrsYIeL+SH0rTttc7hLQWbQZs /gwg== 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 z16si5739649pll.345.2017.09.26.09.44.17; Tue, 26 Sep 2017 09:44:17 -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 S1030694AbdIZQoO (ORCPT + 26 others); Tue, 26 Sep 2017 12:44:14 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36030 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030648AbdIZQm3 (ORCPT ); Tue, 26 Sep 2017 12:42:29 -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 B1CDD164F; Tue, 26 Sep 2017 09:42:28 -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 58EF63F483; Tue, 26 Sep 2017 09:42:26 -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 v5 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function Date: Tue, 26 Sep 2017 17:41:08 +0100 Message-Id: <20170926164115.32367-4-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170926164115.32367-1-dietmar.eggemann@arm.com> References: <20170926164115.32367-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 17504129fd77..0c41ab3b16eb 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)