All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hanjun Guo <hanjun.guo@linaro.org>
To: Tomasz Nowicki <tomasz.nowicki@linaro.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Tomasz Nowicki <tn@semihalf.com>,
	bhelgaas@google.com, arnd@arndb.de, will.deacon@arm.com,
	catalin.marinas@arm.com, rjw@rjwysocki.net,
	Lorenzo.Pieralisi@arm.com, linux-kernel@vger.kernel.org,
	linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Liviu.Dudau@arm.com, ddaney@caviumnetworks.com,
	Narinder.Dhillon@caviumnetworks.com, linux-acpi@vger.kernel.org,
	robert.richter@caviumnetworks.com, wangyijing@huawei.com,
	tglx@linutronix.de, jiang.liu@linux.intel.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [Linaro-acpi] [PATCH V1 07/11] XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y
Date: Wed, 28 Oct 2015 21:45:29 +0800	[thread overview]
Message-ID: <5630D179.9050403@linaro.org> (raw)
In-Reply-To: <5630A9D3.1030607@linaro.org>

On 10/28/2015 06:56 PM, Tomasz Nowicki wrote:
> On 28.10.2015 11:49, Stefano Stabellini wrote:
>> On Tue, 27 Oct 2015, Boris Ostrovsky wrote:
>>> On 10/27/2015 12:47 PM, Tomasz Nowicki wrote:
>>>> + Stefano
>>>>
>>>> On 27.10.2015 17:38, Tomasz Nowicki wrote:
>>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>>>>
>>>>> In drivers/xen/pci.c, there are arch x86 dependent codes when
>>>>> CONFIG_PCI_MMCONFIG is enabled, since CONFIG_PCI_MMCONFIG
>>>>> depends on ACPI, so this will prevent XEN PCI running on other
>>>>> architectures using ACPI with PCI_MMCONFIG enabled (such as ARM64).
>>>>>
>>>>> Fortunatly, it can be sloved in a simple way. In drivers/xen/pci.c,
>>>>> the only x86 dependent code is if ((pci_probe & PCI_PROBE_MMCONF)
>>>>> == 0),
>>>>> and it's defined in asm/pci_x86.h, the code means that
>>>>> if the PCI resource is not probed in PCI_PROBE_MMCONF way, just
>>>>> ingnore the xen mcfg init. Actually this is duplicate, because
>>>>> if PCI resource is not probed in PCI_PROBE_MMCONF way, the
>>>>> pci_mmconfig_list will be empty, and the if (list_empty())
>>>>> after it will do the same job.
>>>>>
>>>>> So just remove the arch related code and the head file, this
>>>>> will be no functional change for x86, and also makes xen/pci.c
>>>>> usable for other architectures.
>>>>>
>>>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>>>>> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>>>>> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>>>> ---
>>>>>    drivers/xen/pci.c | 6 ------
>>>>>    1 file changed, 6 deletions(-)
>>>>>
>>>>> diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
>>>>> index 6785ebb..9a8dbe3 100644
>>>>> --- a/drivers/xen/pci.c
>>>>> +++ b/drivers/xen/pci.c
>>>>> @@ -28,9 +28,6 @@
>>>>>    #include <asm/xen/hypervisor.h>
>>>>>    #include <asm/xen/hypercall.h>
>>>>>    #include "../pci/pci.h"
>>>>> -#ifdef CONFIG_PCI_MMCONFIG
>>>>> -#include <asm/pci_x86.h>
>>>>> -#endif
>>>
>>> Assuming this still compiles on x86 now that this include file is
>>> removed
>>>
>>> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>
>> I think it does not:
>>
>> drivers/xen/pci.c: In function ‘xen_mcfg_late’:
>> drivers/xen/pci.c:221:18: error: ‘pci_mmcfg_list’ undeclared (first
>> use in this function)
>> drivers/xen/pci.c:221:18: note: each undeclared identifier is reported
>> only once for each f
>
> Right, we need:
> +#include <linux/ecam.h>
>
> Will fix this in next version, thanks!

