All of lore.kernel.org
 help / color / mirror / Atom feed
From: boris.ostrovsky@oracle.com (Boris Ostrovsky)
To: linux-arm-kernel@lists.infradead.org
Subject: Fw: drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or directory
Date: Thu, 06 Aug 2015 13:34:52 -0400	[thread overview]
Message-ID: <55C39ABC.5020101@oracle.com> (raw)
In-Reply-To: <20150806170426.GM1820@rric.localhost>

On 08/06/2015 01:04 PM, Robert Richter wrote:
> Boris,
>
> we are working on acpi pci support for arm64. For this we are enabling
> PCI_MMCONFIG on arm64 which breaks compiling drivers/xen/pci.c.
>
> Looking into it there is x86 code in generic driver code introduced
> with:
>
>   8deb3eb1461e xen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved for MCFG areas.
>
> This implements:
>
> diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
> index 18fff88254eb..d15f6e80479f 100644
> --- a/drivers/xen/pci.c
> +++ b/drivers/xen/pci.c
> @@ -26,6 +26,7 @@
>   #include <asm/xen/hypervisor.h>
>   #include <asm/xen/hypercall.h>
>   #include "../pci/pci.h"
> +#include <asm/pci_x86.h>
>   
>   static bool __read_mostly pci_seg_supported = true;
>   
> @@ -192,3 +193,49 @@ static int __init register_xen_pci_notifier(void)
>   }
>   
>   arch_initcall(register_xen_pci_notifier);
> +
> +#ifdef CONFIG_PCI_MMCONFIG
> +static int __init xen_mcfg_late(void)
> +{
> +       struct pci_mmcfg_region *cfg;
> +       int rc;
> +
> +       if (!xen_initial_domain())
> +               return 0;
> +
> +       if ((pci_probe & PCI_PROBE_MMCONF) == 0)
> +               return 0;
> [...]
>
> There are no defines for pci_probe and PCI_PROBE_MMCONF other than for
> the x86 architecture.
>
> I see several ways to fix that:
>
>   * moving code to arch/x86/pci/xen.c,

If this routine is not going to be used by ARM I think this would be the 
way to go. Stefano --- will this be needed by ARM?

>
>   * make code dependent on arch X86,
>
>   * make 'if (pci_probe & PCI_PROBE_MMCONF) ...' an arch function to be
>     implemented by archs,

Otherwise I'd go with this.

-boris

>
>   * reworking the code by removing the check (not sure if that could be
>     done).
>
> I don't think PCI_XEN is enabled yet for arm64, so we just disalbe it
> for !X86 or move it to arch/x86. I suggest the latter. Is there any
> preference you have?

WARNING: multiple messages have this Message-ID (diff)
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Robert Richter <robert.richter@caviumnetworks.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Tomasz Nowicki <tn@semihalf.com>,
	Will Deacon <will.deacon@arm.com>,
	xen-devel@lists.xenproject.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: Fw: drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or directory
Date: Thu, 06 Aug 2015 13:34:52 -0400	[thread overview]
Message-ID: <55C39ABC.5020101@oracle.com> (raw)
In-Reply-To: <20150806170426.GM1820@rric.localhost>

On 08/06/2015 01:04 PM, Robert Richter wrote:
> Boris,
>
> we are working on acpi pci support for arm64. For this we are enabling
> PCI_MMCONFIG on arm64 which breaks compiling drivers/xen/pci.c.
>
> Looking into it there is x86 code in generic driver code introduced
> with:
>
>   8deb3eb1461e xen/mcfg: Call PHYSDEVOP_pci_mmcfg_reserved for MCFG areas.
>
> This implements:
>
> diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c
> index 18fff88254eb..d15f6e80479f 100644
> --- a/drivers/xen/pci.c
> +++ b/drivers/xen/pci.c
> @@ -26,6 +26,7 @@
>   #include <asm/xen/hypervisor.h>
>   #include <asm/xen/hypercall.h>
>   #include "../pci/pci.h"
> +#include <asm/pci_x86.h>
>   
>   static bool __read_mostly pci_seg_supported = true;
>   
> @@ -192,3 +193,49 @@ static int __init register_xen_pci_notifier(void)
>   }
>   
>   arch_initcall(register_xen_pci_notifier);
> +
> +#ifdef CONFIG_PCI_MMCONFIG
> +static int __init xen_mcfg_late(void)
> +{
> +       struct pci_mmcfg_region *cfg;
> +       int rc;
> +
> +       if (!xen_initial_domain())
> +               return 0;
> +
> +       if ((pci_probe & PCI_PROBE_MMCONF) == 0)
> +               return 0;
> [...]
>
> There are no defines for pci_probe and PCI_PROBE_MMCONF other than for
> the x86 architecture.
>
> I see several ways to fix that:
>
>   * moving code to arch/x86/pci/xen.c,

If this routine is not going to be used by ARM I think this would be the 
way to go. Stefano --- will this be needed by ARM?

>
>   * make code dependent on arch X86,
>
>   * make 'if (pci_probe & PCI_PROBE_MMCONF) ...' an arch function to be
>     implemented by archs,

Otherwise I'd go with this.

-boris

>
>   * reworking the code by removing the check (not sure if that could be
>     done).
>
> I don't think PCI_XEN is enabled yet for arm64, so we just disalbe it
> for !X86 or move it to arch/x86. I suggest the latter. Is there any
> preference you have?

  parent reply	other threads:[~2015-08-06 17:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06 17:04 Fw: drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or directory Robert Richter
2015-08-06 17:04 ` Robert Richter
2015-08-06 17:34 ` Boris Ostrovsky
2015-08-06 17:34 ` Boris Ostrovsky [this message]
2015-08-06 17:34   ` Boris Ostrovsky
2015-08-07  9:41   ` Stefano Stabellini
2015-08-07  9:41     ` Stefano Stabellini
2015-08-07  9:41   ` Stefano Stabellini

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=55C39ABC.5020101@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.