Received: by 10.223.148.5 with SMTP id 5csp7580228wrq; Thu, 18 Jan 2018 07:06:07 -0800 (PST) X-Google-Smtp-Source: ACJfBov+8wkUsOLlMeM/soWkjhrCvIpuQ1enB6GENufzZzMoXuAoZaDNVGo65iO+CTMqcZqgSm7S X-Received: by 10.98.205.70 with SMTP id o67mr30372935pfg.100.1516287967255; Thu, 18 Jan 2018 07:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516287967; cv=none; d=google.com; s=arc-20160816; b=jvG14tL4KwYc7+2QhhAOJO/GaTQKWYbaufjuoIAPSpln23HQ1v1BIHnyVjOyZWhdte ssADS5uhlo+wsZZMW9CBTrWQG9LdU9nn5A6k/wD4sxHOdlQW60ARRuiZbNoAY9N0tLiq 2i3jJiGud1KRf4sSwN9vYre8g/vGurmHGfHB3nTP7E8w6NJOjC5qR7/Ie5ryOjbTQZvF QY9Vt93wHD4gVo5JVNZmPueljOnm4dyhB//XaDgU98S5pwcwrp1AdHN030ECpt4Ce8rI fSErRUSgYe9PailkF9NrEHXsAyCaV7lqvwDYfIIUBwmPO45b6ZMQN3PzB123MbBzOWJu 7FNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=FijTPtzvZ/nZk03E/AY4BXZQlp6B9E1LAsaKuFB0hRU=; b=Aqf0ffFsphlYpoexP/UoSuqO4Y2v5XHh2wPL2RSRRvC3MxzhbBfM/ZTx4Fd3YZMilt LeO0PuMGZeXe2a63l66A0OmOwK+fySP87v07atkOyS3AbqMbGDdGUI3sYsTWfuNobNnq t/I63lASbx2q6xez+5bHEgDEhhkfl2bRBR3GOI73ehgAp70EiVv4Q/9JExJ6IZPP8qp4 +lsgGDRl4DxuJKRj6sHe32LF0D3O7cCPRZiOYhTemOQJ+d5fKkopjPnRHjeMUym0jV7L OFDIUzcY//iyEKy/N5GC7/c0DZvSv9fqNHV5HwJc+9F/pdW4ckCCtWaRcX3GsV/rUC+u 1lzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i135si6258556pgc.459.2018.01.18.07.05.52; Thu, 18 Jan 2018 07:06:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755837AbeARPEP (ORCPT + 99 others); Thu, 18 Jan 2018 10:04:15 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:53220 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755160AbeARPEA (ORCPT ); Thu, 18 Jan 2018 10:04:00 -0500 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 4383D18470; Thu, 18 Jan 2018 16:03:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id gaVmc4JH9S7o; Thu, 18 Jan 2018 16:03:58 +0100 (CET) Received: from boulder03.se.axis.com (boulder03.se.axis.com [10.0.8.17]) by bastet.se.axis.com (Postfix) with ESMTPS id 3038218293; Thu, 18 Jan 2018 16:03:58 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 125CC1E079; Thu, 18 Jan 2018 16:03:58 +0100 (CET) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 063461E078; Thu, 18 Jan 2018 16:03:58 +0100 (CET) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder03.se.axis.com (Postfix) with ESMTP; Thu, 18 Jan 2018 16:03:57 +0100 (CET) Received: from lnxartpec1.se.axis.com (lnxartpec1.se.axis.com [10.88.4.10]) by thoth.se.axis.com (Postfix) with ESMTP id EDE8A1832; Thu, 18 Jan 2018 16:03:57 +0100 (CET) Received: by lnxartpec1.se.axis.com (Postfix, from userid 20283) id E846B401C3; Thu, 18 Jan 2018 16:03:57 +0100 (CET) Date: Thu, 18 Jan 2018 16:03:57 +0100 From: Niklas Cassel To: Arnd Bergmann Cc: Lorenzo Pieralisi , Bjorn Helgaas , Kishon Vijay Abraham I , Jingoo Han , Peter Robinson , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: dwc: dra7xx: add back CONFIG_PCI dependency for endpoint Message-ID: <20180118150357.GA7544@axis.com> References: <20180118131612.871559-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180118131612.871559-1-arnd@arndb.de> User-Agent: Mutt/1.9.1+16 (8a41d1c2f267) (2017-09-22) X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 18, 2018 at 02:15:54PM +0100, Arnd Bergmann wrote: > It was a nice idea to split out the PCI host and endpoint mode configuration > into separate options. Unfortunately it doesn't build: > > drivers/pci/dwc/pci-dra7xx.c:229:11: error: 'pci_irqd_intx_xlate' undeclared here (not in a function) > > This is certainly a fixable problem, but since it's clear that this > configuration was never tested, let's maybe revert back to the > dependency for now, until it can be done in a way that works > better. Hello Arnd, That is not true :( I did test.. git checkout b052835c6385 disable CONFIG_PCI make works like a charm :P Commit 524d59f6e30a ("PCI: dra7xx: Fix legacy INTD IRQ handling"), which was merged after my commit, added a dependency towards pci_irqd_intx_xlate. It might be a bit unfortunately that commit 489f8fe6aa71 ("PCI: dwc: dra7xx: Help compiler to remove unused code"), a commit that you helped me with Arnd, was placed after b052835c6385 ("PCI: dwc: dra7xx: Refactor Kconfig and Makefile handling for host/ep mode") instead of before, in my patch series order. However, since pci_irqd_intx_xlate is only defined inside CONFIG_PCI, even 489f8fe6aa71 will not help. Not completely sure about this, but perhaps a better fix is: +++ b/include/linux/pci.h @@ -1686,6 +1686,12 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; } #define dev_is_pf(d) (false) static inline bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags) { return false; } +static inline int pci_irqd_intx_xlate(struct irq_domain *d, + struct device_node *node, + const u32 *intspec, + unsigned int intsize, + unsigned long *out_hwirq, + unsigned int *out_type) { return 0; } #endif /* CONFIG_PCI */ /* Include architecture-dependent settings and functions */ And a 'Fixes:' tag that references 524d59f6e30a Regards, Niklas > > Fixes: b052835c6385 ("PCI: dwc: dra7xx: Refactor Kconfig and Makefile handling for host/ep mode") > Signed-off-by: Arnd Bergmann > --- > drivers/pci/dwc/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/dwc/Kconfig b/drivers/pci/dwc/Kconfig > index 0fb96c7754de..540419527a92 100644 > --- a/drivers/pci/dwc/Kconfig > +++ b/drivers/pci/dwc/Kconfig > @@ -36,7 +36,7 @@ config PCI_DRA7XX_HOST > config PCI_DRA7XX_EP > bool "TI DRA7xx PCIe controller Endpoint Mode" > depends on SOC_DRA7XX || COMPILE_TEST > - depends on PCI_ENDPOINT > + depends on PCI && PCI_ENDPOINT > depends on OF && HAS_IOMEM && TI_PIPE3 > select PCIE_DW_EP > select PCI_DRA7XX > -- > 2.9.0 >