Hmm, I think we just missed the head file, but the logic
of this patch is still right.

Thanks
Hanjun

WARNING: multiple messages have this Message-ID (diff)
From: hanjun.guo@linaro.org (Hanjun Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [Linaro-acpi] [PATCH V1 07/11] XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y
Date: Wed, 28 Oct 2015 21:45:29 +0800	[thread overview]
Message-ID: <5630D179.9050403@linaro.org> (raw)
In-Reply-To: <5630A9D3.1030607@linaro.org>

On 10/28/2015 06:56 PM, Tomasz Nowicki wrote:
> On 28.10.2015 11:49, Stefano Stabellini wrote:
>> On Tue, 27 Oct 2015, Boris Ostrovsky wrote:
>>> On 10/27/2015 12:47 PM, Tomasz Nowicki wrote:
>>>> + Stefano
>>>>
>>>> On 27.10.2015 17:38, Tomasz Nowicki wrote:
>>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>>>>
>>>>> In drivers/xen/pci.c, there are arch x86 dependent codes when
>>>>> CONFIG_PCI_MMCONFIG is enabled, since CONFIG_PCI_MMCONFIG
>>>>> depends on ACPI, so this will prevent XEN PCI running on other
>>>>> architectures using ACPI with PCI_MMCONFIG enabled (such as ARM64).
>>>>>
>>>>> Fortunatly, it can be sloved in a simple way. In drivers/xen/pci.c,
>>>>> the only x86 dependent code is if ((pci_probe & PCI_PROBE_MMCONF)
>>>>> == 0),
>>>>> and it's defined in asm/pci_x86.h, the code means that
>>>>> if the PCI resource is not probed in PCI_PROBE_MMCONF way, just
>>>>> ingnore the xen mcfg init. Actually this is duplicate, because
>>>>> if PCI resource is not probed in PCI_PROBE_MMCONF way, the
>>>>> pci_mmconfig_list will be empty, and the if (list_empty())
>>>>> after it will do the same job.
>>>>>
>>>>> So just remove the arch related code and the head file, this
>>>>> will be no functional change for x86, and also makes xen/pci.c
>>>>> usable for other architectures.
>>>>>
>>>>> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
>>>>> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>>>>> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>>>> ---
>>>>>    drivers/xen/pci.c | 6 ------
>>>>>    1 file changed, 6 deletions(-)
>>>>>
>>>>> diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
>>>>> index 6785ebb..9a8dbe3 100644
>>>>> --- a/drivers/xen/pci.c
>>>>> +++ b/drivers/xen/pci.c
>>>>> @@ -28,9 +28,6 @@
>>>>>    #include <asm/xen/hypervisor.h>
>>>>>    #include <asm/xen/hypercall.h>
>>>>>    #include "../pci/pci.h"
>>>>> -#ifdef CONFIG_PCI_MMCONFIG
>>>>> -#include <asm/pci_x86.h>
>>>>> -#endif
>>>
>>> Assuming this still compiles on x86 now that this include file is
>>> removed
>>>
>>> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>
>> I think it does not:
>>
>> drivers/xen/pci.c: In function ?xen_mcfg_late?:
>> drivers/xen/pci.c:221:18: error: ?pci_mmcfg_list? undeclared (first
>> use in this function)
>> drivers/xen/pci.c:221:18: note: each undeclared identifier is reported
>> only once for each f
>
> Right, we need:
> +#include <linux/ecam.h>
>
> Will fix this in next version, thanks!

Hmm, I think we just missed the head file, but the logic
of this patch is still right.

Thanks
Hanjun

  reply	other threads:[~2015-10-28 13:45 UTC|newest]

Thread overview: 131+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 16:38 [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI Tomasz Nowicki
2015-10-27 16:38 ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 01/11] x86, pci: Reorder logic of pci_mmconfig_insert() function Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 02/11] x86, pci, acpi: Move arch-agnostic MMCONFIG (aka ECAM) and ACPI code out of arch/x86/ directory Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 03/11] pci, acpi, mcfg: Provide generic implementation of MCFG code initialization Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 04/11] x86, pci: mmconfig_{32,64}.c code refactoring - remove code duplication Tomasz Nowicki
2015-10-27 16:38   ` [PATCH V1 04/11] x86, pci: mmconfig_{32, 64}.c " Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 05/11] x86, pci, ecam: mmconfig_64.c becomes default implementation for ECAM driver Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 06/11] pci, acpi, mcfg: Provide default RAW ACPI PCI config space accessors Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 07/11] XEN / PCI: Remove the dependence on arch x86 when PCI_MMCONFIG=y Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:47   ` [Linaro-acpi] " Tomasz Nowicki
2015-10-27 16:47     ` Tomasz Nowicki
2015-10-27 17:25     ` Boris Ostrovsky
2015-10-27 17:25       ` Boris Ostrovsky
2015-10-28 10:49       ` Stefano Stabellini
2015-10-28 10:49         ` Stefano Stabellini
2015-10-28 10:49         ` Stefano Stabellini
2015-10-28 10:56         ` Tomasz Nowicki
2015-10-28 10:56           ` Tomasz Nowicki
2015-10-28 13:45           ` Hanjun Guo [this message]
2015-10-28 13:45             ` Hanjun Guo
2015-10-28 14:07             ` Boris Ostrovsky
2015-10-28 14:07               ` Boris Ostrovsky
2015-10-27 16:38 ` [PATCH V1 08/11] pci, acpi, ecam: Add flag to indicate whether ECAM region was hot added or not Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 09/11] x86, pci: Use previously added ECAM hot_added flag to remove ECAM regions Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 10/11] pci, acpi: Provide generic way to assign bus domain number Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-28 11:38   ` Liviu.Dudau
2015-10-28 11:38     ` Liviu.Dudau at arm.com
2015-10-28 12:47     ` [Linaro-acpi] " Tomasz Nowicki
2015-10-28 12:47       ` Tomasz Nowicki
2015-11-03 16:10   ` Lorenzo Pieralisi
2015-11-03 16:10     ` Lorenzo Pieralisi
2015-11-04 10:04     ` [Linaro-acpi] " Tomasz Nowicki
2015-11-04 10:04       ` Tomasz Nowicki
2015-10-27 16:38 ` [PATCH V1 11/11] arm64, pci, acpi: Support for ACPI based PCI hostbridge init Tomasz Nowicki
2015-10-27 16:38   ` Tomasz Nowicki
2015-10-28 11:49   ` Liviu.Dudau
2015-10-28 11:49     ` Liviu.Dudau at arm.com
2015-10-28 11:49     ` Liviu.Dudau
2015-10-28 13:42     ` Tomasz Nowicki
2015-10-28 13:42       ` Tomasz Nowicki
2015-10-28 13:51       ` Liviu.Dudau
2015-10-28 13:51         ` Liviu.Dudau at arm.com
2015-11-03 14:32     ` Lorenzo Pieralisi
2015-11-03 14:32       ` Lorenzo Pieralisi
2015-11-03 16:28       ` Liviu.Dudau
2015-11-03 16:28         ` Liviu.Dudau at arm.com
2015-10-28 18:46   ` Sinan Kaya
2015-10-28 18:46     ` Sinan Kaya
2015-10-28 20:36     ` Sinan Kaya
2015-10-28 20:36       ` Sinan Kaya
2015-10-29 11:38       ` Tomasz Nowicki
2015-10-29 11:38         ` Tomasz Nowicki
2015-10-29 15:01         ` Sinan Kaya
2015-10-29 15:01           ` Sinan Kaya
2015-10-29 15:53           ` Tomasz Nowicki
2015-10-29 15:53             ` Tomasz Nowicki
2015-10-29 16:20             ` Sinan Kaya
2015-10-29 16:20               ` Sinan Kaya
2015-10-29 14:57       ` Sinan Kaya
2015-10-29 14:57         ` Sinan Kaya
2015-10-29 16:27         ` Tomasz Nowicki
2015-10-29 16:27           ` Tomasz Nowicki
2015-11-03 14:15     ` Lorenzo Pieralisi
2015-11-03 14:15       ` Lorenzo Pieralisi
2015-11-03 14:39       ` Tomasz Nowicki
2015-11-03 14:39         ` Tomasz Nowicki
2015-11-03 15:10         ` Sinan Kaya
2015-11-03 15:10           ` Sinan Kaya
2015-11-03 15:59           ` Arnd Bergmann
2015-11-03 15:59             ` Arnd Bergmann
2015-11-03 16:33             ` Sinan Kaya
2015-11-03 16:33               ` Sinan Kaya
2015-11-03 16:55               ` Arnd Bergmann
2015-11-03 16:55                 ` Arnd Bergmann
2015-11-03 17:43                 ` Sinan Kaya
2015-11-03 17:43                   ` Sinan Kaya
2015-11-05 14:48                   ` [Linaro-acpi] " Sinan Kaya
2015-11-05 14:48                     ` Sinan Kaya
2015-11-03 15:19       ` Hanjun Guo
2015-11-03 15:19         ` Hanjun Guo
2015-11-03 15:19         ` Hanjun Guo
2015-11-03 17:39         ` David Daney
2015-11-03 17:39           ` David Daney
2015-11-03 17:39           ` David Daney
2015-11-03 18:00           ` Gabriele Paoloni
2015-11-03 18:00             ` Gabriele Paoloni
2015-11-03 18:00             ` Gabriele Paoloni
2015-11-03 16:55   ` Lorenzo Pieralisi
2015-11-03 16:55     ` Lorenzo Pieralisi
2015-11-04  9:59     ` Tomasz Nowicki
2015-11-04  9:59       ` Tomasz Nowicki
2015-11-04 10:11     ` Tomasz Nowicki
2015-11-04 10:11       ` Tomasz Nowicki
2015-10-30  4:07 ` [PATCH V1 00/11] MMCONFIG refactoring and ARM64 PCI hostbridge init based on ACPI Jon Masters
2015-10-30  4:07   ` Jon Masters
2015-10-30  4:50   ` Hanjun Guo
2015-10-30  4:50     ` Hanjun Guo
2015-10-30  4:50     ` Hanjun Guo
2015-10-30  8:26   ` Tomasz Nowicki
2015-10-30  8:26     ` Tomasz Nowicki
2015-10-30 16:38 ` Suravee Suthikulpanit
2015-10-30 16:38   ` Suravee Suthikulpanit
2015-10-30 16:38   ` Suravee Suthikulpanit
2015-12-07 20:31 ` Bjorn Helgaas
2015-12-07 20:31   ` Bjorn Helgaas
2015-12-09 10:01   ` Jayachandran C.
2015-12-09 10:01     ` Jayachandran C.
2015-12-09 15:55     ` Lorenzo Pieralisi
2015-12-09 15:55       ` Lorenzo Pieralisi
2015-12-16 12:51       ` Jayachandran C.
2015-12-16 12:51         ` Jayachandran C.
2015-12-16 14:05         ` Lorenzo Pieralisi
2015-12-16 14:05           ` Lorenzo Pieralisi
2015-12-08 17:43 ` Jeremy Linton
2015-12-08 17:43   ` Jeremy Linton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5630D179.9050403@linaro.org \
    --to=hanjun.guo@linaro.org \
    --cc=Liviu.Dudau@arm.com \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=Narinder.Dhillon@caviumnetworks.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=catalin.marinas@arm.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=robert.richter@caviumnetworks.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tglx@linutronix.de \
    --cc=tn@semihalf.com \
    --cc=tomasz.nowicki@linaro.org \
    --cc=wangyijing@huawei.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.