aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/handle.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:17 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:51 -0400
commitcb5bc83225a86ca53bbb889ed8439e4fd6cf44ac (patch)
treed2c43413adbc86562ab63498e3ce14e36ba253ed /kernel/irq/handle.c
parent1d5f6b36c4736af1dac396d6267eb53dcc8c0021 (diff)
x86_64: rename irq_desc/irq_desc_alloc
change names: irq_desc() ==> irq_desc_alloc __irq_desc() ==> irq_desc Also split a few of the uses in lowlevel x86 code. v2: need to check if desc is null in smp_irq_move_cleanup Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/handle.c')
-rw-r--r--kernel/irq/handle.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index e1d787e9169b..d44e3515eae1 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -151,7 +151,7 @@ early_param("nr_irq_desc", parse_nr_irq_desc);
151struct irq_desc *sparse_irqs; 151struct irq_desc *sparse_irqs;
152DEFINE_DYN_ARRAY(sparse_irqs, sizeof(struct irq_desc), nr_irq_desc, PAGE_SIZE, init_work); 152DEFINE_DYN_ARRAY(sparse_irqs, sizeof(struct irq_desc), nr_irq_desc, PAGE_SIZE, init_work);
153 153
154struct irq_desc *__irq_to_desc(unsigned int irq) 154struct irq_desc *irq_to_desc(unsigned int irq)
155{ 155{
156 struct irq_desc *desc; 156 struct irq_desc *desc;
157 157
@@ -169,7 +169,7 @@ struct irq_desc *__irq_to_desc(unsigned int irq)
169 } 169 }
170 return NULL; 170 return NULL;
171} 171}
172struct irq_desc *irq_to_desc(unsigned int irq) 172struct irq_desc *irq_to_desc_alloc(unsigned int irq)
173{ 173{
174 struct irq_desc *desc, *desc_pri; 174 struct irq_desc *desc, *desc_pri;
175 int i; 175 int i;
@@ -186,6 +186,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
186 186
187 if (desc->irq == -1U) { 187 if (desc->irq == -1U) {
188 desc->irq = irq; 188 desc->irq = irq;
189 printk(KERN_DEBUG "found new irq_desc for irq %d\n", desc->irq);
189 return desc; 190 return desc;
190 } 191 }
191 desc_pri = desc; 192 desc_pri = desc;
@@ -236,21 +237,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
236 237
237 desc->irq = irq; 238 desc->irq = irq;
238 desc_pri->next = desc; 239 desc_pri->next = desc;
239 { 240 printk(KERN_DEBUG "1 found new irq_desc for irq %d and pri will be irq %d\n", desc->irq, desc_pri->irq);
240 /* double check if some one mess up the list */
241 struct irq_desc *desc;
242 int count = 0;
243
244 desc = &sparse_irqs[0];
245 while (desc) {
246 printk(KERN_DEBUG "1 found irq_desc for irq %d\n", desc->irq);
247 if (desc->next)
248 printk(KERN_DEBUG "1 found irq_desc for irq %d and next will be irq %d\n", desc->irq, desc->next->irq);
249 desc = desc->next;
250 count++;
251 }
252 printk(KERN_DEBUG "1 all preallocted %d\n", count);
253 }
254 241
255 return desc; 242 return desc;
256} 243}
@@ -285,7 +272,7 @@ struct irq_desc *irq_to_desc(unsigned int irq)
285 272
286 return NULL; 273 return NULL;
287} 274}
288struct irq_desc *__irq_to_desc(unsigned int irq) 275struct irq_desc *irq_to_desc_alloc(unsigned int irq)
289{ 276{
290 return irq_to_desc(irq); 277 return irq_to_desc(irq);
291} 278}