Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7236660imu; Mon, 3 Dec 2018 09:41:15 -0800 (PST) X-Google-Smtp-Source: AFSGD/XXelXD/80BBm+7q0rRuciX88zUO4jQJiUFuCh5FZqbsr2iNKvUr/Ma5ZlLS+jqB6cprV0t X-Received: by 2002:a62:710a:: with SMTP id m10mr16123054pfc.69.1543858875703; Mon, 03 Dec 2018 09:41:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543858875; cv=none; d=google.com; s=arc-20160816; b=EabfxKQcqq/6Oc/qJ1hHB8etddGjS4Jly4JQHf49dV+W6KNdMEuCuOQnhPhgswLjHQ RRNqMUnQMNYdn929h378eTsFzoxolFyBRnjDcyaBg6WSCVSproTcwnyFAHnePuxLQvRe YNNwLWV/9tmqzVoJ72576xTZX1TRSlR8pEDiLX8lWbKk+aDaxGczLRNGxLJcJ9L+/78a j3+Hq1QzkY5v1SaJ5NyGMKT1yxhzDyQ/KUCQsi8SlTVFQq7UslssWhyWO6uqkT7tejLW miZr4SIu93Czp8UyUem6k1dUwfleG0PSBFRzt7Xg9DtXu6a8/8yq/kkc+OFGsCmFSL2V unlQ== 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=bazRz1niXRDhSZZEVNkZjIbLJY2boUVVP8oaUr5lIJE=; b=To2iASmoAOLY8sxgDHT8RHmB+vyEMfIaQPD+uvPk3e0r2v5oRA63HLDyQSuZAdKqQU W5UbT0EkkwNVudr7ZgVAFevxwI3OxlUCGTCvutvF3Raf3OvWQGJ4pYpmGgv/8YmAkDbK Ayl9NUoxbZbvLzmA7UiK4eFSAJ92ejukC1BL7iyMuol82zhyXi29zkFEJUc6BXmgp0gW 6/hlNFFxlm2hng2eu06VPCzDK9Mz+4T6GsbKWqlQIZ2AUlNKptXlcxwVlqydrl0c63F+ prEJwzTpnoC6l4SaLv9nFM0OaLvcOc3xG8Z/ENeVmEOzrrIcVmqUk7gJRrZ5uz+fIrEA SGWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=SR6TVmal; 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 g15si13162739pgl.141.2018.12.03.09.41.00; Mon, 03 Dec 2018 09:41:15 -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=SR6TVmal; 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 S1726445AbeLCRkb (ORCPT + 99 others); Mon, 3 Dec 2018 12:40:31 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:40292 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbeLCRkb (ORCPT ); Mon, 3 Dec 2018 12:40:31 -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=1543858823; x=1575394823; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=Rn2Rbfa4Eh4tyqVWsQgb06EfJocC87bzjKhqvK8ZVoo=; b=SR6TVmalkT9ze233s0R6TnEXFX6EdUQwnK8DlWmP6Gtpy7eC1Z4aWt3S YWJnQIDOBiLCGSZx15kV1N+PH4RXZQlWiWEPiimFZgsQ9R5YVONY4tNhL yYjoO/GNHm9eIDQxjo9CD5fXgSw3Yc65aix1NNhXow3fAE6W9qhB7aDa9 KkU24jpq3J0bx717cPe0C/vAjcYoPRb8ouYKr/ZlJ9upGkqnnYVxy9MX3 jVqlTz3c3J9ZNPKv3hUWtxkPKFJJ7sRKf4BjKYiqV12VrL8/iu6DERoQH kkUlkVBoJZ/xFzqlGtVCTY4K/NanH/SIEct1DaBPv9+ecqVt7olDOnpPl Q==; X-IronPort-AV: E=Sophos;i="5.56,311,1539619200"; d="scan'208";a="200281998" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 04 Dec 2018 01:40:23 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 03 Dec 2018 09:22:39 -0800 Received: from c02v91rdhtd5.sdcorp.global.sandisk.com (HELO [10.111.72.98]) ([10.111.72.98]) by uls-op-cesaip02.wdc.com with ESMTP; 03 Dec 2018 09:40:22 -0800 Subject: Re: [RFT PATCH v1 2/4] dt-binding: cpu-topology: Move cpu-map to a common binding. To: Sudeep Holla 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 , Morten Rasmussen , Palmer Dabbelt , "Peter Zijlstra (Intel)" , "Rafael J. Wysocki" , Rob Herring , Thomas Gleixner , Will Deacon References: <1543534100-3654-1-git-send-email-atish.patra@wdc.com> <1543534100-3654-3-git-send-email-atish.patra@wdc.com> <20181203165521.GB17883@e107155-lin> <20181203173306.GF17883@e107155-lin> From: Atish Patra Message-ID: Date: Mon, 3 Dec 2018 09:40: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: <20181203173306.GF17883@e107155-lin> 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/3/18 9:33 AM, Sudeep Holla wrote: > On Mon, Dec 03, 2018 at 09:23:42AM -0800, Atish Patra wrote: >> On 12/3/18 8:55 AM, Sudeep Holla wrote: >>> On Thu, Nov 29, 2018 at 03:28:18PM -0800, Atish Patra wrote: >>>> cpu-map binding can be used to described cpu topology for both >>>> RISC-V & ARM. It makes more sense to move the binding to document >>>> to a common place. >>>> >>>> The relevant discussion can be found here. >>>> https://lkml.org/lkml/2018/11/6/19 >>>> >>> >>> Looks good to me apart from a minor query below in the example. >>> >>> Reviewed-by: Sudeep Holla >>> >>>> Signed-off-by: Atish Patra >>>> --- >>>> .../{arm/topology.txt => cpu/cpu-topology.txt} | 81 ++++++++++++++++++---- >>>> 1 file changed, 67 insertions(+), 14 deletions(-) >>>> rename Documentation/devicetree/bindings/{arm/topology.txt => cpu/cpu-topology.txt} (86%) >>>> >>>> diff --git a/Documentation/devicetree/bindings/arm/topology.txt b/Documentation/devicetree/bindings/cpu/cpu-topology.txt >>>> similarity index 86% >>>> rename from Documentation/devicetree/bindings/arm/topology.txt >>>> rename to Documentation/devicetree/bindings/cpu/cpu-topology.txt >>>> index 66848355..1de6fbce 100644 >>>> --- a/Documentation/devicetree/bindings/arm/topology.txt >>>> +++ b/Documentation/devicetree/bindings/cpu/cpu-topology.txt >>> >>> [...] >>> >>>> +Example 3: HiFive Unleashed (RISC-V 64 bit, 4 core system) >>>> + >>>> +cpus { >>>> + #address-cells = <2>; >>>> + #size-cells = <2>; >>>> + compatible = "sifive,fu540g", "sifive,fu500"; >>>> + model = "sifive,hifive-unleashed-a00"; >>>> + >>>> + ... >>>> + >>>> + cpu-map { >>>> + cluster0 { >>>> + core0 { >>>> + cpu = <&L12>; >>>> + }; >>>> + core1 { >>>> + cpu = <&L15>; >>>> + }; >>>> + core2 { >>>> + cpu0 = <&L18>; >>>> + }; >>>> + core3 { >>>> + cpu0 = <&L21>; >>>> + }; >>>> + }; >>>> + }; >>>> + >>>> + L12: cpu@1 { >>>> + device_type = "cpu"; >>>> + compatible = "sifive,rocket0", "riscv"; >>>> + reg = <0x1>; >>>> + } >>>> + >>>> + L15: cpu@2 { >>>> + device_type = "cpu"; >>>> + compatible = "sifive,rocket0", "riscv"; >>>> + reg = <0x2>; >>>> + } >>>> + L18: cpu@3 { >>>> + device_type = "cpu"; >>>> + compatible = "sifive,rocket0", "riscv"; >>>> + reg = <0x3>; >>>> + } >>>> + L21: cpu@4 { >>>> + device_type = "cpu"; >>>> + compatible = "sifive,rocket0", "riscv"; >>>> + reg = <0x4>; >>>> + } >>>> +}; >>> >>> The labels for the CPUs drew my attention. Is it intentionally random >>> (or even specific) or just chosen to show anything can be used as labels ? >> >> SiFive generates the device tree from RTL directly. So I am not sure if they >> assign random numbers or a particular algorithm chooses the label. I tried >> to put the exact ones that is available publicly. >> >> https://github.com/riscv/riscv-device-tree-doc/blob/master/examples/sifive-hifive_unleashed-microsemi.dts > > Cool, love that. So you don't have the problem I was trying to explain. > But I still see the possibility of some other RISC-V vendor copy-pasting > from here ;). Anyways it's left to you. > I am fine with either way. I hoped other vendors won't blindly copy as this example was specific to HiFive Unleashed board. But I get your point. As this DT entry is a generic architecture entry, we should have generic examples instead of platform specific examples. I will change it to a generic one. Regards, Atish > -- > Regards, > Sudeep >