Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932205AbcCGTuO (ORCPT ); Mon, 7 Mar 2016 14:50:14 -0500 Received: from [65.55.169.59] ([65.55.169.59]:18818 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932176AbcCGTtu (ORCPT ); Mon, 7 Mar 2016 14:49:50 -0500 Authentication-Results: caviumnetworks.com; dkim=none (message not signed) header.d=none;caviumnetworks.com; dmarc=none action=none header.from=caviumnetworks.com; Message-ID: <56DDDAC9.1010600@caviumnetworks.com> Date: Mon, 7 Mar 2016 11:47:21 -0800 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Robert Richter CC: David Daney , Will Deacon , , Rob Herring , Frank Rowand , Grant Likely , Pawel Moll , Ian Campbell , Kumar Gala , Ganapatrao Kulkarni , Ard Biesheuvel , Matt Fleming , Mark Rutland , Catalin Marinas , , , , David Daney Subject: Re: [PATCH v14 2/6] Documentation, dt, numa: dt bindings for NUMA. References: <1457049339-23351-1-git-send-email-ddaney.cavm@gmail.com> <1457049339-23351-3-git-send-email-ddaney.cavm@gmail.com> <20160307192220.GA1535@rric.localdomain> In-Reply-To: <20160307192220.GA1535@rric.localdomain> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: BLUPR07CA0107.namprd07.prod.outlook.com (10.255.223.178) To BN4PR07MB2131.namprd07.prod.outlook.com (25.164.63.13) X-MS-Office365-Filtering-Correlation-Id: 0087f3d5-5c86-4ae5-01de-08d346c14fea X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2131;2:rUT9O7ErEM89/iGJ2EEnJgekWFCSH6qhky9tqVTsVNg/qQI6whHFgGYjJQPABLyPgAPI/prcYkdITwmBaHb/opbjb+7XBhtMQ0Z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M7nfG4+QXv08sAISjjNA60vDrJRjAVNngeqhCCIHbA0cLldJILujONXFAOLSJ6NHqFKsGDZBSCIbyAgMqga6oQX7AMbX1oiU/I9+prNPbSEX4Hf1uFNwRF4MS4hWhq7DP+c6zJ1YQqN6qgU08x4mI1BvuhEto3yt//fh29erdRU1JqLl8f+fkwWW2ZIQcJbQ3uZXiGVLNG+t/lels= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:BN4PR07MB2131;BCL:0;PCL:0;RULEID:;SRVR:BN4PR07MB2131; X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2131;4:m9wmgV1ftrV6LMfEymoktG992GiJDBIGl1p1dMp45Bv12Z8aVkqihbj+Z0/PdO1LPQq+VRm1GKQ8iRQQL5W7DeIWSFgCFGX1HKGAQjjXC5i3/drq/KuQLPv6XnCLPxti+2+JfYHj995fVR4bSknUXFpseoJ7NAIc5MfVIou+faHusTUb2j/Lqt+z9NrLsnAV5C+zEeyh8vWrrpdO/AJe1j3rdNEEG7dScaLiOJWc+30TWQXy3Ji4161Q9o5yKjR2s+xKjIX6gPY3dtPmTPz8+dKqWOZ3nk4OzYNQkMZUnGrYuTkbR0L0YVKYq/lrDox10TjtCWF9MmDLmmmEWvsef7HcEDpvib2mhGl1tS+bUU8GqFlpHtnwx0vTn5M36lx0 X-Forefront-PRVS: 087474FBFA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(24454002)(377454003)(57704003)(479174004)(53416004)(47776003)(65956001)(92566002)(40100003)(122386002)(87976001)(66066001)(33656002)(59896002)(5008740100001)(2950100001)(4001350100001)(23756003)(80316001)(19580405001)(42186005)(230700001)(36756003)(1096002)(65816999)(4326007)(2906002)(54356999)(87266999)(50986999)(586003)(76176999)(3846002)(6116002)(5004730100002)(189998001)(4001450100002)(81166005)(19580395003)(110136002)(77096005)(83506001)(50466002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR07MB2131;H:dl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;BN4PR07MB2131;23:qfCnOPMd+Zet1uIW9MkZbiwBWJBtzIKJKHqs7Xy?= =?iso-8859-1?Q?EhXd37LdpHoQw1u81qI7dHULfpQymbvtZlgTyqHec8NTMBAL+AtzyYcBmX?= =?iso-8859-1?Q?k1BzSMydPcsYJZwa5EBKFVvWQgFSVdNeoJz4BopaKNd3W2OaHW4nP1e4Or?= =?iso-8859-1?Q?uUrxWwwUZkXPFQn/HvcHt39hz1sdyqI/HPtbuJBmRFnHTPmp3ow6uYXxxE?= =?iso-8859-1?Q?L4pNvBulKtgtVJGxnoAwZLIwE6dSpBoZa0NwWLwEi+KG//PXyPqkka4aO/?= =?iso-8859-1?Q?kltPMTYBv4YwazP4MReSinqNNmJ65iu7cX4yq8WHGYLKHCMkLAA59M9qEB?= =?iso-8859-1?Q?VwTuWuAtqDD7EbvUQZ62W9hJErok0RZ5D4Lpvtvw2KZiUiqwcRHM9VWfnC?= =?iso-8859-1?Q?AKieIYIlb2rdd5CMBFKJaWbvXChsksSEKOV7gWgSVy4VROfXexuiS/m/Ou?= =?iso-8859-1?Q?AUPBxtOjN00BRCc132UYek1mvr5ESuu/Ue0KhlnTgXzYxhNwix+G8b3sBh?= =?iso-8859-1?Q?Aw5U7aR9lOLXHYwrt6E2mPUYKCOerlnFFM5ErUocv/rnSL2Yu81Dzdg+vA?= =?iso-8859-1?Q?L2MbCPSyvmg6xRmcujslQ1tCv6gZlgIQBFCvuV3R0kgAFaMlVmbKIkgNoh?= =?iso-8859-1?Q?UNt5MirNDvPLuWhuLMJpH5TRBWzwx0i/xJqb1m8E/wGysDyu6veAKtO+fr?= =?iso-8859-1?Q?bk9kFIFFy8SIUnnOnKLNF6l1FPb4cAVrgJpgy//98VN8l1Oedi2QWw2Fk4?= =?iso-8859-1?Q?Dc4ggbkjhHef6MBq7H7fsjMKosWsB5TfYTCoH2KkRJ0sMvYyzBbNv5PBtE?= =?iso-8859-1?Q?vYoeMa79pYmUizWdMgSttEco9fQdpd92vETT0a8I2qOQ+jBUwkhlNMGUNi?= =?iso-8859-1?Q?dCOTu2JheJJzy1zJ0H4f1iFometIds0AZw4+YRvLfcJKs/OvSM4W3Y96Jr?= =?iso-8859-1?Q?epN3uuwlB0BbyeidMA672EEU4bv9k9kfJEAt0lvH8mubZGGpJn2ziqP13q?= =?iso-8859-1?Q?dB+XbMjS96cyux01bPBXLswDcdb4wao6l/EP3kxeSPk+0y0aMjO4Bv2aNT?= =?iso-8859-1?Q?AJ6cX+JkUGLIcUCFRss6bBHiaae7zWJCbPpmfy8B3vJ3T3MEA+mEMxg48i?= =?iso-8859-1?Q?V2G5SHdzsKr37P6wRGaUBhuC9XHzdsEktTTCYxkoK0CeynBloIV/4hK8Yq?= =?iso-8859-1?Q?i6xDW3D1XyhfiEAU2InY7kxLf4nYFDguJ3wbHobQz9cnM/T9YMNudc=3D?= X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2131;5:nT6Up6X8nw6DWVqvZI3oKvCHX7nBt0KfzDG7IXZwNVAB+dJB6Ui505y5m+C/1K/Xe3J9RyDmgmzPQWZ1XoNP8jsaNKZWORQ5g36CZPu9iiicsIWJA5KXEpg2VsVLvb2J2qH8LBgRycmnKy2cRBuQvQ==;24:MFb+riEYPRKCwvoNZYohyqFDYCcsI2nX2qiZUvQzO+9ekcYF5+di4h923ojxdA6DjIazPE9kER/gdb07WMbeERiCN3999AdjDTpV8Trn200= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2016 19:47:24.6489 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2131 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3202 Lines: 85 On 03/07/2016 11:22 AM, Robert Richter wrote: > On 03.03.16 15:55:35, David Daney wrote: >> From: Ganapatrao Kulkarni >> >> Add DT bindings for numa mapping of memory, CPUs and IOs. >> >> Reviewed-by: Robert Richter >> Signed-off-by: Ganapatrao Kulkarni >> Signed-off-by: David Daney >> --- >> Documentation/devicetree/bindings/numa.txt | 272 +++++++++++++++++++++++++++++ >> 1 file changed, 272 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/numa.txt >> >> diff --git a/Documentation/devicetree/bindings/numa.txt b/Documentation/devicetree/bindings/numa.txt >> new file mode 100644 >> index 0000000..ec5ed7c >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/numa.txt > >> +============================================================================== >> +3 - distance-map >> +============================================================================== >> + >> +The device tree node distance-map describes the relative >> +distance (memory latency) between all numa nodes. >> + >> +- compatible : Should at least contain "numa-distance-map-v1". >> + >> +- distance-matrix >> + This property defines a matrix to describe the relative distances >> + between all numa nodes. >> + It is represented as a list of node pairs and their relative distance. >> + >> + Note: >> + 1. Each entry represents distance from first node to second node. >> + The distances are equal in either direction. >> + 2. The distance from a node to self (local distance) is represented >> + with value 10 and all internode distance should be represented with >> + a value greater than 10. >> + 3. distance-matrix should have entries in lexicographical ascending >> + order of nodes. >> + 4. There must be only one device node distance-map which must reside in the root node. > > There is no note that this one is optional, but is it right? The > default is 10 for local and 20 for remote connections. > Do we need to explicitly state that it is optional? Many node types are optional, and their binding specifications don't really talk about their being optional. If the node is present then it has the meaning specified. If the node is *not* present, then the special meaning described in the bindings document does not apply. In the case of NUMA, this means that all memory is equally distant (i.e. it is *Uniform*), and we are not talking about a *Non* *Uniform* Memory Architecture (NUMA) system. > If so, then ... > > static int __init of_numa_parse_distance_map(void) > { > int ret = -EINVAL; > struct device_node *np = of_find_node_by_path("/distance-map"); > > if (!np) > return ret; > > must return 0 instead of -EINVAL here. No, I don't think doing that would be correct. If there is no "distance-map", then of_numa_init() returns the error code. This causes the code in arch/arm64/kernel/numa.c to fall back to the non-NUMA "dummy_numa" case. By adding your Reviewed-by: Robert Richter tag to patch 5/6, where we select between "real" and "dummy_numa", I had assumed that you agreed with this approach. David Daney