Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965246AbdIYQNu (ORCPT ); Mon, 25 Sep 2017 12:13:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:53014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934762AbdIYQNr (ORCPT ); Mon, 25 Sep 2017 12:13:47 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B3E821895 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, 25 Sep 2017 11:13:44 -0500 From: Bjorn Helgaas To: Geert Uytterhoeven Cc: Bjorn Helgaas , Arnd Bergmann , Alex Williamson , Joerg Roedel , linux-pci , iommu@lists.linux-foundation.org, "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] pci: Add dummy for pci_acs_enabled() if CONFIG_PCI=n to fix iommmu build Message-ID: <20170925161344.GC15970@bhelgaas-glaptop.roam.corp.google.com> References: <1505132955-9517-1-git-send-email-geert@linux-m68k.org> <20170922155605.GB15970@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Content-Length: 1965 Lines: 46 On Fri, Sep 22, 2017 at 08:12:46PM +0200, Geert Uytterhoeven wrote: > Hi Bj?rn, > > On Fri, Sep 22, 2017 at 5:56 PM, Bjorn Helgaas wrote: > > On Mon, Sep 11, 2017 at 02:29:15PM +0200, Geert Uytterhoeven wrote: > >> If CONFIG_PCI=n, and gcc (e.g. 4.1.2) decides not to inline > >> get_pci_function_alias_group(), the build fails with: > >> > >> drivers/iommu/iommu.o: In function `get_pci_function_alias_group': > >> iommu.c:(.text+0xfdc): undefined reference to `pci_acs_enabled' > >> > >> Due to the various dummies for PCI calls in the CONFIG_PCI=n case, > >> pci_acs_enabled() isn't actually ever called, but not all versions of > >> gcc are smart enough to realize that. > >> > >> While explicitly marking get_pci_function_alias_group() inline would fix > >> the build, this would inflate the code for the CONFIG_PCI=y case, as > >> get_pci_function_alias_group() is a not-so-small function called from > >> two places. > >> > >> Hence fix the issue by introducing a dummy for pci_acs_enabled() > >> instead. > >> > >> Signed-off-by: Geert Uytterhoeven > > > > Acked-by: Bjorn Helgaas > > > > Joerg, if you pick this up, would you mind capitalizing the subject > > line to match the PCI convention, e.g., > > > > PCI: Add dummy pci_acs_enabled() for CONFIG_PCI=n build > > > > If it's too late for you to pick this up this week, I can include it > > next week. I assume this is not related to a specific change, i.e., > > it's not a regression? Should it be marked for stable? > > It was introduced by commit 0ae349a0f33fb040 ("iommu/qcom: Add qcom_iommu"), > which enabled IOMMU support for compile-testing in e.g. allmodconfig on > platforms that don't have IOMMUs. I put this on my for-linus branch for v4.14 with Alex's reviewed-by. Since 0ae349a0f33f was merged in the v4.14 merge window (it first appeared in v4.14-rc1), I don't think we need to mark it for stable. Bjorn