From patchwork Wed May 31 16:59:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 100806 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp418801qge; Wed, 31 May 2017 10:03:48 -0700 (PDT) X-Received: by 10.98.65.26 with SMTP id o26mr31347689pfa.228.1496250228124; Wed, 31 May 2017 10:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496250228; cv=none; d=google.com; s=arc-20160816; b=Wc3BYes0dNMA1t1FJ4EIHNZbYpslY7cekpzsGJ3MBk6j97pVlUxVbqwTLrsI91XCmK nXQUXTOe8soHNcn43UKDfPgSGBeQKhUxMd1zSpp5h8Klsd+9l6DaG/MEhfyDvGhMHDxq BZgl9wXhKY8GXPOdVtNr9aEgrPXDBG7I8pDZAG8lhsBv79OKI6Advm+7QHbKRxykaozZ Mts8MannwT9qEiXGM+xR9DQOKEW4wcOdskiRTLaiSSDOfmDBIWn8ni9MR3d9fHaiTJp8 qhsMSqwN7BqVzjinqEmKHOyt4lvtKXwjhto0SiuYXZhrP/49zQujI8ppXlyntuaCyoaR n8zg== 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=I+bj8J6a+fDSD5o+p+k2UWi/tA3grEXvz9iyznxWbrA=; b=iqKlxtrfHpStur39O9k+eSBN+wodx4E/NYDP8d1c03B0QqR5D62k1MeMtZzHptDRvq ag2FmH1LhiCmQcYryhhmhfGMQDJIke+rcc+/ybhT3u2Oqlu0ZcXeExsjeScpVxlblKdt v1a+gjnJItQFoZAD/9JTZ08/eAqJTAueTe8hiRcBCVBrikuUVeHkepqwvo5QmoqLBGIg r9jihCknzDeyHvke2d7z9E4P/y1MKhicsEpcsVZ1gNH66AObKCpasvdk+wFdwZWimWqu bWA5JV5XyoJM7ip/svw83ZXv4I26x7TWfSltAtplYL2HpXfwbSPKJv108ANV7xwjEwVY SMjg== 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 d7si48869757pln.333.2017.05.31.10.03.47; Wed, 31 May 2017 10:03:48 -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 S1751380AbdEaRAj (ORCPT + 25 others); Wed, 31 May 2017 13:00:39 -0400 Received: from foss.arm.com ([217.140.101.70]:46864 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbdEaRAI (ORCPT ); Wed, 31 May 2017 13:00:08 -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 C336B1684; Wed, 31 May 2017 10:00:07 -0700 (PDT) Received: from cam-smtp0.cambridge.arm.com (e106622-lin.cambridge.arm.com [10.1.211.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 977463F589; Wed, 31 May 2017 10:00:04 -0700 (PDT) From: Juri Lelli To: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, peterz@infradead.org, vincent.guittot@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, linux@arm.linux.org.uk, sudeep.holla@arm.com, lorenzo.pieralisi@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, juri.lelli@arm.com, broonie@kernel.org, gregkh@linuxfoundation.org Subject: [PATCH v5 6/7] arm, arm64, drivers: move externs in a new header file Date: Wed, 31 May 2017 17:59:30 +0100 Message-Id: <20170531165931.6945-7-juri.lelli@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170531165931.6945-1-juri.lelli@arm.com> References: <20170531165931.6945-1-juri.lelli@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Create a new header file (include/linux/arch_topology.h) and put there declarations of interfaces used by arm, arm64 and drivers code. Signed-off-by: Juri Lelli Acked-by: Russell King Acked-by: Catalin Marinas Acked-by: Greg Kroah-Hartman --- arch/arm/kernel/topology.c | 7 +------ arch/arm64/kernel/topology.c | 4 +--- drivers/base/arch_topology.c | 1 + include/linux/arch_topology.h | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 include/linux/arch_topology.h -- 2.11.0 diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 1e35a3265ddf..557be4f1d2d7 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -11,6 +11,7 @@ * for more details. */ +#include #include #include #include @@ -45,10 +46,6 @@ * updated during this sequence. */ -extern unsigned long -arch_scale_cpu_capacity(struct sched_domain *sd, int cpu); -extern void set_capacity_scale(unsigned int cpu, unsigned long capacity); - #ifdef CONFIG_OF struct cpu_efficiency { const char *compatible; @@ -76,8 +73,6 @@ static unsigned long *__cpu_capacity; static unsigned long middle_capacity = 1; static bool cap_from_dt = true; -extern void normalize_cpu_capacity(void); -extern int __init parse_cpu_capacity(struct device_node *cpu_node, int cpu); /* * Iterate all CPUs' descriptor in DT and compute the efficiency diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 7e1f6f75185b..255230c3e835 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -11,6 +11,7 @@ * for more details. */ +#include #include #include #include @@ -27,9 +28,6 @@ #include #include -extern void normalize_cpu_capacity(void); -extern int __init parse_cpu_capacity(struct device_node *cpu_node, int cpu); - static int __init get_cpu_for_node(struct device_node *node) { struct device_node *cpu_node; diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index acf99372c5cf..76c19aa0d82f 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include diff --git a/include/linux/arch_topology.h b/include/linux/arch_topology.h new file mode 100644 index 000000000000..4edae9fe8cdd --- /dev/null +++ b/include/linux/arch_topology.h @@ -0,0 +1,17 @@ +/* + * include/linux/arch_topology.h - arch specific cpu topology information + */ +#ifndef _LINUX_ARCH_TOPOLOGY_H_ +#define _LINUX_ARCH_TOPOLOGY_H_ + +void normalize_cpu_capacity(void); + +struct device_node; +int parse_cpu_capacity(struct device_node *cpu_node, int cpu); + +struct sched_domain; +unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu); + +void set_capacity_scale(unsigned int cpu, unsigned long capacity); + +#endif /* _LINUX_ARCH_TOPOLOGY_H_ */