From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F5A6C28CC0 for ; Thu, 30 May 2019 21:12:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60EDE249CA for ; Thu, 30 May 2019 21:12:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ogh9mSlb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 60EDE249CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2i1RD1eVEOWFZIQhkkDiEksdB4Bih9TrnWIF/ekmBqk=; b=Ogh9mSlb5WQ4JRVz0HH2owWrc T3pXdPiTp4C1gtj5o5wx2I/pSf4jmDse4k3e+bbkMn96cJjWsKQG0DDjK9isStC2mjC/f3mEpSEMF 31rswwQeRWtsbdvz0dbONxDt8Y3Y65QJmG/GqD47AEWEJc3rJ7esa08VaPrKBtfSD4LwnSpnwtZNn 8KzY2V0vCvZV53BVqN2BE2Zip3yGiKB62ieWXvgH5iFVnYcQD7kWxDloShD4n2DF/1tQipFrVzbPd Rm+xnHybR+h46SreijfJHBiZ41AQgrxnAdE1Qxttm4H9a288lMHSY1/z+xJrzLtdZn8uv9gfmU5yj DUZbhup0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hWSLY-0006wd-Vz; Thu, 30 May 2019 21:12:24 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hWSLV-0006w3-7V; Thu, 30 May 2019 21:12:22 +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 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 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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190530_141221_282854_19BF1FCD X-CRM114-Status: GOOD ( 30.12 ) 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: Mark Rutland , "Rafael J. Wysocki" , "Peter Zijlstra \(Intel\)" , Catalin Marinas , Linus Walleij , Palmer Dabbelt , Will Deacon , Mauro Carvalho Chehab , linux-riscv@lists.infradead.org, Morten Rasmussen , Anup Patel , Russell King , Ingo Molnar , devicetree@vger.kernel.org, Albert Ou , Rob Herring , Paul Walmsley , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Otto Sabart , Sudeep Holla , "David S. Miller" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel