From patchwork Thu Feb 9 09:25:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 93686 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp163451qgi; Thu, 9 Feb 2017 01:44:07 -0800 (PST) X-Received: by 10.98.86.203 with SMTP id h72mr2694219pfj.108.1486633447293; Thu, 09 Feb 2017 01:44:07 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r88si9599334pfk.263.2017.02.09.01.44.07; Thu, 09 Feb 2017 01:44:07 -0800 (PST) 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 S1752714AbdBIJny (ORCPT + 25 others); Thu, 9 Feb 2017 04:43:54 -0500 Received: from foss.arm.com ([217.140.101.70]:38714 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667AbdBIJns (ORCPT ); Thu, 9 Feb 2017 04:43:48 -0500 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 EBF11707; Thu, 9 Feb 2017 01:25:53 -0800 (PST) Received: from e106622-lin.cambridge.arm.com (e106622-lin.cambridge.arm.com [10.1.211.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 434BA3F24D; Thu, 9 Feb 2017 01:25:51 -0800 (PST) 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 v2 0/9] Fix issues and factorize arm/arm64 capacity information code Date: Thu, 9 Feb 2017 09:25:16 +0000 Message-Id: <20170209092525.6654-1-juri.lelli@arm.com> X-Mailer: git-send-email 2.10.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, arm and arm64 topology.c share a lot of code related to parsing of capacity information. This is v2 of a solution [1] (based on Will's, Catalin's and Mark's off-line suggestions) to move such common code in a single place: drivers/base/arch_topology.c (by creating such file and conditionally compiling it for arm and arm64 only). First 5 patches are actually fixes for the current code. Patch 6 is the actual refactoring. Patch 7 removes one of the extern symbols by changing a bit the now common code. Patch 8 removes the remaining externs (as required by Russell during v1 review) by creating a new header file include/linux/arch_topology.h and including that from arm, arm64 and drivers. Last patch addresses Dietmar's comments to v1 and adds a 'atd_' prefix to interfaces exported by drivers code and used by arch (and potentially others in the future). Changes from v1: - rebase on top of 4.10-rc7 - fix licence issue as pointed out by Russell - propose a solution for removing all remaining externs - addressed Dietmar's comments regarding better namespaces The set is based on top of linux/master (4.10-rc7 d5adbfcd5f7b) and it is also available from: git://linux-arm.org/linux-jl.git upstream/default_caps_factorize-v2 Best, - Juri [1] v1 - https://marc.info/?l=linux-kernel&m=148483680119355&w=2 Juri Lelli (9): Documentation: arm: fix wrong reference number in DT definition Documentation/ABI: add information about cpu_capacity arm: fix return value of parse_cpu_capacity arm: remove wrong CONFIG_PROC_SYSCTL ifdef arm64: remove wrong CONFIG_PROC_SYSCTL ifdef arm, arm64: factorize common cpu capacity default code arm,arm64,drivers: reduce scope of cap_parsing_failed arm,arm64,drivers: move externs in a new header file arm,arm64,drivers: add a prefix to drivers arch_topology interfaces Documentation/ABI/testing/sysfs-devices-system-cpu | 7 + Documentation/devicetree/bindings/arm/cpus.txt | 4 +- arch/arm/Kconfig | 1 + arch/arm/kernel/topology.c | 221 +------------------ arch/arm64/Kconfig | 1 + arch/arm64/kernel/topology.c | 228 +------------------- drivers/base/Kconfig | 8 + drivers/base/Makefile | 1 + drivers/base/arch_topology.c | 238 +++++++++++++++++++++ include/linux/arch_topology.h | 17 ++ 10 files changed, 285 insertions(+), 441 deletions(-) create mode 100644 drivers/base/arch_topology.c create mode 100644 include/linux/arch_topology.h -- 2.10.0