From patchwork Wed May 31 16:59:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juri Lelli X-Patchwork-Id: 100801 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp418299qge; Wed, 31 May 2017 10:02:49 -0700 (PDT) X-Received: by 10.84.225.130 with SMTP id u2mr89294775plj.91.1496250169207; Wed, 31 May 2017 10:02:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496250169; cv=none; d=google.com; s=arc-20160816; b=dHraHSOFBQo0G4slGS5PFN7knTg4Fytms7vKyJ768izwbO5Ax8jQzWlQy2HVPEJWwv 0v2QKS1/DqCyqS969OKxB/mmOgwiA5+L8sZtWkKlsnlv0Nu+7wG2JMXvqF6gfVt/RXV6 gWBONwQ7kj9PDfCqjADqFHguPW+phuzgCVGjQByqjZI44ctVGeEAHTJ9EMB+IVSZOa2C oKk0PPHTxABmaOWU8Od4mn2RxlBvpPwQ2Ip9+d1C0wmJV1I0Ov16nY07tD75++yb7uri 7nXsaSizUqGaujYmxd3uEl1CG3pyxkGHfkhOETqtFOIJl8iFosnV4nPPXuuh/VvOfIA5 9yRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fYrHhV5ygFz2yQJRnAG2FMxYK1h1HfzI3yOg654h5VM=; b=a90UUZok1T6MsQBKtmhJmqB6kEdjopHCoUUe+S2PCo6/Muu8gm88OUKBn1XkHhH/px HB+BUW/5Q0yEHOMarTAMkMG7zi0ofe8JP/kfzeZacv1EefjnuOdx4ZmNHgHdA6kmzifB YW/bMkoTRhLHEoftP7PWerB27zkiFZj268NwaagkhtgEnGwxwjGJ/o5WZKAf6tuEIXz8 cvJ0rI7ySTXuG3JRqwSnHmy7bNBpeDObJV9NuJg1ruuMnImKQAqUrSSbXX6Ie+Qjh7xY 7ViGlxwEKnq1lmu4fjuTYG6GhY7taY3lOpmj8EYDCOHfABaXqDZjs6ye1Jf6pM1+9QTA 6i+A== 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 d17si1167825pge.245.2017.05.31.10.02.48; Wed, 31 May 2017 10:02:49 -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 S1751475AbdEaRAm (ORCPT + 25 others); Wed, 31 May 2017 13:00:42 -0400 Received: from foss.arm.com ([217.140.101.70]:46774 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135AbdEaQ7t (ORCPT ); Wed, 31 May 2017 12:59:49 -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 734A8344; Wed, 31 May 2017 09:59:48 -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 9105E3F589; Wed, 31 May 2017 09:59:45 -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 0/7] Fix issues and factorize arm/arm64 capacity information code Date: Wed, 31 May 2017 17:59:24 +0100 Message-Id: <20170531165931.6945-1-juri.lelli@arm.com> X-Mailer: git-send-email 2.11.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 v5 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 3 patches are actually fixes for the current code. Patch 4 is the actual refactoring. Patch 5 removes one of the extern symbols by changing a bit the now common code. Patch 6 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 Greg, Dietmar and Morten's comments to v4 by adding a 'topology_' prefix to interfaces exported by drivers code and used by arch (and potentially others in the future). It also rename function names to make them better reflect what the functions really do. Changes from v4: - rebase on top of 4.12-rc3 (3f173bde7e43) - addressed Greg, Dietmar and Morten's comment on patch 7/7 - added Vincent and Greg's Acked-by The set is based on top of linux/master (4.12-rc3 3f173bde7e43) and it is also available from: git://linux-arm.org/linux-jl.git upstream/default_caps_factorize-v5 Greg, if 7/7 looks now OK to you, could you please take the set so that it will be ready for 4.13 merge window? Thanks, - Juri [1] v1 - https://marc.info/?l=linux-kernel&m=148483680119355&w=2 v2 - https://marc.info/?l=linux-kernel&m=148663344018205&w=2 v3 - http://marc.info/?l=linux-kernel&m=149062080701399&w=2 v4 - https://marc.info/?l=linux-kernel&m=149269955206646&w=2 Juri Lelli (7): Documentation: arm: fix wrong reference number in DT definition arm: fix return value of parse_cpu_capacity arm: 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/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 | 226 +---------------------- drivers/base/Kconfig | 8 + drivers/base/Makefile | 1 + drivers/base/arch_topology.c | 243 +++++++++++++++++++++++++ include/linux/arch_topology.h | 17 ++ 9 files changed, 283 insertions(+), 439 deletions(-) create mode 100644 drivers/base/arch_topology.c create mode 100644 include/linux/arch_topology.h -- 2.11.0