From patchwork Wed Mar 10 05:23:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 396669 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp92311jai; Tue, 9 Mar 2021 21:24:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlzpjcG6pCH8pJM+n+pVG6mNwsL2hoM/Mn9r4nmfE13zwUS6Cgzon6skiKqJHRXyTlfIS4 X-Received: by 2002:a17:906:7015:: with SMTP id n21mr1659065ejj.391.1615353882439; Tue, 09 Mar 2021 21:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615353882; cv=none; d=google.com; s=arc-20160816; b=ypNnieiizKd184RZ/aRedCEYRERcxoikjZeoOl4cWscFQo/CBs/pJsZxEhBwfcSHHE Q+PABullW4riCn+MmiiNVDcx3HrZcCszZbNpGJXzZuMs3DCbfcizPLIZP/wfHt2O3yMk UxH3WEEC0PkdCMo6aXfqZbuHcXUMNtBqcXwf6iEGl/tyghlzO6vtU+srYdOyVQhveOgD 2uTQV1CHhweTFtOFKryEqYmsGFG1inYU2pTcYep9RxorLjoW+aH/TDBG5i/SIxVgg65f OgFnaj3k7TNJEwEVtx6rcuWA/wBQbOz7tLiDGIBbcMgg8c40Ho7132PKOzMMtqdWfNXB nTSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gXPftVm0Zz9RXWAlvb9njkCnptfxOnMIFmu/ocdebw0=; b=UpyrICgZ30P/LZ7RTrZul+L7iGJ7PKw52Pd+Tempht8fY1H98wf9GhlmewffqprOTW dk5C+DomcwkLUS6FzN7BnnQjz5UWiDdW1+BcE2DVpknLU8lfgg8ssPrKYqUNEiDz9n7c MTpyu7cn7dtde8ImdxsB8fbGAJbSttdbjRrStv6vZmk9UKiNVrEpDN6/BS9pKyYV5lfA XT0SIJ7eSQSsr2+Xip2TQJS/FAo+VEx2nOoWxWwLsCLRGNQFmpDWrqpHgUiXDxXkxACG y/eg7+yuTCpOf7FTN5GsG6ygdCxxVzJ7ElREvzJpCN9NmjUZhOa8wEOH7FGxwIjXiYsX h5kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5+1uQxe; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si10720380edq.33.2021.03.09.21.24.42; Tue, 09 Mar 2021 21:24:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5+1uQxe; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229483AbhCJFYG (ORCPT + 7 others); Wed, 10 Mar 2021 00:24:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229557AbhCJFXo (ORCPT ); Wed, 10 Mar 2021 00:23:44 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62E9AC061760 for ; Tue, 9 Mar 2021 21:23:44 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id d23so4689094plq.2 for ; Tue, 09 Mar 2021 21:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gXPftVm0Zz9RXWAlvb9njkCnptfxOnMIFmu/ocdebw0=; b=h5+1uQxetPSjw8PACHK4t2Hd7vuH90JC6wRZq6oSAr8QycfGdMjzlfDxYz7UPNs3fE aDipwaizdLvcrXJmgIwgVsPbDXRHBrjM2Ffxw7BTeYHyahm/g90kElvQ3d9rj4KC7NhV BuNDfIjuhXTcKFLFyB3fQV7Sfaaq6AEOIWiZ/ExmDnVp6FdYreeMALKRdw0GJ379k504 Ln6D2d+eN45oJSVdvHjS70ZNp1uAmrJ5IijFqhJ/jluNKdWGPelt/+E+MyN7U9lz6X5R AGVcCgiYFeBhgNSUgcXaphlisYiaf6y2AyeoRYehUEEnZtySl24rGgSo21c3iSNRu5cR 2Qzg== 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:mime-version:content-transfer-encoding; bh=gXPftVm0Zz9RXWAlvb9njkCnptfxOnMIFmu/ocdebw0=; b=VbP6Q9Jt7JYxFtFk5ZxwDvceyhd0S8U3odl48x3LFd4X79vFpWUg5J46sQLCdfprc6 kjJsblQDgwZNXgf/yjr7iriXiDFEmvi6PoYUKaDIvMSaxwQmuszoowUjUGTQeKwUU3aa ceV4P+mCmQEmgXgWAClfpxFXWgzujP8OUBrk9Y3ly09wSMFBmo3ZzXjHGQW0LpCZV8DA rM3bija7Or7ixS1v4ph0BuhhkOFV46U5Ttb3LzfhZ+eYucOWiMRrJc5vYS72COw8KSqG Sd5YB4o+cBc6iLseypEM2xaxLTDJE4NjUup+GnZUw0wpybMDI3mTRiS+k3RLJ8Y8rueo EA5Q== X-Gm-Message-State: AOAM533HqdDaHQadIjhd9pUSby/zemLozwHvXTZQIt4fkHu16KUUKClp W0Z3Ts1bbgY69CGFwWMrCufRJw== X-Received: by 2002:a17:90b:2307:: with SMTP id mt7mr1736715pjb.37.1615353823991; Tue, 09 Mar 2021 21:23:43 -0800 (PST) Received: from localhost ([122.171.124.15]) by smtp.gmail.com with ESMTPSA id u15sm14361469pfk.128.2021.03.09.21.23.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Mar 2021 21:23:43 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Catalin Marinas , Will Deacon , Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Ionela Voinescu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V6 1/4] arch_topology: Rename freq_scale as arch_freq_scale Date: Wed, 10 Mar 2021 10:53:23 +0530 Message-Id: <2dd2c60c0268550f566c3c83d06b651b4f0e9e4e.1615351622.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Rename freq_scale to a less generic name, as it will get exported soon for modules. Since x86 already names its own implementation of this as arch_freq_scale, lets stick to that. Suggested-by: Will Deacon Signed-off-by: Viresh Kumar --- arch/arm64/kernel/topology.c | 6 +++--- drivers/base/arch_topology.c | 4 ++-- include/linux/arch_topology.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af Acked-by: Will Deacon diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index e08a4126453a..aa8d893619ed 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -256,8 +256,8 @@ static int init_amu_fie_callback(struct notifier_block *nb, unsigned long val, * initialized AMU support and enabled invariance. The AMU counters will * keep on working just fine in the absence of the cpufreq driver, and * for the CPUs for which there are no counters available, the last set - * value of freq_scale will remain valid as that is the frequency those - * CPUs are running at. + * value of arch_freq_scale will remain valid as that is the frequency + * those CPUs are running at. */ return 0; @@ -327,7 +327,7 @@ void topology_scale_freq_tick(void) const_cnt - prev_const_cnt); scale = min_t(unsigned long, scale, SCHED_CAPACITY_SCALE); - this_cpu_write(freq_scale, (unsigned long)scale); + this_cpu_write(arch_freq_scale, (unsigned long)scale); } #ifdef CONFIG_ACPI_CPPC_LIB diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index de8587cc119e..2a1cecbde0a4 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -31,7 +31,7 @@ __weak bool arch_freq_counters_available(const struct cpumask *cpus) { return false; } -DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE; +DEFINE_PER_CPU(unsigned long, arch_freq_scale) = SCHED_CAPACITY_SCALE; void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq, unsigned long max_freq) @@ -53,7 +53,7 @@ void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq, scale = (cur_freq << SCHED_CAPACITY_SHIFT) / max_freq; for_each_cpu(i, cpus) - per_cpu(freq_scale, i) = scale; + per_cpu(arch_freq_scale, i) = scale; } DEFINE_PER_CPU(unsigned long, cpu_scale) = SCHED_CAPACITY_SCALE; diff --git a/include/linux/arch_topology.h b/include/linux/arch_topology.h index 0f6cd6b73a61..583af517f123 100644 --- a/include/linux/arch_topology.h +++ b/include/linux/arch_topology.h @@ -23,11 +23,11 @@ static inline unsigned long topology_get_cpu_scale(int cpu) void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity); -DECLARE_PER_CPU(unsigned long, freq_scale); +DECLARE_PER_CPU(unsigned long, arch_freq_scale); static inline unsigned long topology_get_freq_scale(int cpu) { - return per_cpu(freq_scale, cpu); + return per_cpu(arch_freq_scale, cpu); } void topology_set_freq_scale(const struct cpumask *cpus, unsigned long cur_freq,