From: Isaku Yamahata Date: Fri, 10 Oct 2008 02:57:23 +0000 (+0900) Subject: [IA64] Add pci configuration code, which is needed by VTD. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14093 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f5ecb7dd8e22ef6f4d3d99a2425a93ad85ab5391;p=xen.git [IA64] Add pci configuration code, which is needed by VTD. Signed-off-by; Anthony Xu --- diff --git a/xen/arch/ia64/linux-xen/irq_ia64.c b/xen/arch/ia64/linux-xen/irq_ia64.c index 29dde256f7..754c6ea367 100644 --- a/xen/arch/ia64/linux-xen/irq_ia64.c +++ b/xen/arch/ia64/linux-xen/irq_ia64.c @@ -266,6 +266,39 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action) } } +#ifdef XEN +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; + setup_vector(irq, action); + if (retval) + xfree(action); + + return retval; +} +#endif + void __init init_IRQ (void) {