Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5378747imm; Tue, 26 Jun 2018 10:11:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLI3iBix/rYQY5mge/y8PKAXqqlzPjF5GwR29Zy0Z734MQgcoghJpY+F/KjOBFiEgPLUs6w X-Received: by 2002:a63:3201:: with SMTP id y1-v6mr2148967pgy.419.1530033110971; Tue, 26 Jun 2018 10:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530033110; cv=none; d=google.com; s=arc-20160816; b=qdJfKZMSU8OlXgD8No7KB/+aqvkm/xIltFaHDY5f24+9w4hvlwhnH5x3mBh1Ql0pFw MS/gMovI1/jwaN0WHzRT5LPrSWf60XitwCmPMZQDgqJexqGGNofs8hxd6m9t+8/JIoaq 1OgznHS9aoh91bbTgpiXpao1i0gOg3XokIGJK7bvp+bh/ddWoKhU6hlMRCUcGKY0Igrm fPGxQhGjmwmsfcBGtRgbdoC7R6jbjN5cRCY4XBS9mid9QCgh+7DhB4mqd/2gCyLlt8HM SV8lT14n37eRM1PAxVyn+uilTH4fEoOAfsxqfi02hd6LTdCFsnl9F0Gj3kFRlXbgnxM9 noRg== 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:dkim-signature:arc-authentication-results; bh=D8wwYlaAZ9PKdTwD9iBQyCs0Oncq18eW5YuhVefn3wc=; b=EGkKXMHrTAzlcU2Jc3hUcJWBJI0IxgFjeJB+19+ZvsJoLicWyfuj8cYAV8Li08RV4w ZrpxAQ1BZbil3f52OLATXsj2hBVYPJGvW7/YQN/1OtkD6fOYtqY0mbLCUO+QeJlbaThg jU/rsEirj8qA4xR6sE2HVZGfd/lAweyDSaYaWPEsNHqGX+9lM9xBzTvWs4KN7wy1G7nW fFhDDz5RM6/5Y3xpwcVEOhduHRmFNlO7GUTCjnYjsvialGr4rsV24LouajQzKwasneI3 TaB0dyAJl4biTDDO3hhvIs6IX/NyOnVmZcaOeP5fQlcDiJ6G7r1TcNPZ0S4NvrmWL9Xw //zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ggJ3vKU0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5-v6si1882820plt.468.2018.06.26.10.11.36; Tue, 26 Jun 2018 10:11:50 -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; dkim=pass header.i=@kernel.org header.s=default header.b=ggJ3vKU0; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932879AbeFZRKY (ORCPT + 99 others); Tue, 26 Jun 2018 13:10:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:45144 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932579AbeFZRKU (ORCPT ); Tue, 26 Jun 2018 13:10:20 -0400 Received: from localhost (unknown [207.160.231.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF9632142A; Tue, 26 Jun 2018 17:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530033019; bh=69j7eZR3CQyOW3oWr4LYEjEqSCUnrzGbM3qYppBEIg0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ggJ3vKU0qSYNUQwpKy30NB3ApXog2V8JgRvb+75WUVrUqXRn57FD4hbO+X/MWAjuZ hz5wcTlNQm9NtE5WAHy1YTXiB496q0JQfMVEafNPc50yBxnPcu+ntuW9npNZykFX95 I1CyQpDKV+M0ZO7IDkaJGQLT5D1rVUFTlIoZkEdE= Date: Tue, 26 Jun 2018 12:10:18 -0500 From: Bjorn Helgaas To: Lorenzo Pieralisi Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Scott Branden , Will Deacon , Bjorn Helgaas , Rob Herring , Russell King , Jan Kiszka , Guenter Roeck , Ley Foon Tan Subject: Re: [PATCH v2] PCI: controller: Move PCI_DOMAINS selection to arch Kconfig Message-ID: <20180626171018.GB146680@bhelgaas-glaptop.roam.corp.google.com> References: <20180619112105.14457-1-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180619112105.14457-1-lorenzo.pieralisi@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 19, 2018 at 12:21:05PM +0100, Lorenzo Pieralisi wrote: > Commit 51bc085d6454 ("PCI: Improve host drivers compile test coverage") > added configuration options to allow PCI host controller drivers to be > compile tested on all architectures. > > Some host controller drivers (eg PCIE_ALTERA) config entries select > the PCI_DOMAINS config option to enable PCI domains management in > the kernel. Now that host controller drivers can be compiled on > all architectures, this triggers build regressions on arches that > do not implement the PCI_DOMAINS required API (ie pci_domain_nr()): > > drivers/ata/pata_ali.c: In function 'ali_init_chipset': > drivers/ata/pata_ali.c:469:38: error: > implicit declaration of function 'pci_domain_nr'; > did you mean 'pci_iomap_wc'? > > Furthemore, some software configurations (ie Jailhouse) require a > PCI_DOMAINS enabled kernel to configure multiple host controllers > without having an explicit dependency on the ARM platform on which > they run. > > Make PCI_DOMAINS a visible configuration option on ARM so that software > configurations that need it can manually select it and move the > PCI_DOMAINS selection from PCI controllers configuration file to ARM > sub-arch config entries that currently require it, fixing the issue. > > Fixes: 51bc085d6454 ("PCI: Improve host drivers compile test coverage") > Link: https://lkml.kernel.org/r/20180612170229.GA10141@roeck-us.net > Reported-by: Guenter Roeck > Signed-off-by: Lorenzo Pieralisi > Cc: Scott Branden > Cc: Will Deacon > Cc: Bjorn Helgaas > Cc: Rob Herring > Cc: Russell King > Cc: Jan Kiszka > Cc: Guenter Roeck > Cc: Ley Foon Tan I applied this to for-linus for v4.18, with acks from Jan, Ley Foon, and Rob. Thanks! > --- > v1 -> v2 > - Removed ARCH_VIRT PCI_DOMAINS selection > - Added PCI_DOMAINS visible config option > > v1: https://marc.info/?l=linux-pci&m=152932092612352&w=2 > > arch/arm/Kconfig | 8 +++++++- > arch/arm/mach-bcm/Kconfig | 1 + > arch/arm/mach-socfpga/Kconfig | 1 + > drivers/pci/controller/Kconfig | 3 --- > 4 files changed, 9 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 54eeb8d00bc6..843edfd000be 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -1245,8 +1245,14 @@ config PCI > VESA. If you have PCI, say Y, otherwise N. > > config PCI_DOMAINS > - bool > + bool "Support for multiple PCI domains" > depends on PCI > + help > + Enable PCI domains kernel management. Say Y if your machine > + has a PCI bus hierarchy that requires more than one PCI > + domain (aka segment) to be correctly managed. Say N otherwise. > + > + If you don't know what to do here, say N. > > config PCI_DOMAINS_GENERIC > def_bool PCI_DOMAINS > diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig > index c46a728df44e..25aac6ee2ab1 100644 > --- a/arch/arm/mach-bcm/Kconfig > +++ b/arch/arm/mach-bcm/Kconfig > @@ -20,6 +20,7 @@ config ARCH_BCM_IPROC > select GPIOLIB > select ARM_AMBA > select PINCTRL > + select PCI_DOMAINS if PCI > help > This enables support for systems based on Broadcom IPROC architected SoCs. > The IPROC complex contains one or more ARM CPUs along with common > diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig > index d0f62eacf59d..4adb901dd5eb 100644 > --- a/arch/arm/mach-socfpga/Kconfig > +++ b/arch/arm/mach-socfpga/Kconfig > @@ -10,6 +10,7 @@ menuconfig ARCH_SOCFPGA > select HAVE_ARM_SCU > select HAVE_ARM_TWD if SMP > select MFD_SYSCON > + select PCI_DOMAINS if PCI > > if ARCH_SOCFPGA > config SOCFPGA_SUSPEND > diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig > index 18fa09b3ac8f..cc9fa02d32a0 100644 > --- a/drivers/pci/controller/Kconfig > +++ b/drivers/pci/controller/Kconfig > @@ -96,7 +96,6 @@ config PCI_HOST_GENERIC > depends on OF > select PCI_HOST_COMMON > select IRQ_DOMAIN > - select PCI_DOMAINS > help > Say Y here if you want to support a simple generic PCI host > controller, such as the one emulated by kvmtool. > @@ -138,7 +137,6 @@ config PCI_VERSATILE > > config PCIE_IPROC > tristate > - select PCI_DOMAINS > help > This enables the iProc PCIe core controller support for Broadcom's > iProc family of SoCs. An appropriate bus interface driver needs > @@ -176,7 +174,6 @@ config PCIE_IPROC_MSI > config PCIE_ALTERA > bool "Altera PCIe controller" > depends on ARM || NIOS2 || COMPILE_TEST > - select PCI_DOMAINS > help > Say Y here if you want to enable PCIe controller support on Altera > FPGA. > -- > 2.15.0 >