IRQ: Remove bit-rotten code
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 5 Sep 2011 14:02:11 +0000 (15:02 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 5 Sep 2011 14:02:11 +0000 (15:02 +0100)
irq_desc.depth is a write only variable.
LEGACY_IRQ_FROM_VECTOR(vec) is never referenced.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/arch/x86/io_apic.c
xen/arch/x86/irq.c
xen/include/asm-x86/irq.h
xen/include/xen/irq.h

index b333626791f0a436cbb37583b8cd23437d3ab4f3..0fdcc7d6944adc5352fa2347aae5d6eb818e515c 100644 (file)
@@ -1967,7 +1967,6 @@ static void __init check_timer(void)
     if ((ret = bind_irq_vector(0, vector, mask_all)))
         printk(KERN_ERR"..IRQ0 is not set correctly with ioapic!!!, err:%d\n", ret);
     
-    irq_desc[0].depth  = 0;
     irq_desc[0].status &= ~IRQ_DISABLED;
 
     /*
index f4893d8d67a9c34f3f6fd5ba94614a5ff7685cfe..24bd74b551a328ceecb0e039c1fdb96cadc54c1d 100644 (file)
@@ -202,7 +202,6 @@ static void dynamic_irq_cleanup(unsigned int irq)
     desc->handler->shutdown(irq);
     action = desc->action;
     desc->action  = NULL;
-    desc->depth   = 1;
     desc->msi_desc = NULL;
     desc->handler = &no_irq_type;
     desc->chip_data->used_vectors=NULL;
@@ -302,7 +301,6 @@ static void __init init_one_irq_desc(struct irq_desc *desc)
     desc->status  = IRQ_DISABLED;
     desc->handler = &no_irq_type;
     desc->action  = NULL;
-    desc->depth   = 1;
     desc->msi_desc = NULL;
     spin_lock_init(&desc->lock);
     cpus_setall(desc->affinity);
@@ -817,7 +815,6 @@ void __init release_irq(unsigned int irq)
     spin_lock_irqsave(&desc->lock,flags);
     action = desc->action;
     desc->action  = NULL;
-    desc->depth   = 1;
     desc->status |= IRQ_DISABLED;
     desc->handler->shutdown(irq);
     spin_unlock_irqrestore(&desc->lock,flags);
@@ -845,7 +842,6 @@ int __init setup_irq(unsigned int irq, struct irqaction *new)
     }
 
     desc->action  = new;
-    desc->depth   = 0;
     desc->status &= ~IRQ_DISABLED;
     desc->handler->startup(irq);
 
@@ -1424,7 +1420,6 @@ int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share)
         cpus_clear(action->cpu_eoi_map);
         init_timer(&action->eoi_timer, irq_guest_eoi_timer_fn, desc, 0);
 
-        desc->depth = 0;
         desc->status |= IRQ_GUEST;
         desc->status &= ~IRQ_DISABLED;
         desc->handler->startup(irq);
@@ -1540,7 +1535,6 @@ static irq_guest_action_t *__pirq_guest_unbind(
     BUG_ON(action->in_flight != 0);
 
     /* Disabling IRQ before releasing the desc_lock avoids an IRQ storm. */
-    desc->depth   = 1;
     desc->status |= IRQ_DISABLED;
     desc->handler->disable(irq);
 
index 1a37c4d4c2a2a3394ddcf8d21dc5c929e6483318..448d96a6f8738ba4fdd3bcd590575c3590374236 100644 (file)
@@ -19,7 +19,6 @@
 #define MSI_IRQ(irq)       ((irq) >= nr_irqs_gsi && (irq) < nr_irqs)
 
 #define LEGACY_VECTOR(irq)          ((irq) + FIRST_LEGACY_VECTOR)
-#define LEGACY_IRQ_FROM_VECTOR(vec) ((vec) - FIRST_LEGACY_VECTOR)
 
 #define irq_to_desc(irq)    (&irq_desc[irq])
 #define irq_cfg(irq)        (&irq_cfg[irq])
index 647e2366b5874de7514aade31b62b124bd13f633..26cec641320a7686b7a525cbd0d46996f41e8761 100644 (file)
@@ -72,7 +72,6 @@ typedef struct irq_desc {
     hw_irq_controller *handler;
     struct msi_desc   *msi_desc;
     struct irqaction *action;  /* IRQ action list */
-    unsigned int depth;                /* nested irq disables */
     struct irq_cfg *chip_data;
     int irq;
     spinlock_t lock;