From patchwork Thu Jun 8 07:55:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dietmar Eggemann X-Patchwork-Id: 103337 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp2123656obh; Thu, 8 Jun 2017 00:55:51 -0700 (PDT) X-Received: by 10.98.36.72 with SMTP id r69mr29382681pfj.86.1496908551407; Thu, 08 Jun 2017 00:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496908551; cv=none; d=google.com; s=arc-20160816; b=Z2c0di/QuO07owv5JC+bS6WPytJdSLUg6p8d3Ft2RLcHGQgI1++zsNwsks2HVctKDD ILTSOQxaZl0dsFyiojxq/xDjJr/TiCQViUMcYiwR98WQj7W6KymMpkWDlVmK1R/kCXm8 527OI2OPDm4n1O8UsijwQV7m47xYM2AAYPYMtynZK4pjzh3lr7Q7QjsAGx8bElEfWPgc OqmrT5yJfKP04NEwpXUw3t4jzJi1bGWD7SpC8w/li0hs0+HC1LK2Qi4PM0ZlntpMmHgy Uaa9YfbJVlPjAvl2K0P39WKm9OyB7HFO2XRwW9meOS8S4LiLhEY5BExsq6ad30pxBgyM 2YFg== 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=J7nDxFcpVHzgHKrPh3zI7aq3Cpa2kpf7KSWVxMty+Ws=; b=Qj5pzfbje8HPMXIfCvbPiau33ZnaTlkDgHPd/LIBTneP//TKScule8cXF91Do8MQij oQ/g1hzrfsqUnaq0P4DWufkrlnC+UDqFnTPvonpR43R0QBM2/Ys/6nkJBBPp8X1m1QOV jidjxesnZZw6s6sv2q12s8bTdZCSRpMlD1XeCMfz9fCfeS2mPUalb46OgNeOcfUTf/8n KvQlVTNV64t/wtyz/wXwwnhoSG2cWcRgmlAgovvd20hgR7FR7oduxbfd9uY+rSYd20Cv zyMxkL1FSgp9jg20WsWPzVcG+Ppc/QFFG4gFtIfEhpL27+nIIf00Vnb0U4iiCg+5njrJ 0+Ow== 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 h126si3781772pgc.62.2017.06.08.00.55.51; Thu, 08 Jun 2017 00:55: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 S1751899AbdFHHzn (ORCPT + 25 others); Thu, 8 Jun 2017 03:55:43 -0400 Received: from foss.arm.com ([217.140.101.70]:43242 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751619AbdFHHzl (ORCPT ); Thu, 8 Jun 2017 03:55:41 -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 B88CA1682; Thu, 8 Jun 2017 00:55:40 -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 BDD4A3F3E1; Thu, 8 Jun 2017 00:55:38 -0700 (PDT) From: Dietmar Eggemann To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Russell King , Catalin Marinas , Will Deacon , Juri Lelli , Vincent Guittot , Peter Zijlstra , Morten Rasmussen Subject: [PATCH 3/6] arm: wire frequency-invariant accounting support up to the task scheduler Date: Thu, 8 Jun 2017 08:55:10 +0100 Message-Id: <20170608075513.12475-4-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170608075513.12475-1-dietmar.eggemann@arm.com> References: <20170608075513.12475-1-dietmar.eggemann@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit dfbca41f3479 ("sched: Optimize freq invariant accounting") changed the wiring which now has to be done by associating arch_scale_freq_capacity with the actual implementation provided by the architecture. Define arch_scale_freq_capacity to use the arch_topology "driver" function topology_get_freq_scale() for the task scheduler's frequency-invariant accounting instead of the default arch_scale_freq_capacity() in kernel/sched/sched.h. Cc: Russell King Cc: Juri Lelli Signed-off-by: Dietmar Eggemann --- arch/arm/include/asm/topology.h | 5 +++++ arch/arm/kernel/topology.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h index 370f7a732900..a56a9e24f4c0 100644 --- a/arch/arm/include/asm/topology.h +++ b/arch/arm/include/asm/topology.h @@ -24,6 +24,11 @@ void init_cpu_topology(void); void store_cpu_topology(unsigned int cpuid); const struct cpumask *cpu_coregroup_mask(int cpu); +#include + +/* Replace task scheduler's default frequency-invariant accounting */ +#define arch_scale_freq_capacity topology_get_freq_scale + #else static inline void init_cpu_topology(void) { } diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index bf949a763dbe..2c47a76c67b0 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -11,7 +11,6 @@ * for more details. */ -#include #include #include #include