diff options
-rw-r--r-- | arch/arm/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/sh/kernel/irq.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 2 | ||||
-rw-r--r-- | include/linux/irq.h | 4 | ||||
-rw-r--r-- | kernel/irq/irqdesc.c | 10 | ||||
-rw-r--r-- | kernel/softirq.c | 4 |
6 files changed, 16 insertions, 12 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index c0d5c3b3a760..5456d11d6ae4 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -157,10 +157,8 @@ void __init init_IRQ(void) | |||
157 | struct irq_desc *desc; | 157 | struct irq_desc *desc; |
158 | int irq; | 158 | int irq; |
159 | 159 | ||
160 | for (irq = 0; irq < nr_irqs; irq++) { | 160 | for (irq = 0; irq < nr_irqs; irq++) |
161 | desc = irq_to_desc_alloc_node(irq, 0); | ||
162 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE; | 161 | desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE; |
163 | } | ||
164 | 162 | ||
165 | init_arch_irq(); | 163 | init_arch_irq(); |
166 | } | 164 | } |
@@ -169,7 +167,7 @@ void __init init_IRQ(void) | |||
169 | int __init arch_probe_nr_irqs(void) | 167 | int __init arch_probe_nr_irqs(void) |
170 | { | 168 | { |
171 | nr_irqs = arch_nr_irqs ? arch_nr_irqs : NR_IRQS; | 169 | nr_irqs = arch_nr_irqs ? arch_nr_irqs : NR_IRQS; |
172 | return 0; | 170 | return nr_irqs; |
173 | } | 171 | } |
174 | #endif | 172 | #endif |
175 | 173 | ||
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 257de1f0692b..ae5bac39b896 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -290,7 +290,7 @@ void __init init_IRQ(void) | |||
290 | int __init arch_probe_nr_irqs(void) | 290 | int __init arch_probe_nr_irqs(void) |
291 | { | 291 | { |
292 | nr_irqs = sh_mv.mv_nr_irqs; | 292 | nr_irqs = sh_mv.mv_nr_irqs; |
293 | return 0; | 293 | return NR_IRQS_LEGACY; |
294 | } | 294 | } |
295 | #endif | 295 | #endif |
296 | 296 | ||
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index f1efebaf5510..5aee1d1a306d 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3880,7 +3880,7 @@ int __init arch_probe_nr_irqs(void) | |||
3880 | if (nr < nr_irqs) | 3880 | if (nr < nr_irqs) |
3881 | nr_irqs = nr; | 3881 | nr_irqs = nr; |
3882 | 3882 | ||
3883 | return 0; | 3883 | return NR_IRQS_LEGACY; |
3884 | } | 3884 | } |
3885 | #endif | 3885 | #endif |
3886 | 3886 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 096b74d5d0d7..ef878823ee3b 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -214,6 +214,10 @@ struct irq_chip { | |||
214 | */ | 214 | */ |
215 | #include <asm/hw_irq.h> | 215 | #include <asm/hw_irq.h> |
216 | 216 | ||
217 | #ifndef NR_IRQS_LEGACY | ||
218 | # define NR_IRQS_LEGACY 0 | ||
219 | #endif | ||
220 | |||
217 | #ifndef ARCH_IRQ_INIT_FLAGS | 221 | #ifndef ARCH_IRQ_INIT_FLAGS |
218 | # define ARCH_IRQ_INIT_FLAGS 0 | 222 | # define ARCH_IRQ_INIT_FLAGS 0 |
219 | #endif | 223 | #endif |
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 7cbe4f93e2fb..a1fbd1d347af 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c | |||
@@ -226,16 +226,16 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node) | |||
226 | 226 | ||
227 | int __init early_irq_init(void) | 227 | int __init early_irq_init(void) |
228 | { | 228 | { |
229 | int i, node = first_online_node; | 229 | int i, initcnt, node = first_online_node; |
230 | struct irq_desc *desc; | 230 | struct irq_desc *desc; |
231 | 231 | ||
232 | init_irq_default_affinity(); | 232 | init_irq_default_affinity(); |
233 | 233 | ||
234 | /* initialize nr_irqs based on nr_cpu_ids */ | 234 | /* Let arch update nr_irqs and return the nr of preallocated irqs */ |
235 | arch_probe_nr_irqs(); | 235 | initcnt = arch_probe_nr_irqs(); |
236 | printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs); | 236 | printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d %d\n", NR_IRQS, nr_irqs, initcnt); |
237 | 237 | ||
238 | for (i = 0; i < NR_IRQS_LEGACY; i++) { | 238 | for (i = 0; i < initcnt; i++) { |
239 | desc = alloc_desc(i, node); | 239 | desc = alloc_desc(i, node); |
240 | set_bit(i, allocated_irqs); | 240 | set_bit(i, allocated_irqs); |
241 | irq_insert_desc(i, desc); | 241 | irq_insert_desc(i, desc); |
diff --git a/kernel/softirq.c b/kernel/softirq.c index 07b4f1b1a73a..14a7b80b2cce 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -886,9 +886,10 @@ int __init __weak early_irq_init(void) | |||
886 | return 0; | 886 | return 0; |
887 | } | 887 | } |
888 | 888 | ||
889 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
889 | int __init __weak arch_probe_nr_irqs(void) | 890 | int __init __weak arch_probe_nr_irqs(void) |
890 | { | 891 | { |
891 | return 0; | 892 | return NR_IRQS_LEGACY; |
892 | } | 893 | } |
893 | 894 | ||
894 | int __init __weak arch_early_irq_init(void) | 895 | int __init __weak arch_early_irq_init(void) |
@@ -900,3 +901,4 @@ int __weak arch_init_chip_data(struct irq_desc *desc, int node) | |||
900 | { | 901 | { |
901 | return 0; | 902 | return 0; |
902 | } | 903 | } |
904 | #endif | ||