diff options
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/handle.c | 16 | ||||
-rw-r--r-- | kernel/irq/manage.c | 10 |
2 files changed, 17 insertions, 9 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 375d68cd5bf0..f51eaee921b6 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -40,6 +40,18 @@ void handle_bad_irq(unsigned int irq, struct irq_desc *desc) | |||
40 | ack_bad_irq(irq); | 40 | ack_bad_irq(irq); |
41 | } | 41 | } |
42 | 42 | ||
43 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) | ||
44 | static void __init init_irq_default_affinity(void) | ||
45 | { | ||
46 | alloc_bootmem_cpumask_var(&irq_default_affinity); | ||
47 | cpumask_setall(irq_default_affinity); | ||
48 | } | ||
49 | #else | ||
50 | static void __init init_irq_default_affinity(void) | ||
51 | { | ||
52 | } | ||
53 | #endif | ||
54 | |||
43 | /* | 55 | /* |
44 | * Linux has a controller-independent interrupt architecture. | 56 | * Linux has a controller-independent interrupt architecture. |
45 | * Every controller has a 'controller-template', that is used | 57 | * Every controller has a 'controller-template', that is used |
@@ -133,6 +145,8 @@ int __init early_irq_init(void) | |||
133 | int legacy_count; | 145 | int legacy_count; |
134 | int i; | 146 | int i; |
135 | 147 | ||
148 | init_irq_default_affinity(); | ||
149 | |||
136 | /* initialize nr_irqs based on nr_cpu_ids */ | 150 | /* initialize nr_irqs based on nr_cpu_ids */ |
137 | arch_probe_nr_irqs(); | 151 | arch_probe_nr_irqs(); |
138 | printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs); | 152 | printk(KERN_INFO "NR_IRQS:%d nr_irqs:%d\n", NR_IRQS, nr_irqs); |
@@ -229,6 +243,8 @@ int __init early_irq_init(void) | |||
229 | int count; | 243 | int count; |
230 | int i; | 244 | int i; |
231 | 245 | ||
246 | init_irq_default_affinity(); | ||
247 | |||
232 | printk(KERN_INFO "NR_IRQS:%d\n", NR_IRQS); | 248 | printk(KERN_INFO "NR_IRQS:%d\n", NR_IRQS); |
233 | 249 | ||
234 | desc = irq_desc; | 250 | desc = irq_desc; |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index b98739af4558..a3a5dc9ef346 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -15,17 +15,9 @@ | |||
15 | 15 | ||
16 | #include "internals.h" | 16 | #include "internals.h" |
17 | 17 | ||
18 | #ifdef CONFIG_SMP | 18 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) |
19 | cpumask_var_t irq_default_affinity; | 19 | cpumask_var_t irq_default_affinity; |
20 | 20 | ||
21 | static int init_irq_default_affinity(void) | ||
22 | { | ||
23 | alloc_cpumask_var(&irq_default_affinity, GFP_KERNEL); | ||
24 | cpumask_setall(irq_default_affinity); | ||
25 | return 0; | ||
26 | } | ||
27 | core_initcall(init_irq_default_affinity); | ||
28 | |||
29 | /** | 21 | /** |
30 | * synchronize_irq - wait for pending IRQ handlers (on other CPUs) | 22 | * synchronize_irq - wait for pending IRQ handlers (on other CPUs) |
31 | * @irq: interrupt number to wait for | 23 | * @irq: interrupt number to wait for |