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: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: RE: [Xen-ia64-devel] [Xen-ia64-devel[PATCH] request_irq is needed by VTD
From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Date: Sat, 27 Sep 2008 14:47:57 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 26 Sep 2008 23:48:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080924101553.GF4150%yamahata@xxxxxxxxxxxxx>
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> <20080924101553.GF4150%yamahata@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckeLpNh1NCOTJSASHGTwf2hJ0tTMACPk7YQ
Thread-topic: [Xen-ia64-devel] [Xen-ia64-devel[PATCH] request_irq is needed by VTD
Updated one per your comment

Thanks,
Anthony


Isaku Yamahata wrote:
> 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,

Attachment: request_irq_0927.patch
Description: request_irq_0927.patch

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
<Prev in Thread] Current Thread [Next in Thread>