Received: by 10.192.165.148 with SMTP id m20csp567374imm; Wed, 25 Apr 2018 04:24:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/6UYz/N0FpzJRER/zFgm81ZmXOtTFlAGta2ZWk6I03239tH5XkV3jKIU4L1bkRaeQ+T4by X-Received: by 10.99.115.81 with SMTP id d17mr22746128pgn.297.1524655446346; Wed, 25 Apr 2018 04:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524655446; cv=none; d=google.com; s=arc-20160816; b=xjh1xbFuoM1Ms/EmK1HGCjCFPN0ww3nn8xPQLhdG4/QFJg2NlJ77GhlDQvFyw2o/R6 p44tS1kBOEZngSmxfCt1iw2xQlhWLZ4BA2cfXWV6xURYQKiowYevANeeXShS6kWU8GaJ A1zB1yPcnNq94LvwP/GJeH60Tc0OedUUqtKTC2u1mDDyscIAni2qZJXeaGE2u5WA30dR gelt5Fgee51i7m0B8DMfriDnODTkr4s9TKwmhBEELoIwPQIQYpPfgHnN08F49HoPesCN efiN3EZ2NGG8epWvh/aeubhTFHwBZH64+TzYAsWPHVZd5pg33Qn+lcwCoyrgJYKCbz7l Bldg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=pRH76tJwdW9me1kKEzaDIRFh3bWJ1ZHHg7XMurlZMpY=; b=uXrRRThQyGzcXbkam3X1XWsA7zHlC6UVbuGL4TSIrgJSCGi88iz1mYHyXmt39mFqtT yjGMaCM0lmtGRvt2ujodEpFhSPc9OV6AdL9yxSrvz44oSDd2QYtlq321KM2mkyBPnpzx jWNdt6FBPR0n7Tb897e7kmGSmwnu9Zf0znwjGxvJ3PlYwuKIz+oZCIzf2hWuV1eNYH6T /wRbclrKqn28Pfvd5YUFM1kJnJ1ut+fsUt+XbYIfC/lLQ16jyuEYXoVOIK4Ky29gagx9 JctODdg5lgss+7rbHOOWEWN2Y8FvuBuYqCZNJYWABqPAPqz3VXC2N2fA8HJKkmGPnZMX tCXg== 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 d7si2834585pfe.214.2018.04.25.04.23.51; Wed, 25 Apr 2018 04:24:06 -0700 (PDT) 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 S1753587AbeDYKjW (ORCPT + 99 others); Wed, 25 Apr 2018 06:39:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51808 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753567AbeDYKjP (ORCPT ); Wed, 25 Apr 2018 06:39:15 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A66B236; Wed, 25 Apr 2018 10:39:14 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Niklas Cassel , Bjorn Helgaas , Arnd Bergmann , Lorenzo Pieralisi , Sasha Levin Subject: [PATCH 4.14 056/183] PCI: Add dummy pci_irqd_intx_xlate() for CONFIG_PCI=n build Date: Wed, 25 Apr 2018 12:34:36 +0200 Message-Id: <20180425103244.797328728@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Niklas Cassel [ Upstream commit 80db6f08b7af93eddc9487535e6150b220262637 ] Some hardware can operate in either "host" or "endpoint" mode, which means there can be both a host bridge driver and an endpoint driver for the same device. Those drivers share a lot of code, so sometimes they live in the same source file. The host bridge driver requires CONFIG_PCI=y because it enumerates PCI devices below the bridge using the PCI core. The endpoint driver does not require CONFIG_PCI=y because it runs in an embedded kernel on the other side of the device, e.g., on an adapter card. pci-dra7xx.c contains both host and endpoint drivers. If we select only the endpoint driver (CONFIG_PCI=n and CONFIG_PCI_DRA7XX_EP=y), the unneeded host driver is still compiled. It references pci_irqd_intx_xlate(), which is not present when CONFIG_PCI=n, which causes this error: drivers/pci/dwc/pci-dra7xx.c:229:11: error: 'pci_irqd_intx_xlate' undeclared here (not in a function) Add a dummy pci_irqd_intx_xlate() for the CONFIG_PCI=n case. [bhelgaas: changelog] Signed-off-by: Niklas Cassel Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Acked-by: Lorenzo Pieralisi Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/linux/pci.h | 7 +++++++ 1 file changed, 7 insertions(+) --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1688,6 +1688,13 @@ static inline int pci_get_new_domain_nr( #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 -EINVAL; } #endif /* CONFIG_PCI */ /* Include architecture-dependent settings and functions */