[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5b902a0-8c2b-a682-0f67-0b0d9ee4ef5c@arm.com>
Date: Thu, 19 Jan 2017 16:00:45 +0000
From: Dietmar Eggemann <dietmar.eggemann@....com>
To: Juri Lelli <juri.lelli@....com>, linux-kernel@...r.kernel.org
Cc: linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org, peterz@...radead.org,
vincent.guittot@...aro.org, robh+dt@...nel.org,
mark.rutland@....com, linux@....linux.org.uk, sudeep.holla@....com,
lorenzo.pieralisi@....com, catalin.marinas@....com,
will.deacon@....com, morten.rasmussen@....com, broonie@...nel.org,
gregkh@...uxfoundation.org, Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH 6/7] arm, arm64: factorize common cpu capacity default
code
On 19/01/17 14:37, Juri Lelli wrote:
> arm and arm64 share lot of code relative to parsing CPU capacity
> information from DT, using that information for appropriate scaling and
> exposing a sysfs interface for chaging such values at runtime.
>
> Factorize such code in a common place (driver/base/arch_topology.c) in
> preparation for further additions.
>
> Suggested-by: Will Deacon <will.deacon@....com>
> Suggested-by: Mark Rutland <mark.rutland@....com>
> Suggested-by: Catalin Marinas <catalin.marinas@....com>
> Cc: Russell King <linux@...linux.org.uk>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Will Deacon <will.deacon@....com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Juri Lelli <juri.lelli@....com>
> ---
> arch/arm/Kconfig | 1 +
> arch/arm/kernel/topology.c | 213 ++------------------------------------
> arch/arm64/Kconfig | 1 +
> arch/arm64/kernel/topology.c | 213 +-------------------------------------
> drivers/base/Kconfig | 8 ++
> drivers/base/Makefile | 1 +
> drivers/base/arch_topology.c | 240 +++++++++++++++++++++++++++++++++++++++++++
> 7 files changed, 260 insertions(+), 417 deletions(-)
> create mode 100644 drivers/base/arch_topology.c
[...]
> +extern unsigned long
> +arch_scale_cpu_capacity(struct sched_domain *sd, int cpu);
How about adding a driver specific prefix 'foo_' to all driver interfaces?
I'm asking because I would rather like to do a
#define arch_scale_cpu_capacity foo_scale_cpu_capacity
then a
#define arch_scale_cpu_capacity arch_scale_cpu_capacity
in arch/arm64/include/asm/topology.h
later to wire cpu-invariant load-tracking support up to the task
scheduler for ARM64.
That's probably true too for all the 'driver' interfaces which get used
in arch/arm{,64}/kernel/topology.c.
[...]
Powered by blists - more mailing lists