From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758081AbeAHWfy (ORCPT + 1 other); Mon, 8 Jan 2018 17:35:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:45860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750864AbeAHWfv (ORCPT ); Mon, 8 Jan 2018 17:35:51 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D7DE2173C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Mon, 8 Jan 2018 16:35:45 -0600 From: Bjorn Helgaas To: Lorenzo Pieralisi Cc: Cyrille Pitchen , bhelgaas@google.com, kishon@ti.com, linux-pci@vger.kernel.org, adouglas@cadence.com, stelford@cadence.com, dgary@cadence.com, kgopi@cadence.com, eandrews@cadence.com, thomas.petazzoni@free-electrons.com, sureshp@cadence.com, nsekhar@ti.com, linux-kernel@vger.kernel.org, robh@kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 6/9] PCI: cadence: Add host driver for Cadence PCIe controller Message-ID: <20180108223545.GB31640@bhelgaas-glaptop.roam.corp.google.com> References: <4b2b67ad54e14ee5e1f83af65e9932ce408e82ec.1513620412.git.cyrille.pitchen@free-electrons.com> <20180108180613.GE2530@red-moon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180108180613.GE2530@red-moon> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Mon, Jan 08, 2018 at 06:06:13PM +0000, Lorenzo Pieralisi wrote: > On Mon, Dec 18, 2017 at 07:16:06PM +0100, Cyrille Pitchen wrote: > > This patch adds support to the Cadence PCIe controller in host mode. > > > > The "cadence/" entry in drivers/pci/Makefile is placed after the > > "endpoint/" entry so when the next patch introduces a EPC driver for the > > Cadence PCIe controller, drivers/pci/cadence/pcie-cadence-ep.o will be > > linked after drivers/pci/endpoint/*.o objects, otherwise the built-in > > pci-cadence-ep driver would be probed before the PCI endpoint libraries > > would have been initialized, which would result in a kernel crash. I assume this ordering requirement applies to both Cadence and DesignWare, i.e., drivers/pci/endpoint must be linked before drivers/pci/cadence and drivers/pci/dwc. If so, please add a one-line comment in the Makefile, e.g., obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ # endpoint library must be initialized before its users obj-$(CONFIG_PCI_CADENCE) += cadence/ obj-y += dwc/ I think the "PCI dwc controller drivers" comment adds no real value. > > diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile > > index 7284a7f6ad1e..a66ddb347798 100644 > > --- a/drivers/pci/Makefile > > +++ b/drivers/pci/Makefile > > @@ -54,5 +54,6 @@ obj-y += host/ > > obj-y += switch/ > > > > obj-$(CONFIG_PCI_ENDPOINT) += endpoint/ > > +obj-$(CONFIG_PCI_CADENCE) += cadence/ > > # PCI dwc controller drivers > > obj-y += dwc/