From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932782AbcBHXcE (ORCPT ); Mon, 8 Feb 2016 18:32:04 -0500 Received: from mail-by2on0079.outbound.protection.outlook.com ([207.46.100.79]:11040 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932757AbcBHXcB (ORCPT ); Mon, 8 Feb 2016 18:32:01 -0500 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=caviumnetworks.com; Message-ID: <56B9256A.5040106@caviumnetworks.com> Date: Mon, 8 Feb 2016 15:31:54 -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: Bjorn Helgaas CC: Rob Herring , David Daney , Bjorn Helgaas , "linux-pci@vger.kernel.org" , Will Deacon , "linux-arm-kernel@lists.infradead.org" , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , David Daney Subject: Re: [PATCH v5 3/3] pci, pci-thunder-ecam: Add driver for ThunderX-pass1 on-chip devices References: <1454715675-17512-1-git-send-email-ddaney.cavm@gmail.com> <1454715675-17512-4-git-send-email-ddaney.cavm@gmail.com> <20160208195642.GA15103@rob-hp-laptop> <56B8FED6.1050804@caviumnetworks.com> <56B90B09.7090500@caviumnetworks.com> <20160208221204.GA30821@localhost> <56B919A5.5090000@caviumnetworks.com> <20160208232430.GA1353@localhost> In-Reply-To: <20160208232430.GA1353@localhost> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.2.3.194] X-ClientProxiedBy: BY2PR07CA046.namprd07.prod.outlook.com (10.141.251.21) To DM3PR07MB2140.namprd07.prod.outlook.com (25.164.4.146) X-Microsoft-Exchange-Diagnostics: 1;D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3+8UjvJdj4Qp3Tg8ed3I2FSqEHXDfbtF5pLor49bmclGSWCaxubSHioEhLetCEt0MUTd6KepuUfUO0QwQh+tmn2nd2BM3w6N3a05qRXA5ebDiitDer36xC6YLhysgdgOCO3Tw9kBAuiY3H/R4oSm5TSFVcsMBAbYSvMCcs3Q570qqxTdgjYCxB4jZESVf89kGvcDrJneV2hbnpHVeH+M8RksvXRcyE9I7+li5VvrzQJcsLxZctlpP0j+8k8Ek1CuSTHXSWmAEIZ+gcVXKfuimFlGBEws4TQxrQAzdmN5PuHwhdWIrnZajBnkVYqtsMBvk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:DM3PR07MB2140;BCL:0;PCL:0;RULEID:;SRVR:DM3PR07MB2140; X-Microsoft-Exchange-Diagnostics: 1;DM3PR07MB2140;4:DysW93WMAzCLg0kcZmDtWQB/fwtiGeNaOD/3X+VjrTbR2v6L4f2cl6wwLAH3V91bbBHfqpvhHLXr8QHavQ+b8or9dNxBMCkMrefVFxNX9vdZOGZxTOvfkeVJKXV62KtPT9quXeKakVwcVNBtT+Bxsd0aTCtDKNjErjVmUC3ZWbgNB5xVhoQVoG7Av+kWeE+Nq0DtwGoJfZySw18vQFgIzHzIjWewQpX4ai4Nqtlm1/su8Ocur6pt1T22YzooIAaCWqekyMtOntXaOtkI8DvaXMVsmfWWFPbhe1dO+KMbwTdmWRkX9qoEN6p7yymXUQAL+JEvl56QwKaaC5PNysu8ZLiu+YKs4K7MLoahDUGSXy/cL7ZShdfc21LTmo6nZ/T/ X-Forefront-PRVS: 084674B2CF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(377454003)(479174004)(230700001)(36756003)(19580395003)(19580405001)(80316001)(65956001)(66066001)(230783001)(5008740100001)(5004730100002)(65806001)(4326007)(122386002)(40100003)(23756003)(47776003)(42186005)(2906002)(64126003)(59896002)(33656002)(83506001)(53416004)(54356999)(76176999)(189998001)(50466002)(87976001)(87266999)(65816999)(50986999)(110136002)(4001350100001)(5001960100002)(1096002)(92566002)(3846002)(6116002)(2950100001)(93886004)(586003)(77096005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM3PR07MB2140;H:dl.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;DM3PR07MB2140;23:l5T9MMaBcZ+GT4GG2fE+Dk//E3uP+09LT17APQz?= =?iso-8859-1?Q?Xmz2ov/vW39eFkDrBhHxEaXtzCKWcVpKqnZ7hGfL7L6B4/OnIsCGWSSFc8?= =?iso-8859-1?Q?te85td7LwAkvIxOdvWgeklnt8lunlTaHdflF7S4tnM1iQOjTUBeBwGYhHk?= =?iso-8859-1?Q?nh5InH9otRUrmFZEFjzFBdRewfFfAu3Q1n3LQPrVy8Xfj83iLAuLxsXPro?= =?iso-8859-1?Q?47cSJvQzcjJrulmTEdrpe50+iC2bCvvcMUZin89MReTArmoMAxxFtCWjUp?= =?iso-8859-1?Q?3dZE2ddKMqaN2A25ee/9/E0ZHcd0VxC1qLdF0R1/UYGiULxUbA3Hq9dI1k?= =?iso-8859-1?Q?44Tjc74DDR+ML+gMZCen5nioU+PnqnDpn6YbUqFf9Y+Xun4Bf+VNdA0ec7?= =?iso-8859-1?Q?PZXikLIwcQ7VDKgU3xMjjAxhl5OBpV01U1S5OY/kzThkvsNUcwex360SfP?= =?iso-8859-1?Q?za2DQx/VSk3ZmR6XYymLSqhjwSbJe8vH8mA0rV3RDylvfg6vERdQp9ZK0x?= =?iso-8859-1?Q?7gXvwL9CP2JLFXCuyn4cddWfK7r/gT50vlkbmYHffTYn7TzlLnoSP2Ad1i?= =?iso-8859-1?Q?ee78jznm9jrAsX0MRIAxoSM+pt3btP6pnsOPpdy+0TtV4zZ/cBScPHyjIe?= =?iso-8859-1?Q?QOYQBp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agnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2016 23:31:58.2875 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2140 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/08/2016 03:24 PM, Bjorn Helgaas wrote: > On Mon, Feb 08, 2016 at 02:41:41PM -0800, David Daney wrote: >> On 02/08/2016 02:12 PM, Bjorn Helgaas wrote: >>> On Mon, Feb 08, 2016 at 01:39:21PM -0800, David Daney wrote: >>>> On 02/08/2016 01:12 PM, Rob Herring wrote: >>>>> On Mon, Feb 8, 2016 at 2:47 PM, David Daney wrote: >>>>>> On 02/08/2016 11:56 AM, Rob Herring wrote: >>>>>>> On Fri, Feb 05, 2016 at 03:41:15PM -0800, David Daney wrote: >>>>>>>> From: David Daney >>>>>>>> +Properties of the host controller node that differ from >>>>>>>> +host-generic-pci.txt: >>>>>>>> + >>>>>>>> +- compatible : Must be "cavium,pci-host-thunder-ecam" >>>>>>>> + >>>>>>>> +Example: >>>>>>>> + >>>>>>>> + pci@84b0,00000000 { >> ... >>>>>>> and the node name should be "pcie". >>>>>> >>>>>> Why pcie? >>>>>> >>>>>> There are no PCIe devices or buses reachable from this type of root complex. >>>>>> There are however many PCI devices. >> ... > >>>> Really, it is a bit of a gray area here as we don't have any bridges >>>> to PCIe buses and there are multiple devices residing on each bus, >>>> so from that point of view it cannot be PCIe. There are, however, >>>> devices that implement the PCI Express Capability structure, so does >>>> that make it PCIe? It is not clear what the specifications demand >>>> here. >>> >>> The PCI core doesn't care about the node name in the device tree. But >>> it *does* care about some details of PCI/PCIe topology. We consider >>> anything with a PCIe capability to be PCIe. For example, >>> >>> - pci_cfg_space_size() thinks PCIe devices have 4K of config space >>> >>> - only_one_child() thinks a PCIe bus, i.e., a link, only has a >>> single device on it >>> >>> - a PCIe device should have a PCIe Root Port or PCIe Downstream Port >>> upstream from it (we did remove some of these restrictions with >>> b35b1df5e6c2 ("PCI: Tolerate hierarchies with no Root Port"), but >>> it's possible we didn't get them all) >>> >>> I assume your system conforms to expectations like these; I'm just >>> pointing them out because you mentioned buses with multiple devices on >>> them, which is definitely something one doesn't expect in PCIe. >> >> The topology we have is currently working with the kernel's core PCI >> code. I don't really want to get into discussing what the >> definition of PCIe is. We have multiple devices (more than 32) on a >> single bus, and they have PCI Express and ARI Capabilities. Is that >> PCIe? I don't know. > > I don't need to know the details of your topology. As long as it > conforms to the PCIe spec, it should be fine. If it *doesn't* conform > to the spec, but things currently seem to work, that's less fine, > because a future Linux change is liable to break something for you. > > I was a little concerned about your statement that "there are multiple > devices residing on each bus, so from that point of view it cannot be > PCIe." That made it sound like you're doing something outside the > spec. If you're just using regular multi-function devices or ARI, > then I don't see any issue (or any reason to say it can't be PCIe). OK, I will make it "pcie@...." Really, ARI is the only reason. But since ARI is defined in the PCI Express specification, pcie it is. I will send revised patches today. David Daney > > Bjorn >