Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1250757ybi; Thu, 30 May 2019 14:13:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjTa2EjSrvomSjTvo6qrlzfP3Xf+yOlOb4qz8frk0c7McB87Vxh9aRZSDqsG487SCCtUrV X-Received: by 2002:a63:a34c:: with SMTP id v12mr5323233pgn.198.1559250837715; Thu, 30 May 2019 14:13:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559250837; cv=none; d=google.com; s=arc-20160816; b=n2cfeE1KOP/AMKi0JFWHYVGa4kfiKqn5WW8RZs4E+QQtlhAHIpFBkqPF3UJ5Fe9jGh eWqY4i+lGpZI4XMLZ0TvkntVMSOCgc/2q7cpqtNwrtrlZNV279lWcDsIf62IWTr5ZcBW m4DjS8GMZwzYkgi3xWphOojlQIfJh5GuejaUqYJL3lou+nT3wbvDxM/q/2YSgutf67s0 QM4ficNc+U06VleZUgjl/tEIKmckqWrKmae6cRSsrInASyh8aVKm3RXaq1stUXP3pigT eUXjy12Oyzg1gKtoMVlsBF+e6XBB2gKaRllUmks4uunaNEGCTSLCo+RU/ypChhGX7cV2 Ygxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=OCkg/9QlBcz3Mx7SwPLBXsGZa+3+W8oneyL5Ui9+WjI=; b=VPKEXpPrggdNqI6JrY8OJd8wGN/eOhSBwtviTreGUCtI982rZVx28kSDJBRtMDmJT+ Z30aN0G8NsJozYA8WLlK1XteyOuEJ3TeYBoC3tZoxUvc7iKwOf7OqS4dNMhxg1hn2/Vi 8IEFUwwM3vspCDPHeTqnvHTezd5FxM3sIbIT3JS1kasOsEZPbWpNqcyneG2ncnw88NIA PSfqUOVaPkYmmO8KYfJOPcH5cIVqDoboU2YZJYtfKOYoWGdaQLtKfj/9KOooJT/1vRRy 9t2XWUHr4Edna5tBSk3FzIWk2fD4YDQbCZeXmWapW0DRCcS6H82wt/6c0uQfjHzzdNws TJbg== 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 k29si3890803pgl.157.2019.05.30.14.13.41; Thu, 30 May 2019 14:13:57 -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 S1726719AbfE3VMV (ORCPT + 99 others); Thu, 30 May 2019 17:12:21 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42602 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726285AbfE3VMV (ORCPT ); Thu, 30 May 2019 17:12:21 -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 9C8B0341; Thu, 30 May 2019 14:12:20 -0700 (PDT) Received: from [192.168.100.220] (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 210CC3F690; Thu, 30 May 2019 14:12:19 -0700 (PDT) Subject: Re: [PATCH v6 0/7] Unify CPU topology across ARM & RISC-V To: Atish Patra , linux-kernel@vger.kernel.org Cc: Albert Ou , Anup Patel , Catalin Marinas , "David S. Miller" , devicetree@vger.kernel.org, Greg Kroah-Hartman , Ingo Molnar , Linus Walleij , linux-riscv@lists.infradead.org, Mark Rutland , Mauro Carvalho Chehab , Morten Rasmussen , Otto Sabart , Palmer Dabbelt , Paul Walmsley , "Peter Zijlstra (Intel)" , "Rafael J. Wysocki" , Rob Herring , Sudeep Holla , Thomas Gleixner , Will Deacon , Russell King , linux-arm-kernel@lists.infradead.org References: <20190529211340.17087-1-atish.patra@wdc.com> From: Jeremy Linton Message-ID: <1b61e699-79c7-bbfd-c7ed-d51d321ae7ef@arm.com> Date: Thu, 30 May 2019 16:12:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190529211340.17087-1-atish.patra@wdc.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 5/29/19 4:13 PM, Atish Patra wrote: > The cpu-map DT entry in ARM can describe the CPU topology in much better > way compared to other existing approaches. RISC-V can easily adopt this > binding to represent its own CPU topology. Thus, both cpu-map DT > binding and topology parsing code can be moved to a common location so > that RISC-V or any other architecture can leverage that. > > The relevant discussion regarding unifying cpu topology can be found in > [1]. > > arch_topology seems to be a perfect place to move the common code. I > have not introduced any significant functional changes in the moved code. > The only downside in this approach is that the capacity code will be > executed for RISC-V as well. But, it will exit immediately after not > able to find the appropriate DT node. If the overhead is considered too > much, we can always compile out capacity related functions under a > different config for the architectures that do not support them. > > There was an opportunity to unify topology data structure for ARM32 done > by patch 3/4. But, I refrained from making any other changes as I am not > very well versed with original intention for some functions that > are present in arch_topology.c. I hope this patch series can be served > as a baseline for such changes in the future. > > The patches have been tested for RISC-V and compile tested for ARM64, > ARM32 & x86. > I applied these to 5.2rc2, along with my PPTT/MT change and verified the system & scheduler topology/etc on DAWN and ThunderX2 using ACPI on arm64. They appear to be working correctly. so for the series, Tested-by: Jeremy Linton The code itself looks fine to me as well: Reviewed-by: Jeremy Linton Thanks! > The socket change[2] is also now part of this series. > > [1] https://lkml.org/lkml/2018/11/6/19 > [2] https://lkml.org/lkml/2018/11/7/918 > > QEMU changes for RISC-V topology are available at > > https://github.com/atishp04/qemu/tree/riscv_topology_dt > > HiFive Unleashed DT with topology node is available here. > https://github.com/atishp04/opensbi/tree/HiFive_unleashed_topology > > It can be verified with OpenSBI with following additional compile time > option. > > FW_PAYLOAD_FDT="unleashed_topology.dtb" > > Changes from v5->v6 > 1. Added two more patches from Sudeep about maintainership of arch_topology.c > and Kconfig update. > 2. Added Tested-by & Reviewed-by > 3. Fixed a nit (reordering of variables) > > Changes from v4-v5 > 1. Removed the arch_topology.h header inclusion from topology.c and arch_topology.c > file. Added it in linux/topology.h. > 2. core_id is set to -1 upon reset. Otherwise, ARM topology store function does not > work. > > Changes from v3->v4 > 1. Get rid of ARM32 specific information in topology structure. > 2. Remove redundant functions from ARM32 and use common code instead. > > Changes from v2->v3 > 1. Cover letter update with experiment DT for topology changes. > 2. Added the patch for [2]. > > Changes from v1->v2 > 1. ARM32 can now use the common code as well. > > Atish Patra (4): > dt-binding: cpu-topology: Move cpu-map to a common binding. > cpu-topology: Move cpu topology code to common code. > arm: Use common cpu_topology structure and functions. > RISC-V: Parse cpu topology during boot. > > Sudeep Holla (3): > Documentation: DT: arm: add support for sockets defining package > boundaries > base: arch_topology: update Kconfig help description > MAINTAINERS: Add an entry for generic architecture topology > > .../topology.txt => cpu/cpu-topology.txt} | 134 ++++++-- > MAINTAINERS | 7 + > arch/arm/include/asm/topology.h | 20 -- > arch/arm/kernel/topology.c | 60 +--- > arch/arm64/include/asm/topology.h | 23 -- > arch/arm64/kernel/topology.c | 303 +----------------- > arch/riscv/Kconfig | 1 + > arch/riscv/kernel/smpboot.c | 3 + > drivers/base/Kconfig | 2 +- > drivers/base/arch_topology.c | 298 +++++++++++++++++ > include/linux/arch_topology.h | 26 ++ > include/linux/topology.h | 1 + > 12 files changed, 452 insertions(+), 426 deletions(-) > rename Documentation/devicetree/bindings/{arm/topology.txt => cpu/cpu-topology.txt} (66%) > > -- > 2.21.0 >