Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp103286imu; Mon, 10 Dec 2018 17:08:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/XUCaKNnf1ryFDOC9yZRH9DoLUSogewv5P3Sk1MV+92bFCVgL7h81QWzQPpmjzqPVa75EcJ X-Received: by 2002:a17:902:b282:: with SMTP id u2mr14392060plr.89.1544490490144; Mon, 10 Dec 2018 17:08:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544490490; cv=none; d=google.com; s=arc-20160816; b=T4Epi0PawfBhcuzmUjwQDs/89I4T+65NyFF9shZ2l1nS1jwTPlE8PyYbBRWmwPPfuO 0F9H4eQP5dnMc3F3lt/DELMizTTARDciNs4htr7T+YurSWHC3SYA86AuptySgEDw2kSd FrIOmPvLk9rhFiHO40aQruTkDjtpV41nMqV9jdyPqV92xYbroqvJ0KDfDpMvh9LqQv+m dhIqNcb35EDAlnnad1UU7v4ua9S91prwGHTyaXBD6Ge4fQ4hSljt2tFAQwUYgt8bb+Ke P3fYNUJa840Oo7DEAY01rUpzj1T1SrbiPDvPWPI10L5golFFKqK4+DGihTLNfzY9yVGx V4vQ== 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:dkim-signature; bh=BKAiJTvFRaPZk6Xl/J+BwfEnnTCXAq/G2WVNXuV5tpQ=; b=fpl2XKAzReJUkNcoPdaIscQ3kDH0P1r8h7P2ABCNAo1/PSV3avfVbpnniPkeoe8sqh 5p38qUSxA6IKd6HVNw1lv5zIXCdzRmsf/qd1P82LGkYjZyx4AsuVNwo5hisuK70xgaFJ OeB1NST5a/kf25Fqwgs+eXMMUtLgVv3aNU5t+L+5Rod+R90cqSqdrZULmOOxs7PHM0kx fNpnet97x6+BuojOVjps23B02PPCYNeux+2wMx+uZj1zTrYgVWcCv48LK0xBCZqbrW+T Rdilb89mvNTq447FiApQcdPrbEMR8hqs+tgjjlOFRR+IfmspC7cnAOMsyOE0cs+BdHde QZ5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Z1gjnjbn; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q32si10140726pgm.410.2018.12.10.17.07.55; Mon, 10 Dec 2018 17:08:10 -0800 (PST) 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; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=Z1gjnjbn; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728881AbeLKALX (ORCPT + 99 others); Mon, 10 Dec 2018 19:11:23 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:18111 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727419AbeLKALX (ORCPT ); Mon, 10 Dec 2018 19:11:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1544487083; x=1576023083; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=yOAXje27PgeYE34HSOVYaOHf47IeAXxcPCAr+k9KhTU=; b=Z1gjnjbnwz9rq9JqAHiz1qNWFTG4cjHelkLqI48WTocanaytVm3pXhRx dxuDQSdXlY+DtsGXKaTBw6LriwnsCeL0TlMrHMIAp6R8TC0ojfLclOph4 LRrpX5Yf0AtAp/8AV3sZ69It6ojEOy//k0drZNSbZF8CimudHM96CHVLI oWi1v13EpHkiwZ9UaLmgnS1JyTBtG6PEruViLBmm6Yk//yQdTUbyuBFp1 Vz4QyGSAbUOk9xFxx/JzjhkCOCnhO+TWIKQicvpzkuJ/eIfVrg+yHowwW J84IEEkGGtxMSu5vLOaRaIp6erNgyLM4dXDiSNHOUwliDFGXSZoU/qxSU Q==; X-IronPort-AV: E=Sophos;i="5.56,340,1539619200"; d="scan'208";a="98025677" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 11 Dec 2018 08:11:23 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 10 Dec 2018 15:53:08 -0800 Received: from colley-l-lt.ad.shared (HELO [10.86.57.118]) ([10.86.57.118]) by uls-op-cesaip01.wdc.com with ESMTP; 10 Dec 2018 16:11:21 -0800 Subject: Re: [RFT PATCH v1 0/4] Unify CPU topology across ARM64 & RISC-V 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)" , "Rafael J. Wysocki" , Rob Herring , Sudeep Holla , Thomas Gleixner , Will Deacon References: <1543534100-3654-1-git-send-email-atish.patra@wdc.com> <20181207134509.GA5913@e105550-lin.cambridge.arm.com> From: Atish Patra Message-ID: Date: Mon, 10 Dec 2018 16:11:21 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20181207134509.GA5913@e105550-lin.cambridge.arm.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 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