From patchwork Fri Dec 18 14:57:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7886111 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 593D49F387 for ; Fri, 18 Dec 2015 14:58:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59B73204AD for ; Fri, 18 Dec 2015 14:58:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 662D220480 for ; Fri, 18 Dec 2015 14:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751313AbbLRO6H (ORCPT ); Fri, 18 Dec 2015 09:58:07 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:63779 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751019AbbLRO6G (ORCPT ); Fri, 18 Dec 2015 09:58:06 -0500 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0M4miX-1aOh0T1Ppd-00yvRQ; Fri, 18 Dec 2015 15:57:56 +0100 From: Arnd Bergmann To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Ray Jui , Vikram Prakash , Anup Patel , Scott Branden , Marc Zyngier , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] PCI: iproc: fix msi driver selection Date: Fri, 18 Dec 2015 15:57:53 +0100 Message-ID: <1541985.1Jq5kHC7MS@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_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ci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The newly added MSI support for iproc causes a link error when its Kconfig option is disabled: ERROR: "iproc_msi_exit" [drivers/pci/host/pcie-iproc.ko] undefined! ERROR: "iproc_msi_init" [drivers/pci/host/pcie-iproc.ko] undefined! This changes the header file so we use stub functions whenever the driver is not built, even when CONFIG_MSI is enabled. As the Kconfig logic for the driver is a bit off, I'm rectifying that as well, by making it depend on the specific drivers that call into the driver, and moving the option behind those instead of before them. Signed-off-by: Arnd Bergmann Fixes: 610894347cbf ("PCI: iproc: Add iProc PCIe MSI support") Reviewed-by: Ray Jui --- Found on ARM randconfig builds a couple of days ago -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig index 490476e172fd..d7c05894af70 100644 --- a/drivers/pci/host/Kconfig +++ b/drivers/pci/host/Kconfig @@ -124,15 +124,6 @@ config PCIE_IPROC iProc family of SoCs. An appropriate bus interface driver needs to be enabled to select this. -config PCIE_IPROC_MSI - bool "Broadcom iProc PCIe MSI support" - depends on ARCH_BCM_IPROC && PCI_MSI - select PCI_MSI_IRQ_DOMAIN - default ARCH_BCM_IPROC - help - Say Y here if you want to enable MSI support for Broadcom's iProc - PCIe controller - config PCIE_IPROC_PLATFORM tristate "Broadcom iProc PCIe platform bus driver" depends on ARCH_BCM_IPROC || (ARM && COMPILE_TEST) @@ -154,6 +145,16 @@ config PCIE_IPROC_BCMA Say Y here if you want to use the Broadcom iProc PCIe controller through the BCMA bus interface +config PCIE_IPROC_MSI + bool "Broadcom iProc PCIe MSI support" + depends on PCIE_IPROC_PLATFORM || PCIE_IPROC_BCMA + depends on PCI_MSI + select PCI_MSI_IRQ_DOMAIN + default ARCH_BCM_IPROC + help + Say Y here if you want to enable MSI support for Broadcom's iProc + PCIe controller + config PCIE_ALTERA bool "Altera PCIe controller" depends on ARM || NIOS2 diff --git a/drivers/pci/host/pcie-iproc.h b/drivers/pci/host/pcie-iproc.h index 6def23a7eb54..e84d93c53c7b 100644 --- a/drivers/pci/host/pcie-iproc.h +++ b/drivers/pci/host/pcie-iproc.h @@ -79,7 +79,7 @@ struct iproc_pcie { int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res); int iproc_pcie_remove(struct iproc_pcie *pcie); -#ifdef CONFIG_PCI_MSI +#ifdef CONFIG_PCIE_IPROC_MSI int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node); void iproc_msi_exit(struct iproc_pcie *pcie); #else