[IA64] Add pci configuration code, which is needed by VTD.
authorIsaku Yamahata <yamahata@valinux.co.jp>
Fri, 10 Oct 2008 02:57:23 +0000 (11:57 +0900)
committerIsaku Yamahata <yamahata@valinux.co.jp>
Fri, 10 Oct 2008 02:57:23 +0000 (11:57 +0900)
Signed-off-by; Anthony Xu <anthony.xu@intel.com>

xen/arch/ia64/linux-xen/irq_ia64.c

index 29dde256f7dfb150d7ced8345fff9dd44f59621f..754c6ea36719c1f52e00129dfc44ab5425e5abac 100644 (file)
@@ -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)
 {