Received: by 10.223.148.5 with SMTP id 5csp7715725wrq; Thu, 18 Jan 2018 08:39:50 -0800 (PST) X-Google-Smtp-Source: ACJfBotv2iU5jy8rT/QhqajHH150NopIvpdu/4iWx0H/V7ErxqN6bmZwWk9Xa+hSDuZSnM415cNd X-Received: by 10.99.51.77 with SMTP id z74mr37631502pgz.324.1516293590121; Thu, 18 Jan 2018 08:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516293590; cv=none; d=google.com; s=arc-20160816; b=PYD4xzdO7DXiPDWvOjVKAKBp3UD4wLhLjaZeK8kzS1i6z7Yu7EWm2IiRxRhdH12wGe X/ZpZfx+P/CEBMf+iCEEk/wMkdJ8iiy+YG1ry7jgFYvDy8HttP23qSwMZ9G4KbwnDQbz CXHkTML2OxjQLh+OXpJh0tG7MmyfDw8uKDXoIPPxMmGZpi+7Aw8aWR1iV4OOmtnJetJ/ fDsEclRoKGokByqCpXGO0UEkMs3a/0ByZazp5Kgcs2qycKHjr9MOsoDbdHLGYMdMSLrp W3JMOENCMjnCapi+2OgIdWyZMZB2Ts9x7K/ZDDIYxUR37ZRkR55fQFykEgxvcpU4/p5I OZ+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=/NYu26fjlD/5Kj3sxaUWPGiWv04vur/IEMrsymd0SBk=; b=teSEz/yc7eQnspLyvyTwRSAv2IBDnAxZ/yf9XYvyJOcfNeGXPy2O4C9aMUOJi52EMC 4J4anaDA7mkkKyn0g2klA3jYp5rMM+mdLEvtkfQQtivtTD/IU558bSRSLHrFzVjQ3aVv 7T7D/h95yFoeXpy/iEqLzzL6xbx5aSBFBADLLk0hFr6TA59uBa5Zr7SQIr1zq6Te6w4F TcEKiEiQ2AnCcs7e7AcyX4mit7kDpjJov+8ugkDn/XcIeKJxgXpiQYQKK52GUW9Ejd+Z IGXkf9A8wS3szlRuaohrzi7IFeLiZqoyw4NqQD5wDM3pwWsXVZD6KDPiypdWD3f97KOD a/fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Gd9nKHc6; 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 f7si7396027pfh.215.2018.01.18.08.39.35; Thu, 18 Jan 2018 08:39:50 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Gd9nKHc6; 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 S1755004AbeARQjF (ORCPT + 99 others); Thu, 18 Jan 2018 11:39:05 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:44181 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753406AbeARQjD (ORCPT ); Thu, 18 Jan 2018 11:39:03 -0500 Received: by mail-ot0-f193.google.com with SMTP id t20so11270607ote.11; Thu, 18 Jan 2018 08:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=/NYu26fjlD/5Kj3sxaUWPGiWv04vur/IEMrsymd0SBk=; b=Gd9nKHc6ioR7is37vZ71mLEAwF5wGvm/XJPD0U6rNQaIc6g2b7oZ1zwRizoOVcIXAE qATWq+e9Lyxsdydi6KDTQU7ypK9kJ+aY6YxljMRGn8n2JE7WejDHCDnbSB3lIYzvAyn2 coSKPOMyAtibvCdRSzmHsoP8ce+xmdNIQKfFzaiRQ/6ehFolfTOQAqw6DBqdkSGXNWjG eSMKgYEDsFcIVAG4taTYEWcN3uDRx/WyxN3FJz7P9FUIFn2JEfQen5YvtiBpQ5/Oqr5g pJe/BgA6I/wlx+B89INqccaVIub5prMvzvN+B8HBLXjf7bdXIFRrAxrf5L08X0E+ojoE vO/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=/NYu26fjlD/5Kj3sxaUWPGiWv04vur/IEMrsymd0SBk=; b=D9ADmrScJgW6CtVBjoTn9jHqUZhhYin609LW0tdZRwpuh+CPhGw6UZehDdY33QkKzG 7CQRXQ4lpK6eyTpjVV6esqVKbd4bvHAnElCdriiR/LOo0hBxuA/L3v4+p9v517hgk9+L usmNnGzI0OtXSrBqOjKeNdAtwMgWNz1Q280f32vuy6iucPOm9yWxtxPBSCumY+ghg8Mf 1fCnm0Q9YE/7SpzoaeZ+SyEVhAVrUERppMFPdGfC9PNIDMC2qbJ6CCHGp5IbTrL1s9SR w5Ne7MFKBparQhYAof2e3l04BH/jBOtfcSsBcU53SOFQeQDOVpQlJa4UotsqE0yGHuzv ddRQ== X-Gm-Message-State: AKwxytdCagzIyBwTx4Te03Zq23h6ErqfJZrTrs7wSst9xHQ3BtZynTSg eFoM8EdkWC3GKxV52eWKo7mSTVEEOeXWdz1i9FAb+g== X-Received: by 10.157.39.229 with SMTP id c92mr3512451otb.212.1516293542642; Thu, 18 Jan 2018 08:39:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.17.89 with HTTP; Thu, 18 Jan 2018 08:39:02 -0800 (PST) In-Reply-To: <20180118150357.GA7544@axis.com> References: <20180118131612.871559-1-arnd@arndb.de> <20180118150357.GA7544@axis.com> From: Arnd Bergmann Date: Thu, 18 Jan 2018 17:39:02 +0100 X-Google-Sender-Auth: Hb6-1_PSVYTZFUDOy2rIutN-XgI Message-ID: Subject: Re: [PATCH] PCI: dwc: dra7xx: add back CONFIG_PCI dependency for endpoint To: Niklas Cassel Cc: Lorenzo Pieralisi , Bjorn Helgaas , Kishon Vijay Abraham I , Jingoo Han , Peter Robinson , linux-pci , Linux Kernel Mailing List 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 On Thu, Jan 18, 2018 at 4:03 PM, Niklas Cassel wrote: > 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 Right, I see it now, sorry for the accusation ;-) > 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. I have a vague memory of that, yes. > 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 Looks fine to me, but I'd put the '{ return 0; }' in a new line for consistency with the other functions here, and maybe return -EINVAL instead of zero. Can you submit that as a proper patch and add my Acked-by: Arnd Bergmann ? Thanks! Arnd