Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp487481imm; Wed, 20 Jun 2018 01:29:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLKAUtP6Rd3eLncirsr4SuP+sJ5S9kA3UVWwJbwy/pyVn2q+5ryB/EuQv55IUd8YBRx+Qnb X-Received: by 2002:a17:902:b683:: with SMTP id c3-v6mr22622842pls.158.1529483340884; Wed, 20 Jun 2018 01:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529483340; cv=none; d=google.com; s=arc-20160816; b=hDxQm4wRuO8FLC6qeBL7gpkZJ5DCClNrdiVX4ivaQ/4CNnHNG+NGDi5la/gFINp1A2 9vKCzP264yUdU/v+qu/1gPwYOAdO0/sxz2HJFsYGM8PoALKhOue6dzvI50Qv/XbavOI2 erRst6istNeJ2MSD3PH6tYTEDqqmnGhdKUaM3DCbshU3VVMwEcmv8tWdRpJiyRD+A7bb nYAiMDMKv9/UnnLANt69tOvpCsdCFYSgVIriY6b9m35oLy07s9p0NAQ9gzeIJGqG16uH OInHKGI3JjUzpmSUzZonIg1pSin1vWUTBHU+xF1BqayM1S8T19yhMYpRkjYRamfGmrzx 6BfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=nmAXOSb5dpIdOkboHFuT8+on3KN8whSS5W5q9j+TVWA=; b=t0HRwFuyNlV01dO7m7npFFoZJeDU8fndV3rD2dv/Hv4RiFQumZbN9N+QyCcT1nLqgZ QTVbetoszI0EMpm9xnuGD0P9Caf+CkBotDsSptrQJy9bBYmn64ym8AVlMgsgqzQvedRP tkAdKYy5eUvDjKfHEUNNWyPq+fsiHa4vsbSUkPif7a4ad4XXtmCFbxx7MyoaEjmqcLEA 7/FcliOywC92jVzzc0IdCcCib8Xa4CBp2HEkmuMVCt4dwM2OE8SnWhZ5i5uNHDLIaDHG eqxs/J/OVZ+icYAnec3CEudzzmT2aVceMYmpB1oS56s0x8CjCJbb9KlxLPbKWCtAAEXp YxyA== 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 s3-v6si1833306plb.394.2018.06.20.01.28.27; Wed, 20 Jun 2018 01:29:00 -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 S1753945AbeFTI1O (ORCPT + 99 others); Wed, 20 Jun 2018 04:27:14 -0400 Received: from david.siemens.de ([192.35.17.14]:46318 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbeFTI1J (ORCPT ); Wed, 20 Jun 2018 04:27:09 -0400 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id w5K87fYg015134 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Jun 2018 10:07:43 +0200 Received: from [167.87.66.47] ([167.87.66.47]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w5K87X0x007013; Wed, 20 Jun 2018 10:07:33 +0200 Subject: Re: [PATCH v2] PCI: controller: Move PCI_DOMAINS selection to arch Kconfig To: Lorenzo Pieralisi , linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Scott Branden , Will Deacon , Bjorn Helgaas , Rob Herring , Russell King , Guenter Roeck , Ley Foon Tan References: <20180619112105.14457-1-lorenzo.pieralisi@arm.com> From: Jan Kiszka Message-ID: <30bb8a16-f829-a5a4-265f-2d1112d8d0bf@siemens.com> Date: Wed, 20 Jun 2018 10:07:33 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <20180619112105.14457-1-lorenzo.pieralisi@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-06-19 13:21, 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 > --- > 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. > Acked-by: Jan Kiszka -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux