ia64/xen-unstable

changeset 15317:51f5bea7b0d8

[IA64] create free_irq()

This isn't well tested, since it's not likely to get called, but
it is required to build.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author Alex Williamson <alex.williamson@hp.com>
date Mon Jun 11 13:59:48 2007 -0600 (2007-06-11)
parents 154878b6ec4b
children 71377eab1874
files xen/arch/ia64/xen/irq.c
line diff
     1.1 --- a/xen/arch/ia64/xen/irq.c	Mon Jun 11 13:46:42 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/irq.c	Mon Jun 11 13:59:48 2007 -0600
     1.3 @@ -281,6 +281,30 @@ int setup_irq(unsigned int irq, struct i
     1.4  	return res;
     1.5  }
     1.6  
     1.7 +void free_irq(unsigned int irq)
     1.8 +{
     1.9 +	unsigned int vec;
    1.10 +	unsigned long flags;
    1.11 +	irq_desc_t *desc;
    1.12 +
    1.13 +	/* Get vector for IRQ.  */
    1.14 +	if (acpi_gsi_to_irq(irq, &vec) < 0)
    1.15 +		return;
    1.16 +
    1.17 +	desc = irq_descp(vec);
    1.18 +
    1.19 +	spin_lock_irqsave(&desc->lock, flags);
    1.20 +	clear_bit(vec, ia64_xen_vector);
    1.21 +	desc->action = NULL;
    1.22 +	desc->depth = 1;
    1.23 +	desc->status |= IRQ_DISABLED;
    1.24 +	desc->handler->shutdown(vec);
    1.25 +	spin_unlock_irqrestore(&desc->lock, flags);
    1.26 +
    1.27 +	while (desc->status & IRQ_INPROGRESS)
    1.28 +		cpu_relax();
    1.29 +}
    1.30 +
    1.31  /*
    1.32   * HANDLING OF GUEST-BOUND PHYSICAL IRQS
    1.33   */