ia64/xen-unstable

changeset 18584:1a77bb358d7b

[IA64] Add pci configuration code, which is needed by VTD.

Signed-off-by; Anthony Xu <anthony.xu@intel.com>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Fri Oct 10 11:57:23 2008 +0900 (2008-10-10)
parents faf07ca43a28
children af8eaa3cf782
files xen/arch/ia64/linux-xen/irq_ia64.c
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/irq_ia64.c	Fri Oct 10 11:47:07 2008 +0900
     1.2 +++ b/xen/arch/ia64/linux-xen/irq_ia64.c	Fri Oct 10 11:57:23 2008 +0900
     1.3 @@ -266,6 +266,39 @@ register_percpu_irq (ia64_vector vec, st
     1.4  		}
     1.5  }
     1.6  
     1.7 +#ifdef XEN
     1.8 +int request_irq(unsigned int irq,
     1.9 +		void (*handler)(int, void *, struct cpu_user_regs *),
    1.10 +		unsigned long irqflags, const char * devname, void *dev_id)
    1.11 +{
    1.12 +	struct irqaction * action;
    1.13 +	int retval=0;
    1.14 +
    1.15 +	/*
    1.16 +	 * Sanity-check: shared interrupts must pass in a real dev-ID,
    1.17 +	 * otherwise we'll have trouble later trying to figure out
    1.18 +	 * which interrupt is which (messes up the interrupt freeing logic etc).
    1.19 +	 *                          */
    1.20 +	if (irq >= NR_IRQS)
    1.21 +		return -EINVAL;
    1.22 +	if (!handler)
    1.23 +		return -EINVAL;
    1.24 +
    1.25 +	action = xmalloc(struct irqaction);
    1.26 +	if (!action)
    1.27 +		return -ENOMEM;
    1.28 +
    1.29 +	action->handler = handler;
    1.30 +	action->name = devname;
    1.31 +	action->dev_id = dev_id;
    1.32 +	setup_vector(irq, action);
    1.33 +	if (retval)
    1.34 +		xfree(action);
    1.35 +
    1.36 +	return retval;
    1.37 +}
    1.38 +#endif
    1.39 +
    1.40  void __init
    1.41  init_IRQ (void)
    1.42  {