diff options
Diffstat (limited to 'kernel/irq/handle.c')
-rw-r--r-- | kernel/irq/handle.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index e1cf4e391cae..157c04c3b158 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -218,6 +218,21 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = { | |||
218 | } | 218 | } |
219 | }; | 219 | }; |
220 | 220 | ||
221 | int __init early_irq_init(void) | ||
222 | { | ||
223 | struct irq_desc *desc; | ||
224 | int count; | ||
225 | int i; | ||
226 | |||
227 | desc = irq_desc; | ||
228 | count = ARRAY_SIZE(irq_desc); | ||
229 | |||
230 | for (i = 0; i < count; i++) | ||
231 | desc[i].irq = i; | ||
232 | |||
233 | return arch_early_irq_init(); | ||
234 | } | ||
235 | |||
221 | struct irq_desc *irq_to_desc(unsigned int irq) | 236 | struct irq_desc *irq_to_desc(unsigned int irq) |
222 | { | 237 | { |
223 | return (irq < NR_IRQS) ? irq_desc + irq : NULL; | 238 | return (irq < NR_IRQS) ? irq_desc + irq : NULL; |