From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hanjun Guo Subject: Re: [PATCH v5 2/4] Documentation: arm64/arm: dt bindings for numa. Date: Wed, 14 Oct 2015 21:21:23 +0800 Message-ID: <561E56D3.3030105@linaro.org> References: <1439570374-4079-1-git-send-email-gkulkarni@caviumnetworks.com> <1439570374-4079-3-git-send-email-gkulkarni@caviumnetworks.com> <20150828123228.GE31748@leverpostej> <20150930105331.GA10066@leverpostej> <1443661547.2828.40.camel@kernel.crashing.org> <20151013164730.GF24353@leverpostej> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151013164730.GF24353@leverpostej> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mark Rutland , Ganapatrao Kulkarni Cc: "Prasun.Kapoor-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org" , Rob Herring , "Leizhen (ThunderTown)" , Ganapatrao Kulkarni , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Will Deacon , Catalin Marinas , "grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "rfranz-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org" , "ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org" , "robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "steve.capper-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "al.stone-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org" , "arnd-r2nGTMty4D4@public.gmane.org" , Pawel Moll List-Id: devicetree@vger.kernel.org On 10/14/2015 12:47 AM, Mark Rutland wrote: >>> Hi Mark, >>> >>> i am thinking, if we could not address(or becomes complex) these topologies >>> using associativity, >>> we should think of an alternate binding which suits existing and upcoming >>> arm64 platforms. >>> can we think of below numa binding which is inline with ACPI and will >>> address all sort of topologies! >>> >>> i am proposing as below, >>> >>> 1. introduce "proximity" node property. this property will be >>> present in dt nodes like memory, cpu, bus and devices(like associativity >>> property) and >>> will tell which numa node(proximity domain) this dt node belongs to. >>> >>> examples: >>> cpu@000 { >>> device_type = "cpu"; >>> compatible = "cavium,thunder", "arm,armv8"; >>> reg = <0x0 0x000>; >>> enable-method = "psci"; >>> proximity = <0>; >>> }; >>> cpu@001 { >>> device_type = "cpu"; >>> compatible = "cavium,thunder", "arm,armv8"; >>> reg = <0x0 0x001>; >>> enable-method = "psci"; >>> proximity = <1>; >>> }; >>> >>> memory@00000000 { >>> device_type = "memory"; >>> reg = <0x0 0x01400000 0x3 0xFEC00000>; >>> proximity =<0>; >>> >>> }; >>> >>> memory@10000000000 { >>> device_type = "memory"; >>> reg = <0x100 0x00400000 0x3 0xFFC00000>; >>> proximity =<1>; >>> }; >>> >>> pcie0@0x8480,00000000 { >>> compatible = "cavium,thunder-pcie"; >>> device_type = "pci"; >>> msi-parent = <&its>; >>> bus-range = <0 255>; >>> #size-cells = <2>; >>> #address-cells = <3>; >>> #stream-id-cells = <1>; >>> reg = <0x8480 0x00000000 0 0x10000000>; /*Configuration >>> space */ >>> ranges = <0x03000000 0x8010 0x00000000 0x8010 0x00000000 >>> 0x70 0x00000000>, /* mem ranges */ >>> <0x03000000 0x8300 0x00000000 0x8300 0x00000000 >>> 0x500 0x00000000>; >>> proximity =<0>; >>> }; >>> >>> >>> 2. Introduce new dt node "proximity-map" which will capture the NxN numa >>> node distance matrix. >>> >>> for example, 4 nodes connected in mesh/ring structure as, >>> A(0) B(1) C(2) D(3) >> to> A(1) >>> >>> relative distance would be, >>> A -> B = 20 >>> B -> C = 20 >>> C -> D = 20 >>> D -> A = 20 >>> A -> C = 40 >>> B -> D = 40 >>> >>> and dt presentation for this distance matrix is : >>> >>> proximity-map { >>> node-count = <4>; >>> distance-matrix = <0 0 10>, >>> <0 1 20>, >>> <0 2 40>, >>> <0 3 20>, >>> <1 0 20>, >>> <1 1 10>, >>> <1 2 20>, >>> <1 3 40>, >>> <2 0 40>, >>> <2 1 20>, >>> <2 2 10>, >>> <2 3 20>, >>> <3 0 20>, >>> <3 1 40>, >>> <3 2 20>, >>> <3 3 10>; >>> } >>> >>> the entries like < 0 0 > < 1 1> < 2 2> < 3 3> can be optional and code can >>> put default value(local distance). >>> the entries like <1 0> can be optional if <0 1> and <1 0> are of same >>> distance. >> is this binding looks ok? > > This looks roughly requivalent to the ACPI SLIT, which means it's as > powerful, which allays my previous concerns. Cool, I think those bindings are quite extensible and easy understood. Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html