aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/irqdesc.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-09-29 11:18:47 -0400
committerThomas Gleixner <tglx@linutronix.de>2010-10-12 10:53:44 -0400
commit78f90d91f395cd0dc1ef3f21e0c5cd6fd50d202c (patch)
treee9a6b0a5d8a0b99cd23dbc1c1f376a7e78a93428 /kernel/irq/irqdesc.c
parentb7b29338dc7111ed8bd4d6555d84afae13ebe752 (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.c30
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 */
23struct lock_class_key irq_desc_lock_class; 23static 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)
26static void __init init_irq_default_affinity(void) 26static 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)
90int nr_irqs = NR_IRQS; 90int nr_irqs = NR_IRQS;
91EXPORT_SYMBOL_GPL(nr_irqs); 91EXPORT_SYMBOL_GPL(nr_irqs);
92 92
93DEFINE_RAW_SPINLOCK(sparse_irq_lock); 93static DEFINE_RAW_SPINLOCK(sparse_irq_lock);
94static DECLARE_BITMAP(allocated_irqs, NR_IRQS); 94static DECLARE_BITMAP(allocated_irqs, NR_IRQS);
95 95
96#ifdef CONFIG_SPARSE_IRQ 96#ifdef CONFIG_SPARSE_IRQ
97 97
98void __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
115static RADIX_TREE(irq_desc_tree, GFP_ATOMIC); 98static RADIX_TREE(irq_desc_tree, GFP_ATOMIC);
116 99
117static void irq_insert_desc(unsigned int irq, struct irq_desc *desc) 100static 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
127void 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
136static void delete_irq_desc(unsigned int irq) 110static 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);