[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1 of 3] IRQ: Remove bit-rotten code



irq_desc.depth is a write only variable.
LEGACY_IRQ_FROM_VECTOR(vec) is never referenced.

Signed-off-by Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

diff -r 227130622561 -r 5a1826139750 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Thu Aug 25 12:03:14 2011 +0100
+++ b/xen/arch/x86/io_apic.c    Fri Sep 02 17:33:17 2011 +0100
@@ -1955,7 +1955,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;
 
     /*
diff -r 227130622561 -r 5a1826139750 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Thu Aug 25 12:03:14 2011 +0100
+++ b/xen/arch/x86/irq.c        Fri Sep 02 17:33:17 2011 +0100
@@ -178,7 +178,6 @@ static void dynamic_irq_cleanup(unsigned
     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;
@@ -278,7 +277,6 @@ static void __init init_one_irq_desc(str
     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);
@@ -736,7 +734,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);
@@ -764,7 +761,6 @@ int __init setup_irq(unsigned int irq, s
     }
 
     desc->action  = new;
-    desc->depth   = 0;
     desc->status &= ~IRQ_DISABLED;
     desc->handler->startup(irq);
 
@@ -1343,7 +1339,6 @@ int pirq_guest_bind(struct vcpu *v, stru
         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);
@@ -1459,7 +1454,6 @@ static irq_guest_action_t *__pirq_guest_
     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);
 
diff -r 227130622561 -r 5a1826139750 xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h Thu Aug 25 12:03:14 2011 +0100
+++ b/xen/include/asm-x86/irq.h Fri Sep 02 17:33:17 2011 +0100
@@ -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])
diff -r 227130622561 -r 5a1826139750 xen/include/xen/irq.h
--- a/xen/include/xen/irq.h     Thu Aug 25 12:03:14 2011 +0100
+++ b/xen/include/xen/irq.h     Fri Sep 02 17:33:17 2011 +0100
@@ -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;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.