All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Bastian Blank <waldi@debian.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 3/3] xen: Don't register GSI in pre-setup
Date: Wed, 24 Mar 2010 10:54:27 -0700	[thread overview]
Message-ID: <4BAA51D3.2010906@goop.org> (raw)
In-Reply-To: <20100324115412.GA10968@wavehammer.waldi.eu.org>

On 03/24/2010 04:54 AM, Bastian Blank wrote:
> Xen behaves the same way that native Linux, it only allows any IO-APIC
> pin to be setup once.  Therefor we must not set it up in the initial run
> over all legacy interrupts.
>    

Do you need both this patch and the Xen one to solve your problem, or is 
one or the other sufficient?

Is there any dependency between the Linux and Xen patches?  (Doesn't 
look like it to me, but I just want to be sure.)

Thanks,
     J

> Signed-off-by: Bastian Blank<waldi@debian.org>
> ---
>   arch/x86/include/asm/xen/pci.h |    1 +
>   arch/x86/xen/pci.c             |   31 ++++++++++++++++++++++---------
>   2 files changed, 23 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/include/asm/xen/pci.h b/arch/x86/include/asm/xen/pci.h
> index d68637f..6286bbb 100644
> --- a/arch/x86/include/asm/xen/pci.h
> +++ b/arch/x86/include/asm/xen/pci.h
> @@ -64,6 +64,7 @@ static inline int xen_pci_setup_msi_irqs(struct pci_dev *dev, int nvec, int type
>   #endif /* CONFIG_PCI_MSI */
>
>   #ifdef CONFIG_XEN_DOM0_PCI
> +int xen_register_pirq(u32 gsi, int triggering);
>   int xen_register_gsi(u32 gsi, int triggering, int polarity);
>   int xen_find_device_domain_owner(struct pci_dev *dev);
>   int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain);
> diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c
> index eabb512..3e95f76 100644
> --- a/arch/x86/xen/pci.c
> +++ b/arch/x86/xen/pci.c
> @@ -16,10 +16,9 @@
>
>   #include "xen-ops.h"
>
> -int xen_register_gsi(u32 gsi, int triggering, int polarity)
> +int xen_register_pirq(u32 gsi, int triggering)
>   {
>   	int rc, irq;
> -	struct physdev_setup_gsi setup_gsi;
>   	struct physdev_map_pirq map_irq;
>   	int shareable = 0;
>   	char *name;
> @@ -27,9 +26,6 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)
>   	if (!xen_domain())
>   		return -1;
>
> -	printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n",
> -			gsi, triggering, polarity);
> -
>   	if (triggering == ACPI_EDGE_SENSITIVE) {
>   		shareable = 0;
>   		name = "ioapic-edge";
> @@ -56,6 +52,25 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)
>   		return -1;
>   	}
>
> +	return irq;
> +}
> +
> +int xen_register_gsi(u32 gsi, int triggering, int polarity)
> +{
> +	int rc, irq;
> +	struct physdev_setup_gsi setup_gsi;
> +	struct physdev_map_pirq map_irq;
> +	int shareable = 0;
> +	char *name;
> +
> +	if (!xen_domain())
> +		return -1;
> +
> +	printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n",
> +			gsi, triggering, polarity);
> +
> +	irq = xen_register_pirq(gsi, triggering);
> +
>   	setup_gsi.gsi = gsi;
>   	setup_gsi.triggering = (triggering == ACPI_EDGE_SENSITIVE ?
>   			0 : 1);
> @@ -67,7 +82,6 @@ int xen_register_gsi(u32 gsi, int triggering, int polarity)
>   	else if (rc) {
>   		printk(KERN_ERR "Failed to setup GSI :%d, err_code:%d\n",
>   				gsi, rc);
> -		BUG();
>   	}
>
>   	return irq;
> @@ -181,9 +195,8 @@ void __init xen_setup_pirqs(void)
>   		if (acpi_get_override_irq(irq,&trigger,&polarity) == -1)
>   			continue;
>
> -		xen_register_gsi(irq,
> -			trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE,
> -			polarity ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH);
> +		xen_register_pirq(irq,
> +			trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE);
>   	}
>
>   	xen_setup_acpi_sci();
>    

  reply	other threads:[~2010-03-24 17:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 11:54 [PATCH 3/3] xen: Don't register GSI in pre-setup Bastian Blank
2010-03-24 17:54 ` Jeremy Fitzhardinge [this message]
2010-03-24 22:54   ` Bastian Blank

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=4BAA51D3.2010906@goop.org \
    --to=jeremy@goop.org \
    --cc=waldi@debian.org \
    --cc=xen-devel@lists.xensource.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.