From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934007AbdEVV0q (ORCPT ); Mon, 22 May 2017 17:26:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:48358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933756AbdEVV0n (ORCPT ); Mon, 22 May 2017 17:26:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CC1323961 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: Mon, 22 May 2017 16:26:40 -0500 From: Bjorn Helgaas To: Geert Uytterhoeven Cc: Kishon Vijay Abraham I , Bjorn Helgaas , linux-pci@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: endpoint: PCI_ENDPOINT should depend on HAS_DMA Message-ID: <20170522212640.GD19733@bhelgaas-glaptop.roam.corp.google.com> References: <1494955268-1262-1-git-send-email-geert@linux-m68k.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494955268-1262-1-git-send-email-geert@linux-m68k.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 16, 2017 at 07:21:08PM +0200, Geert Uytterhoeven wrote: > If NO_DMA=y: > > drivers/built-in.o: In function `__pci_epc_create': > (.text+0xef4e): undefined reference to `bad_dma_ops' > drivers/built-in.o: In function `pci_epc_add_epf': > (.text+0xf676): undefined reference to `bad_dma_ops' > drivers/built-in.o: In function `pci_epf_alloc_space': > (.text+0xfa32): undefined reference to `bad_dma_ops' > drivers/built-in.o: In function `pci_epf_free_space': > (.text+0xfac4): undefined reference to `bad_dma_ops' > > Add a dependency on HAS_DMA to fix this. > > Signed-off-by: Geert Uytterhoeven Applied to for-linus for v4.12, thanks! > --- > Should PCI_ENDPOINT depend on CONFIG_PCI instead? I *think* we want HAS_DMA, not CONFIG_PCI, because CONFIG_PCI means we want the infrastructure for PCI host bridges, enumerating children of the bridges, etc. I think we want to allow PCI_ENDPOINT without all that. Kishon? > --- > drivers/pci/endpoint/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/pci/endpoint/Kconfig b/drivers/pci/endpoint/Kconfig > index c23f146fb5a668b3..c09623ca8c3b14b9 100644 > --- a/drivers/pci/endpoint/Kconfig > +++ b/drivers/pci/endpoint/Kconfig > @@ -6,6 +6,7 @@ menu "PCI Endpoint" > > config PCI_ENDPOINT > bool "PCI Endpoint Support" > + depends on HAS_DMA > help > Enable this configuration option to support configurable PCI > endpoint. This should be enabled if the platform has a PCI > -- > 2.7.4 >