From patchwork Thu Sep 14 18:49:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Linton X-Patchwork-Id: 9953753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4ABEA6024A for ; Thu, 14 Sep 2017 18:53:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65263290F1 for ; Thu, 14 Sep 2017 18:53:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59BC629223; Thu, 14 Sep 2017 18:53:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE18E290F1 for ; Thu, 14 Sep 2017 18:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=LSh+o1y1Bz96AI2x5mxy7WPKK3zqJtLwAnLUZEaQxsg=; b=FI7TedG3SJynw191CEtj58CM1C FCOTbX5mSuqdvxv1a4PYEvm5ferlu7weKl2jPTcZlRQwcterm5vFjiQcI30GrP0h2mhOLvih19Lvg 5uDdDYAnZudQXrFBI7rAeUAXnrNe1L4NpmNq+rtdg27rZdvY/AN3+pGWjXtBK5oQqt/q7l3/mqU6A 6jCz5KPzFjeBIwuilV29UliayPrXGkVTlcngypsDmqwgDTHjp9haaf6N1QCxehRoGt/jwRJVjbNxH gS5vapWerV7sPgGoqzPoS8rszeclcf3uuR/JI/6O5sqt1nhtXgtInHCON8NWbPcIngJOEvqcWai72 Ghu3v2mA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dsZGV-0006oN-43; Thu, 14 Sep 2017 18:53:31 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dsZDa-0004ng-Ak for linux-arm-kernel@bombadil.infradead.org; Thu, 14 Sep 2017 18:50:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SA60wroeAjtPixuHDBr37u030LnpUW5yV3oGpXgU5Bc=; b=LqdBo1/Y/0TpjcGRHk/7OFi6f 66OO/1ZusC3kzj1RaGOQqXrf4D7RHNWQUrBdqYMr44yvglKUbUxchcsMcfOfXnmVXc6i2vCJ2eqPv ePZSKz87wNhBYCnp/J70IShGdjuNv/JZt/UgkW/92MfZq71mTfFtUpvsTwgsB9eqYtVFvOUIxdBpa SNfVIBgUZKGlrX+QY+YyktCaBDqX5hJDNigT62+WHx1OdpLlfetsEWnBofd/hMi/R/84px7iaLGqm WZJN2DYTtsnJVHD75AMDK8NkP3bN6KrIQDndHKsiqb5fAOwWy2UQiDRQrRYo8+D2mUfkyu7Sx2Wt1 lpV7v+CTg==; Received: from foss.arm.com ([217.140.101.70]) by merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dsZDX-0006HA-GU for linux-arm-kernel@lists.infradead.org; Thu, 14 Sep 2017 18:50:28 +0000 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 B085E1B2D; Thu, 14 Sep 2017 11:49:38 -0700 (PDT) Received: from beelzebub.austin.arm.com (beelzebub.austin.arm.com [10.118.12.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D75193F483; Thu, 14 Sep 2017 11:49:37 -0700 (PDT) From: Jeremy Linton To: linux-acpi@vger.kernel.org Subject: [PATCH 5/6] arm64: Fixup users of topology_physical_package_id Date: Thu, 14 Sep 2017 13:49:17 -0500 Message-Id: <20170914184918.20406-13-jeremy.linton@arm.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170914184918.20406-1-jeremy.linton@arm.com> References: <20170914184918.20406-1-jeremy.linton@arm.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lorenzo.pieralisi@arm.com, austinwc@codeaurora.org, jhugo@codeaurora.org, will.deacon@arm.com, john.garry@huawei.com, rjw@rjwysocki.net, Jeremy Linton , hanjun.guo@linaro.org, sudeep.holla@arm.com, catalin.marinas@arm.com, wangxiongfeng2@huawei.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There are a few arm64 specific users (cpufreq, psci, etc) which really want the cluster rather than the topology_physical_package_id(). Lets convert those users to topology_cod_id(). That way when we start differentiating the socket/cluster they will continue to behave correctly. Signed-off-by: Jeremy Linton --- drivers/clk/clk-mb86s7x.c | 2 +- drivers/cpufreq/arm_big_little.c | 2 +- drivers/firmware/psci_checker.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-mb86s7x.c b/drivers/clk/clk-mb86s7x.c index 2a83a3ff1d09..da4b456f9afc 100644 --- a/drivers/clk/clk-mb86s7x.c +++ b/drivers/clk/clk-mb86s7x.c @@ -338,7 +338,7 @@ static struct clk_hw *mb86s7x_clclk_register(struct device *cpu_dev) return ERR_PTR(-ENOMEM); clc->hw.init = &init; - clc->cluster = topology_physical_package_id(cpu_dev->id); + clc->cluster = topology_cod_id(cpu_dev->id); init.name = dev_name(cpu_dev); init.ops = &clk_clc_ops; diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c index 17504129fd77..6ee69b3820de 100644 --- a/drivers/cpufreq/arm_big_little.c +++ b/drivers/cpufreq/arm_big_little.c @@ -72,7 +72,7 @@ static struct mutex cluster_lock[MAX_CLUSTERS]; static inline int raw_cpu_to_cluster(int cpu) { - return topology_physical_package_id(cpu); + return topology_cod_id(cpu); } static inline int cpu_to_cluster(int cpu) diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci_checker.c index 6523ce962865..a9465f5d344a 100644 --- a/drivers/firmware/psci_checker.c +++ b/drivers/firmware/psci_checker.c @@ -202,7 +202,7 @@ static int hotplug_tests(void) */ for (i = 0; i < nb_cluster; ++i) { int cluster_id = - topology_physical_package_id(cpumask_any(clusters[i])); + topology_cod_id(cpumask_any(clusters[i])); ssize_t len = cpumap_print_to_pagebuf(true, page_buf, clusters[i]); /* Remove trailing newline. */