From patchwork Tue Jun 27 23:11:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 9813251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 887D960329 for ; Tue, 27 Jun 2017 23:12:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 787902684F for ; Tue, 27 Jun 2017 23:12:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C4D127F82; Tue, 27 Jun 2017 23:12:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E9D772684F for ; Tue, 27 Jun 2017 23:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Vc/xhlpj4WUnRL3QQKAzd1xCu4AuIIIHYTu/JgoCWDI=; b=oeJCFR5mMUmeiL kXgABo12fsa8Fv7dilHBBZSZggzfDoYbsC+aaQz5KUO1nJUZU84R3M351p8vRNlpPRjOzi1gCaQsi vCHrNUscwIIRuwv15pwDRyKNSeyshFxcuySUc/mRaMb0uIk7c/n5qajhFU0ZAWgCymaMPSexChtRv KxIdfFiB8yqGVfNKAV8FXDYCvFPpjqIvGQoMCY0JF1D3uLjnTLZfGvzgTPdCSmZhzIbwTMuzLqdMk wy8jecWcDortEaGvZ6hX6LOBydwLb8WmPAQMp9/DbbWI1BNUSvlCTj1IhY4MOvS6n7VHEKx6X5vR+ Y/cAnoBO3+HwRCzD5KAg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dPzeU-0001fp-RA; Tue, 27 Jun 2017 23:12:10 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dPzeQ-0001ef-OQ for linux-arm-kernel@lists.infradead.org; Tue, 27 Jun 2017 23:12:08 +0000 Received: from localhost (unknown [69.71.4.159]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 90709214E2; Tue, 27 Jun 2017 23:11:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90709214E2 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: Tue, 27 Jun 2017 18:11:43 -0500 From: Bjorn Helgaas To: Lorenzo Pieralisi Subject: Re: [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again Message-ID: <20170627231143.GI17844@bhelgaas-glaptop.roam.corp.google.com> References: <20170621215323.3921382-1-arnd@arndb.de> <20170621215323.3921382-2-arnd@arndb.de> <20170622093855.GA23310@red-moon> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170622093855.GA23310@red-moon> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170627_161206_814812_243F0E7C X-CRM114-Status: GOOD ( 20.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Jason Cooper , Arnd Bergmann , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Gregory Clement , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jun 22, 2017 at 10:38:55AM +0100, Lorenzo Pieralisi wrote: > On Wed, Jun 21, 2017 at 11:53:00PM +0200, Arnd Bergmann wrote: > > We used to pass the operations when calling pci_scan_root_bus, but > > that argument was removed: > > > > arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable] > > > > Setting it in pci_hw should address this. > > No unfortunately it does not. The way I structured the code the > bridge set-up is carried out in the struct hw_pci.scan() callback and > for mv78xx0 it was not done properly. > > As said in the other thread we need a pci_fixup_irqs() removal v3 to > address these issues, given that on some host bridges v2 it is still > untested. > > Lorenzo > > > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") > > Signed-off-by: Arnd Bergmann > > --- > > arch/arm/mach-mv78xx0/pcie.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c > > index 2b406e909a43..cb7f95c9d8eb 100644 > > --- a/arch/arm/mach-mv78xx0/pcie.c > > +++ b/arch/arm/mach-mv78xx0/pcie.c > > @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, > > } > > > > static struct hw_pci mv78xx0_pci __initdata = { > > + .ops = &pcie_ops, > > .nr_controllers = 8, > > .preinit = mv78xx0_pcie_preinit, > > .setup = mv78xx0_pcie_setup, I provisionally made the following change for mv78xx0, based on similar hunks for dove, iop13xx, and orion5x. This is on my pci/enumeration branch: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/enumeration&id=31ddd0eab68e19cf3dfc14321c99ff0b95cda4ad Please take a look and see if it makes sense. diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index 2b406e909a43..f793ebbd7539 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c @@ -201,6 +201,7 @@ static int __init mv78xx0_pcie_scan_bus(int nr, struct pci_host_bridge *bridge) return -EINVAL; } + bridge->ops = &pcie_ops; return pci_scan_root_bus_bridge(bridge); }