WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [Xen-ia64-devel[PATCH] request_irq is needed by VTD

To: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [Xen-ia64-devel[PATCH] request_irq is needed by VTD
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Wed, 24 Sep 2008 19:15:53 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 24 Sep 2008 03:18:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <F7C8A4D3A9905B45A80E4C194793FA6501ABA7CE8A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <F7C8A4D3A9905B45A80E4C194793FA6501ABA7CE8A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Wed, Sep 24, 2008 at 03:51:55PM +0800, Xu, Anthony wrote:
> request_irq is needed by VTD
> 
> Signed-off-by; Anthony Xu < anthony.xu@xxxxxxxxx >
> 
> 
> diff -r 64d6ad484229 xen/arch/ia64/linux-xen/irq_ia64.c
> --- a/xen/arch/ia64/linux-xen/irq_ia64.c      Wed Sep 24 14:58:31 2008 +0800
> +++ b/xen/arch/ia64/linux-xen/irq_ia64.c      Wed Sep 24 15:20:48 2008 +0800
> @@ -266,6 +266,42 @@
>               }
>  }
>  
> +int request_irq(unsigned int irq,
> +             void (*handler)(int, void *, struct cpu_user_regs *),
> +             unsigned long irqflags, const char * devname, void *dev_id)
> +{
> +     struct irqaction * action;
> +     int retval=0;
> +
> +     /*
> +      * Sanity-check: shared interrupts must pass in a real dev-ID,
> +      * otherwise we'll have trouble later trying to figure out
> +      * which interrupt is which (messes up the interrupt freeing logic etc).
> +      *                          */
> +     if (irq >= NR_IRQS)
> +             return -EINVAL;
> +     if (!handler)
> +             return -EINVAL;
> +
> +     action = xmalloc(struct irqaction);
> +     if (!action)
> +             return -ENOMEM;
> +
> +     action->handler = handler;
> +     action->name = devname;
> +     action->dev_id = dev_id;
> +#ifdef XEN
> +     setup_vector(irq, action);
> +#else
> +     retval = setup_irq(irq, action);
> +#endif
> +     if (retval)
> +             xfree(action);
> +
> +     return retval;
> +}
> +
> +
>  void __init
>  init_IRQ (void)
>  {

request_irq() isn't defined in Linux 2.6.13 irq_ia64.c, but
in kernel/irq/manage.c. And the above code doesn't match the one
in manage.c (except ifdef XEN).
Probably it would be better to surround whole request_irq()
with #ifdef XEN.

thanks,
-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>