Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4774561imm; Mon, 25 Jun 2018 23:49:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcNLT6kzg4UNaT4iua0797Ec4yC0r0r3MzfIQ/IgcjhI0o0zcXba3vlyBlrgs6KLpe4RcGP X-Received: by 2002:a62:5d83:: with SMTP id n3-v6mr317990pfj.68.1529995782015; Mon, 25 Jun 2018 23:49:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529995781; cv=none; d=google.com; s=arc-20160816; b=RKH6tfmPkhHzkw7m2PHX8SzFv31c0wARMUav8nqU3tdIGHQaAxNDu9w9A1yZfsLkP0 0lVBNiWpVAPc20s5+iXlk/rjJkz9f3wrrqjpOACjcA6JrWV4KGozFrlHSoOLkx4OG60z xOw+2I71AwsI3WqSNoXbecd6Cftu3Nm0Zksn3SOyOHgXN2KMReDq+/ZUNdkdl4RdjhON E3t78s/WI1dTMLH4Zkip6FnQ1OQEQiMAVWW2Pn4Cn7uAOmsGME19uelATZF7xUxOVKAT 2oAqJrJTBezldogB3Q4zhlBp71JBoV+Dr+LrpCIVdVoWbTuDtXnpwsjEPl15p1IdgdFn gKJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=7yDcpf7sJ9Xg7UzMQXgvfbM6UqPJYGTgeXcXzeLLbEI=; b=pO2uxKpYoF41BGw5kPCQ5b+ZxaFMBBVipE40Fut2kc4l6ue7E1CopqISnzUQwSD47j 1qwFOdlcMkRenIxuXeCnbV8Azb0L801Iu3YQZTy4D/qI9cDnxyj64LH7EpNfFNGduEXs Ep1O3lXNzEPq2TRPUphYplNCzp7DgmY0uKjsTGX6mA9QfWehpr9fjDCQWW24uF5PJl7s KtY9K1dB8j/frjRJ1ZnYnYp/ZG7LYF7YTQdayBpUQbW5sWyBGxWZ4xfwYrZDmD4vBq1F Bd/gubN70lcKel93crExGGPmXOT1mvfuFzxktti6LJBaA3P8X1uB1zkcWFBrKgCKL+iO y8Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=AhrwvuMi; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7-v6si959413pll.445.2018.06.25.23.49.27; Mon, 25 Jun 2018 23:49:41 -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=@broadcom.com header.s=google header.b=AhrwvuMi; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbeFZGsl (ORCPT + 99 others); Tue, 26 Jun 2018 02:48:41 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:43753 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942AbeFZGsk (ORCPT ); Tue, 26 Jun 2018 02:48:40 -0400 Received: by mail-qt0-f195.google.com with SMTP id y89-v6so14220885qtd.10 for ; Mon, 25 Jun 2018 23:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=7yDcpf7sJ9Xg7UzMQXgvfbM6UqPJYGTgeXcXzeLLbEI=; b=AhrwvuMiD34XcEdooq2zGa6ued7/lqvOEYGvES8S6TaTFilGKnNujlg71MpFEMAtmN W7TBRh1udzXxBifaFX0i24NS2eHpPdpLtXZ//5b1hHZB0Za9k0bKg8tTNuWjCPbHY/08 Wwm/spHFbO3zE23PnVGH7yaB35refyO458wkE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=7yDcpf7sJ9Xg7UzMQXgvfbM6UqPJYGTgeXcXzeLLbEI=; b=eptolaL+uOfDOMe3j6Oc9FPA+ghU1lm2MDcBDM8EhNs8cc4NEs2/Ya6icdalUgBkEC fqrP2X/+oUvDkEjunsZdEoSHBNqjRUoMcy42NnCf4f3O5lG6ujC6FJzvKq1oQSI3R3eP zOY9wvVbrDww1oVvE1pm9/wnRMUZC2zLRIuaBr+kSXOPUkMsLs+giwI0itj4JD57LLOy upoiB8+cdV6Wbe6DslwWApinVUuXxKB+f92huVfKVLJQpi/uNRieovbcKVXsPFvbllwv l0/ZHsFydbYC3wULOaavYB2WuoqiDmuWz196ACoU7IF+IYALEpLLVlURc0Zo+txSvgcf ewNA== X-Gm-Message-State: APt69E1wAPA5WoZhUJpl6DpwN4pDspQxz5Qc7tELTfbgunW4zU+o6gTD vScJX80v6iOq7fSOeHqEizYjQjif X-Received: by 2002:ac8:230a:: with SMTP id a10-v6mr214268qta.234.1529995719121; Mon, 25 Jun 2018 23:48:39 -0700 (PDT) Received: from [10.136.13.65] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id k30-v6sm776652qtc.31.2018.06.25.23.48.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 23:48:37 -0700 (PDT) Subject: Re: [PATCH v2] PCI: controller: Move PCI_DOMAINS selection to arch Kconfig To: Lorenzo Pieralisi , Ley Foon Tan Cc: Jan Kiszka , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Will Deacon , Bjorn Helgaas , Rob Herring , Russell King , Guenter Roeck References: <20180619112105.14457-1-lorenzo.pieralisi@arm.com> <30bb8a16-f829-a5a4-265f-2d1112d8d0bf@siemens.com> <20180621165400.GB14519@e107981-ln.cambridge.arm.com> <5e9b0aa4-ded1-725d-c401-49c13b7d5f9d@broadcom.com> <1529683148.2729.6.camel@intel.com> <20180625092758.GA6412@red-moon> From: Scott Branden Message-ID: <1cf91447-6e17-a7cb-c827-210835179db9@broadcom.com> Date: Mon, 25 Jun 2018 23:48:11 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180625092758.GA6412@red-moon> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lorenzo, On 18-06-25 02:27 AM, Lorenzo Pieralisi wrote: > On Fri, Jun 22, 2018 at 11:59:08PM +0800, Ley Foon Tan wrote: >> On Thu, 2018-06-21 at 22:08 -0700, Scott Branden wrote: >>> >>> On 18-06-21 09:54 AM, Lorenzo Pieralisi wrote: >>>> >>>> On Wed, Jun 20, 2018 at 10:07:33AM +0200, Jan Kiszka wrote: >>>>> >>>>> 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 >>>> Thanks a lot. Scott, Ley Foon, does it work for you ? I would like >>>> to ask Bjorn to send it asap since the build on sparc is still >>>> broken. >>> Change will have to be made for arm64 for ARCH_BCM_IPROC as well. >> Yes, need to add it to arm64 too. Others are okay. > On arm64 CONFIG_PCI_DOMAINS defaults to CONFIG_PCI so there is no need > to select it, if that's all you need changed there is nothing to > change and this patch is read to be merged. I see that now: arm64 is doing things properly.  The same should be done for arm: default to CONFIG_PCI so there is no need to select it. I didn't like the change to have select to begin with. > > Lorenzo