From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934446AbdCVMY6 (ORCPT ); Wed, 22 Mar 2017 08:24:58 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4360 "EHLO dggrg02-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S934240AbdCVMYu (ORCPT ); Wed, 22 Mar 2017 08:24:50 -0400 Subject: Re: [PATCH] pci: dwc: hisi needs PCI_HOST_COMMON To: Arnd Bergmann References: <20170321143229.3372903-1-arnd@arndb.de> <001801d2a25a$9c742760$d55c7620$@gmail.com> <58D1EF1B.1080509@hisilicon.com> CC: linux-pci , Kishon , Jingoo Han , Gabriele Paoloni , "Bjorn Helgaas" , Linux Kernel Mailing List , Joao Pinto From: Zhou Wang Message-ID: <58D26D01.9050401@hisilicon.com> Date: Wed, 22 Mar 2017 20:24:33 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.63.139.185] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.58D26D0B.008B,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 649fa37dc62ec0efa61c3247203bf42b Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/3/22 16:00, Arnd Bergmann wrote: > On Mar 22, 2017 04:27, "Zhou Wang" > wrote: > > On 2017/3/21 23:48, Jingoo Han wrote: > > (+cc: Joao Pinto, Zhou Wang, Gabriele Paoloni) > > > > On Tuesday, March 21, 2017 10:32 AM, Arnd Bergmann wrote: > >> > >> Without PCI_HOST_COMMON support enabled, we get a link error: > >> > >> drivers/pci/dwc/built-in.o: In function `hisi_pcie_map_bus': > >> pcie-hisi.c:(.text+0x8860): undefined reference to `pci_ecam_map_bus' > >> drivers/pci/dwc/built-in.o: In function `hisi_pcie_almost_ecam_probe': > >> pcie-hisi.c:(.text+0x88b4): undefined reference to `pci_host_common_probe' > >> > >> This adds an explicit 'select', as the other users have. > > Hi Arnd, > > I wonder if we should select PCI_HOST_GENERIC here, like: > > diff --git a/drivers/pci/dwc/Kconfig b/drivers/pci/dwc/Kconfig > index dfb8a69..b25dce4 100644 > --- a/drivers/pci/dwc/Kconfig > +++ b/drivers/pci/dwc/Kconfig > @@ -89,6 +89,7 @@ config PCI_HISI > depends on PCI_MSI_IRQ_DOMAIN > select PCIEPORTBUS > select PCIE_DW_HOST > + select PCI_HOST_GENERIC > help > Say Y here if you want PCIe controller support on HiSilicon > Hip05 and Hip06 SoCs > > > I don't know how that would be better. PCI_HOST_GENERIC is > a standalone driver for machines that don't need any special > handling (e.g. SBSA or KVM), while PCI_HOST_COMMON is > the infrastructure used by both PCI_HISI and PCI_HOST_GENERIC. > > Selecting PCI_HOST_GENERIC would also work as we implicitly > get PCI_HOST_COMMON, but it would not be clear from reading > the Kconfig file what the purpose of doing that is. Yes, you are right. I just disabled PCI_HOST_GENERIC and enabled PCI_HOST_COMMON to test PCI hosts of HiSilicon and Thunder, a build error happened. We can fix this by your PCI: generic: stop hiding pci_host_common_probe declaration. And select PCI_HOST_COMMON here. Thanks for pointing this! Zhou. > > Arnd