* [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64
@ 2015-09-28 13:30 Julien Grall
2015-09-28 13:48 ` Stefano Stabellini
2015-09-28 13:52 ` [Xen-devel] " David Vrabel
0 siblings, 2 replies; 8+ messages in thread
From: Julien Grall @ 2015-09-28 13:30 UTC (permalink / raw)
To: xen-devel
Cc: linux-arm-kernel, ian.campbell, stefano.stabellini, linux-kernel,
Julien Grall, Robert Richter, Konrad Rzeszutek Wilk,
Boris Ostrovsky, David Vrabel
The PCI support for Xen doesn't compile on ARM/ARM64 when
CONFIG_PCI_MMCONFIG=y:
drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or
directory
#include <asm/pci_x86.h>
Although, Xen is not currently involved in PCI management for ARM/ARM64.
There is plan to support it, but it would require some changes in Linux
side.
For now, introduce a new config options XEN_PCI which will be turned off
for ARM platform.
Reported-by: Robert Richter <robert.richter@caviumnetworks.com>
Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
---
drivers/xen/Kconfig | 6 +++++-
drivers/xen/Makefile | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 73708ac..6bcc8b0 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -168,7 +168,7 @@ config XEN_TMEM
config XEN_PCIDEV_BACKEND
tristate "Xen PCI-device backend driver"
- depends on PCI && X86 && XEN
+ depends on XEN_PCI
depends on XEN_BACKEND
default m
help
@@ -189,6 +189,10 @@ config XEN_PCIDEV_BACKEND
If in doubt, say m.
+config XEN_PCI
+ def_bool y
+ depends on PCI && !ARM && !ARM64
+
config XEN_SCSI_BACKEND
tristate "XEN SCSI backend driver"
depends on XEN && XEN_BACKEND && TARGET_CORE
diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
index e293bc5..c9f23b7 100644
--- a/drivers/xen/Makefile
+++ b/drivers/xen/Makefile
@@ -11,7 +11,7 @@ CFLAGS_features.o := $(nostackp)
CFLAGS_efi.o += -fshort-wchar
-dom0-$(CONFIG_PCI) += pci.o
+dom0-$(CONFIG_XEN_PCI) += pci.o
dom0-$(CONFIG_USB_SUPPORT) += dbgp.o
dom0-$(CONFIG_XEN_ACPI) += acpi.o $(xen-pad-y)
xen-pad-$(CONFIG_X86) += xen-acpi-pad.o
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64
2015-09-28 13:30 [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64 Julien Grall
@ 2015-09-28 13:48 ` Stefano Stabellini
2015-09-28 14:01 ` Julien Grall
2015-09-28 13:52 ` [Xen-devel] " David Vrabel
1 sibling, 1 reply; 8+ messages in thread
From: Stefano Stabellini @ 2015-09-28 13:48 UTC (permalink / raw)
To: Julien Grall
Cc: xen-devel, linux-arm-kernel, ian.campbell, stefano.stabellini,
linux-kernel, Robert Richter, Konrad Rzeszutek Wilk,
Boris Ostrovsky, David Vrabel
On Mon, 28 Sep 2015, Julien Grall wrote:
> The PCI support for Xen doesn't compile on ARM/ARM64 when
> CONFIG_PCI_MMCONFIG=y:
>
> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or
> directory
> #include <asm/pci_x86.h>
>
> Although, Xen is not currently involved in PCI management for ARM/ARM64.
> There is plan to support it, but it would require some changes in Linux
> side.
>
> For now, introduce a new config options XEN_PCI which will be turned off
> for ARM platform.
>
> Reported-by: Robert Richter <robert.richter@caviumnetworks.com>
> Signed-off-by: Julien Grall <julien.grall@citrix.com>
>
> ---
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: David Vrabel <david.vrabel@citrix.com>
> ---
> drivers/xen/Kconfig | 6 +++++-
> drivers/xen/Makefile | 2 +-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index 73708ac..6bcc8b0 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -168,7 +168,7 @@ config XEN_TMEM
>
> config XEN_PCIDEV_BACKEND
> tristate "Xen PCI-device backend driver"
> - depends on PCI && X86 && XEN
> + depends on XEN_PCI
> depends on XEN_BACKEND
> default m
> help
> @@ -189,6 +189,10 @@ config XEN_PCIDEV_BACKEND
>
> If in doubt, say m.
>
> +config XEN_PCI
> + def_bool y
> + depends on PCI && !ARM && !ARM64
This is confusing because x86 already has PCI_XEN, see arch/x86/Kconfig.
Just move PCI_XEN from arch/x86/Kconfig to here and disable it for ARM?
> config XEN_SCSI_BACKEND
> tristate "XEN SCSI backend driver"
> depends on XEN && XEN_BACKEND && TARGET_CORE
> diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
> index e293bc5..c9f23b7 100644
> --- a/drivers/xen/Makefile
> +++ b/drivers/xen/Makefile
> @@ -11,7 +11,7 @@ CFLAGS_features.o := $(nostackp)
>
> CFLAGS_efi.o += -fshort-wchar
>
> -dom0-$(CONFIG_PCI) += pci.o
> +dom0-$(CONFIG_XEN_PCI) += pci.o
> dom0-$(CONFIG_USB_SUPPORT) += dbgp.o
> dom0-$(CONFIG_XEN_ACPI) += acpi.o $(xen-pad-y)
> xen-pad-$(CONFIG_X86) += xen-acpi-pad.o
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-devel] [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64
2015-09-28 13:30 [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64 Julien Grall
2015-09-28 13:48 ` Stefano Stabellini
@ 2015-09-28 13:52 ` David Vrabel
2015-09-28 13:59 ` Julien Grall
1 sibling, 1 reply; 8+ messages in thread
From: David Vrabel @ 2015-09-28 13:52 UTC (permalink / raw)
To: Julien Grall, xen-devel
Cc: ian.campbell, stefano.stabellini, linux-kernel, Robert Richter,
David Vrabel, Boris Ostrovsky, linux-arm-kernel
On 28/09/15 14:30, Julien Grall wrote:
> The PCI support for Xen doesn't compile on ARM/ARM64 when
> CONFIG_PCI_MMCONFIG=y:
>
> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or
> directory
> #include <asm/pci_x86.h>
>
> Although, Xen is not currently involved in PCI management for ARM/ARM64.
> There is plan to support it, but it would require some changes in Linux
> side.
>
> For now, introduce a new config options XEN_PCI which will be turned off
> for ARM platform.
Since PCI_MMCONFIG isn't x86 specific and its use in drivers/xen/pci.c
is, can you fix this by changing to #ifdef CONFIG_X86?
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-devel] [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64
2015-09-28 13:52 ` [Xen-devel] " David Vrabel
@ 2015-09-28 13:59 ` Julien Grall
2015-09-28 14:02 ` Boris Ostrovsky
0 siblings, 1 reply; 8+ messages in thread
From: Julien Grall @ 2015-09-28 13:59 UTC (permalink / raw)
To: David Vrabel, xen-devel
Cc: ian.campbell, stefano.stabellini, linux-kernel, Robert Richter,
Boris Ostrovsky, linux-arm-kernel
Hi David,
On 28/09/15 14:52, David Vrabel wrote:
> On 28/09/15 14:30, Julien Grall wrote:
>> The PCI support for Xen doesn't compile on ARM/ARM64 when
>> CONFIG_PCI_MMCONFIG=y:
>>
>> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or
>> directory
>> #include <asm/pci_x86.h>
>>
>> Although, Xen is not currently involved in PCI management for ARM/ARM64.
>> There is plan to support it, but it would require some changes in Linux
>> side.
>>
>> For now, introduce a new config options XEN_PCI which will be turned off
>> for ARM platform.
>
> Since PCI_MMCONFIG isn't x86 specific and its use in drivers/xen/pci.c
> is, can you fix this by changing to #ifdef CONFIG_X86?
Well, it may be possible that we need this code for ARM/ARM64.
>From the origin thread [1], it wasn't clear what is the correct
solution. So I think that disabling the Xen PCI code for now is the
right solution.
Note, that it's still possible to use PCI in DOM0 on ARM64 platform
without this code.
Regards,
[1] https://lkml.org/lkml/2015/8/6/510
--
Julien Grall
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64
2015-09-28 13:48 ` Stefano Stabellini
@ 2015-09-28 14:01 ` Julien Grall
0 siblings, 0 replies; 8+ messages in thread
From: Julien Grall @ 2015-09-28 14:01 UTC (permalink / raw)
To: Stefano Stabellini
Cc: xen-devel, linux-arm-kernel, ian.campbell, linux-kernel,
Robert Richter, Konrad Rzeszutek Wilk, Boris Ostrovsky,
David Vrabel
On 28/09/15 14:48, Stefano Stabellini wrote:
> On Mon, 28 Sep 2015, Julien Grall wrote:
>> The PCI support for Xen doesn't compile on ARM/ARM64 when
>> CONFIG_PCI_MMCONFIG=y:
>>
>> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or
>> directory
>> #include <asm/pci_x86.h>
>>
>> Although, Xen is not currently involved in PCI management for ARM/ARM64.
>> There is plan to support it, but it would require some changes in Linux
>> side.
>>
>> For now, introduce a new config options XEN_PCI which will be turned off
>> for ARM platform.
>>
>> Reported-by: Robert Richter <robert.richter@caviumnetworks.com>
>> Signed-off-by: Julien Grall <julien.grall@citrix.com>
>>
>> ---
>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Cc: David Vrabel <david.vrabel@citrix.com>
>> ---
>> drivers/xen/Kconfig | 6 +++++-
>> drivers/xen/Makefile | 2 +-
>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
>> index 73708ac..6bcc8b0 100644
>> --- a/drivers/xen/Kconfig
>> +++ b/drivers/xen/Kconfig
>> @@ -168,7 +168,7 @@ config XEN_TMEM
>>
>> config XEN_PCIDEV_BACKEND
>> tristate "Xen PCI-device backend driver"
>> - depends on PCI && X86 && XEN
>> + depends on XEN_PCI
>> depends on XEN_BACKEND
>> default m
>> help
>> @@ -189,6 +189,10 @@ config XEN_PCIDEV_BACKEND
>>
>> If in doubt, say m.
>>
>> +config XEN_PCI
>> + def_bool y
>> + depends on PCI && !ARM && !ARM64
>
> This is confusing because x86 already has PCI_XEN, see arch/x86/Kconfig.
> Just move PCI_XEN from arch/x86/Kconfig to here and disable it for ARM?
PCI_XEN enables SWIOTLB. Do we really want the same dependencies for any
architecture?
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-devel] [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64
2015-09-28 13:59 ` Julien Grall
@ 2015-09-28 14:02 ` Boris Ostrovsky
2015-09-28 14:22 ` David Vrabel
2015-09-28 14:23 ` Julien Grall
0 siblings, 2 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2015-09-28 14:02 UTC (permalink / raw)
To: Julien Grall, David Vrabel, xen-devel
Cc: ian.campbell, stefano.stabellini, linux-kernel, Robert Richter,
linux-arm-kernel
On 09/28/2015 09:59 AM, Julien Grall wrote:
> Hi David,
>
> On 28/09/15 14:52, David Vrabel wrote:
>> On 28/09/15 14:30, Julien Grall wrote:
>>> The PCI support for Xen doesn't compile on ARM/ARM64 when
>>> CONFIG_PCI_MMCONFIG=y:
>>>
>>> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or
>>> directory
>>> #include <asm/pci_x86.h>
>>>
>>> Although, Xen is not currently involved in PCI management for ARM/ARM64.
>>> There is plan to support it, but it would require some changes in Linux
>>> side.
>>>
>>> For now, introduce a new config options XEN_PCI which will be turned off
>>> for ARM platform.
>> Since PCI_MMCONFIG isn't x86 specific and its use in drivers/xen/pci.c
>> is, can you fix this by changing to #ifdef CONFIG_X86?
> Well, it may be possible that we need this code for ARM/ARM64.
>
> From the origin thread [1], it wasn't clear what is the correct
> solution. So I think that disabling the Xen PCI code for now is the
> right solution.
>
> Note, that it's still possible to use PCI in DOM0 on ARM64 platform
> without this code.
>
> Regards,
>
> [1] https://lkml.org/lkml/2015/8/6/510
>
Can we then implement Robert's proposals from that thread and have an
arch function for pci_probe? It will be a nop on ARM. (I think that was
the only problem here).
-boris
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-devel] [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64
2015-09-28 14:02 ` Boris Ostrovsky
@ 2015-09-28 14:22 ` David Vrabel
2015-09-28 14:23 ` Julien Grall
1 sibling, 0 replies; 8+ messages in thread
From: David Vrabel @ 2015-09-28 14:22 UTC (permalink / raw)
To: Boris Ostrovsky, Julien Grall, xen-devel
Cc: ian.campbell, stefano.stabellini, linux-kernel, Robert Richter,
linux-arm-kernel
On 28/09/15 15:02, Boris Ostrovsky wrote:
> On 09/28/2015 09:59 AM, Julien Grall wrote:
>> Hi David,
>>
>> On 28/09/15 14:52, David Vrabel wrote:
>>> On 28/09/15 14:30, Julien Grall wrote:
>>>> The PCI support for Xen doesn't compile on ARM/ARM64 when
>>>> CONFIG_PCI_MMCONFIG=y:
>>>>
>>>> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or
>>>> directory
>>>> #include <asm/pci_x86.h>
>>>>
>>>> Although, Xen is not currently involved in PCI management for
>>>> ARM/ARM64.
>>>> There is plan to support it, but it would require some changes in Linux
>>>> side.
>>>>
>>>> For now, introduce a new config options XEN_PCI which will be turned
>>>> off
>>>> for ARM platform.
>>> Since PCI_MMCONFIG isn't x86 specific and its use in drivers/xen/pci.c
>>> is, can you fix this by changing to #ifdef CONFIG_X86?
This.
>> Well, it may be possible that we need this code for ARM/ARM64.
>>
>> From the origin thread [1], it wasn't clear what is the correct
>> solution. So I think that disabling the Xen PCI code for now is the
>> right solution.
>>
>> Note, that it's still possible to use PCI in DOM0 on ARM64 platform
>> without this code.
>>
>> Regards,
>>
>> [1] https://lkml.org/lkml/2015/8/6/510
>>
>
> Can we then implement Robert's proposals from that thread and have an
> arch function for pci_probe? It will be a nop on ARM. (I think that was
> the only problem here).
Or preferably this.
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Xen-devel] [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64
2015-09-28 14:02 ` Boris Ostrovsky
2015-09-28 14:22 ` David Vrabel
@ 2015-09-28 14:23 ` Julien Grall
1 sibling, 0 replies; 8+ messages in thread
From: Julien Grall @ 2015-09-28 14:23 UTC (permalink / raw)
To: Boris Ostrovsky, David Vrabel, xen-devel
Cc: ian.campbell, stefano.stabellini, linux-kernel, Robert Richter,
linux-arm-kernel
On 28/09/15 15:02, Boris Ostrovsky wrote:
> On 09/28/2015 09:59 AM, Julien Grall wrote:
>> Hi David,
>>
>> On 28/09/15 14:52, David Vrabel wrote:
>>> On 28/09/15 14:30, Julien Grall wrote:
>>>> The PCI support for Xen doesn't compile on ARM/ARM64 when
>>>> CONFIG_PCI_MMCONFIG=y:
>>>>
>>>> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or
>>>> directory
>>>> #include <asm/pci_x86.h>
>>>>
>>>> Although, Xen is not currently involved in PCI management for
>>>> ARM/ARM64.
>>>> There is plan to support it, but it would require some changes in Linux
>>>> side.
>>>>
>>>> For now, introduce a new config options XEN_PCI which will be turned
>>>> off
>>>> for ARM platform.
>>> Since PCI_MMCONFIG isn't x86 specific and its use in drivers/xen/pci.c
>>> is, can you fix this by changing to #ifdef CONFIG_X86?
>> Well, it may be possible that we need this code for ARM/ARM64.
>>
>> From the origin thread [1], it wasn't clear what is the correct
>> solution. So I think that disabling the Xen PCI code for now is the
>> right solution.
>>
>> Note, that it's still possible to use PCI in DOM0 on ARM64 platform
>> without this code.
>>
>> Regards,
>>
>> [1] https://lkml.org/lkml/2015/8/6/510
>>
>
> Can we then implement Robert's proposals from that thread and have an
> arch function for pci_probe? It will be a nop on ARM. (I think that was
> the only problem here).
Hmmmm. It looks like that the mmconfig is not yet supported upstream for
ARM64. So even with arch function for pci_probe so it won't work.
I hit the compilation issue on a 4.2 with patched applied for some
hardware enablement. Some of them if for mmconfig.
I should have check it before sending it. Sorry for the noise.
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-28 14:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-28 13:30 [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64 Julien Grall
2015-09-28 13:48 ` Stefano Stabellini
2015-09-28 14:01 ` Julien Grall
2015-09-28 13:52 ` [Xen-devel] " David Vrabel
2015-09-28 13:59 ` Julien Grall
2015-09-28 14:02 ` Boris Ostrovsky
2015-09-28 14:22 ` David Vrabel
2015-09-28 14:23 ` Julien Grall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).