diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-09-29 11:18:47 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 10:53:44 -0400 |
commit | 78f90d91f395cd0dc1ef3f21e0c5cd6fd50d202c (patch) | |
tree | e9a6b0a5d8a0b99cd23dbc1c1f376a7e78a93428 /kernel/irq/irqdesc.c | |
parent | b7b29338dc7111ed8bd4d6555d84afae13ebe752 (diff) |
genirq: Remove the now unused sparse irq leftovers
The move_irq_desc() function was only used due to the problem that the
allocator did not free the old descriptors. So the descriptors had to
be moved in create_irq_nr(). That's history.
The code would have never been able to move active interrupt
descriptors on affinity settings. That can be done in a completely
different way w/o all this horror.
Remove all of it.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/irqdesc.c')
-rw-r--r-- | kernel/irq/irqdesc.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index c9d5a1c12874..4f0b9c9d5c46 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
@@ -20,7 +20,7 @@ | |||
20 | /* | 20 | /* |
21 | * lockdep: we want to handle all irq_desc locks as a single lock-class: | 21 | * lockdep: we want to handle all irq_desc locks as a single lock-class: |
22 | */ | 22 | */ |
23 | struct lock_class_key irq_desc_lock_class; | 23 | static struct lock_class_key irq_desc_lock_class; |
24 | 24 | ||
25 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) | 25 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) |
26 | static void __init init_irq_default_affinity(void) | 26 | static void __init init_irq_default_affinity(void) |
@@ -90,28 +90,11 @@ static void desc_set_defaults(unsigned int irq, struct irq_desc *desc, int node) | |||
90 | int nr_irqs = NR_IRQS; | 90 | int nr_irqs = NR_IRQS; |
91 | EXPORT_SYMBOL_GPL(nr_irqs); | 91 | EXPORT_SYMBOL_GPL(nr_irqs); |
92 | 92 | ||
93 | DEFINE_RAW_SPINLOCK(sparse_irq_lock); | 93 | static DEFINE_RAW_SPINLOCK(sparse_irq_lock); |
94 | static DECLARE_BITMAP(allocated_irqs, NR_IRQS); | 94 | static DECLARE_BITMAP(allocated_irqs, NR_IRQS); |
95 | 95 | ||
96 | #ifdef CONFIG_SPARSE_IRQ | 96 | #ifdef CONFIG_SPARSE_IRQ |
97 | 97 | ||
98 | void __ref init_kstat_irqs(struct irq_desc *desc, int node, int nr) | ||
99 | { | ||
100 | void *ptr; | ||
101 | |||
102 | ptr = kzalloc_node(nr * sizeof(*desc->kstat_irqs), | ||
103 | GFP_ATOMIC, node); | ||
104 | |||
105 | /* | ||
106 | * don't overwite if can not get new one | ||
107 | * init_copy_kstat_irqs() could still use old one | ||
108 | */ | ||
109 | if (ptr) { | ||
110 | printk(KERN_DEBUG " alloc kstat_irqs on node %d\n", node); | ||
111 | desc->kstat_irqs = ptr; | ||
112 | } | ||
113 | } | ||
114 | |||
115 | static RADIX_TREE(irq_desc_tree, GFP_ATOMIC); | 98 | static RADIX_TREE(irq_desc_tree, GFP_ATOMIC); |
116 | 99 | ||
117 | static void irq_insert_desc(unsigned int irq, struct irq_desc *desc) | 100 | static void irq_insert_desc(unsigned int irq, struct irq_desc *desc) |
@@ -124,15 +107,6 @@ struct irq_desc *irq_to_desc(unsigned int irq) | |||
124 | return radix_tree_lookup(&irq_desc_tree, irq); | 107 | return radix_tree_lookup(&irq_desc_tree, irq); |
125 | } | 108 | } |
126 | 109 | ||
127 | void replace_irq_desc(unsigned int irq, struct irq_desc *desc) | ||
128 | { | ||
129 | void **ptr; | ||
130 | |||
131 | ptr = radix_tree_lookup_slot(&irq_desc_tree, irq); | ||
132 | if (ptr) | ||
133 | radix_tree_replace_slot(ptr, desc); | ||
134 | } | ||
135 | |||
136 | static void delete_irq_desc(unsigned int irq) | 110 | static void delete_irq_desc(unsigned int irq) |
137 | { | 111 | { |
138 | radix_tree_delete(&irq_desc_tree, irq); | 112 | radix_tree_delete(&irq_desc_tree, irq); |