aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-19 23:50:15 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:52:50 -0400
commit46926b67fc663d357a1a8174328998a9e49da0b8 (patch)
tree33870a6c416bbc4d246ecfbf015a78c61943a36d /kernel/irq
parent7d94f7ca401dd7f445fda9a971a48aa5427b3e55 (diff)
generic: add irq_desc in function in parameter
So we could remove some duplicated calling to irq_desc v2: make sure irq_desc in init/main.c is not used without generic_hardirqs Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/handle.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 8e55dbe50afc..e1d787e9169b 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -197,6 +197,21 @@ struct irq_desc *irq_to_desc(unsigned int irq)
197 * we run out of pre-allocate ones, allocate more 197 * we run out of pre-allocate ones, allocate more
198 */ 198 */
199 printk(KERN_DEBUG "try to get more irq_desc %d\n", nr_irq_desc); 199 printk(KERN_DEBUG "try to get more irq_desc %d\n", nr_irq_desc);
200 {
201 /* double check if some one mess up the list */
202 struct irq_desc *desc;
203 int count = 0;
204
205 desc = &sparse_irqs[0];
206 while (desc) {
207 printk(KERN_DEBUG "found irq_desc for irq %d\n", desc->irq);
208 if (desc->next)
209 printk(KERN_DEBUG "found irq_desc for irq %d and next will be irq %d\n", desc->irq, desc->next->irq);
210 desc = desc->next;
211 count++;
212 }
213 printk(KERN_DEBUG "all preallocted %d\n", count);
214 }
200 215
201 total_bytes = sizeof(struct irq_desc) * nr_irq_desc; 216 total_bytes = sizeof(struct irq_desc) * nr_irq_desc;
202 if (after_bootmem) 217 if (after_bootmem)
@@ -221,6 +236,21 @@ struct irq_desc *irq_to_desc(unsigned int irq)
221 236
222 desc->irq = irq; 237 desc->irq = irq;
223 desc_pri->next = desc; 238 desc_pri->next = desc;
239 {
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 }
224 254
225 return desc; 255 return desc;
226} 256}