From mboxrd@z Thu Jan 1 00:00:00 1970 From: Atish Patra Subject: Re: [RFT PATCH v1 0/4] Unify CPU topology across ARM64 & RISC-V Date: Mon, 10 Dec 2018 16:11:21 -0800 Message-ID: References: <1543534100-3654-1-git-send-email-atish.patra@wdc.com> <20181207134509.GA5913@e105550-lin.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20181207134509.GA5913@e105550-lin.cambridge.arm.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Morten Rasmussen Cc: "linux-kernel@vger.kernel.org" , Albert Ou , Anup Patel , Ard Biesheuvel , Catalin Marinas , "devicetree@vger.kernel.org" , Dmitriy Cherkasov , Greg Kroah-Hartman , Ingo Molnar , Jeremy Linton , Juri Lelli , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , "linux-riscv@lists.infradead.org" , Mark Rutland , Palmer Dabbelt , "Peter Zijlstra (Intel)" , Raf List-Id: devicetree@vger.kernel.org On 12/7/18 5:45 AM, Morten Rasmussen wrote: > Hi, > > On Thu, Nov 29, 2018 at 03:28:16PM -0800, Atish Patra wrote: >> The cpu-map DT entry in ARM64 can describe the CPU topology in >> much better way compared to other existing approaches. RISC-V can >> easily adopt this binding to represent it's 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 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. >> >> The patches have been tested for RISC-V and compile tested for >> ARM64 & x86. > > The cpu-map bindings are used for arch/arm too, and so is > arch_topology.c. In fact, it was introduced to allow code-sharing > between arm and arm64. Applying patch three breaks arm. > > Moving the DT parsing to arch_topology.c we have to unify all three > architectures. Be aware that arm and arm64 have some differences in how > they detect cpu capacities. I think we might have to look at the split > of code between arch/* and arch_topology.c again :-/ > > Morten > Thank you for bringing this up. I will send a new version and make sure that it works on arm32 as well. Regards, Atish