diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-02 16:08:56 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-02 16:08:56 -0500 |
commit | c02368a9d059322f913a58111eade87a656fefd5 (patch) | |
tree | 2f02dbbe69b86535f58d2010d9adfb20a9c16fb9 /kernel/irq | |
parent | f17c75453b2d195eba0a90d9f16a3ba88c85b3b4 (diff) | |
parent | 778ef1e6cbb049c9bcbf405936ee6f2b6e451892 (diff) |
Merge branch 'linus' into irq/genirq
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/chip.c | 2 | ||||
-rw-r--r-- | kernel/irq/handle.c | 16 | ||||
-rw-r--r-- | kernel/irq/manage.c | 10 | ||||
-rw-r--r-- | kernel/irq/numa_migrate.c | 7 |
4 files changed, 25 insertions, 10 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 9a7fbb84f565..55d526c0eefd 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -384,6 +384,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
384 | out_unlock: | 384 | out_unlock: |
385 | spin_unlock(&desc->lock); | 385 | spin_unlock(&desc->lock); |
386 | } | 386 | } |
387 | EXPORT_SYMBOL_GPL(handle_level_irq); | ||
387 | 388 | ||
388 | /** | 389 | /** |
389 | * handle_fasteoi_irq - irq handler for transparent controllers | 390 | * handle_fasteoi_irq - irq handler for transparent controllers |
@@ -595,6 +596,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
595 | } | 596 | } |
596 | spin_unlock_irqrestore(&desc->lock, flags); | 597 | spin_unlock_irqrestore(&desc->lock, flags); |
597 | } | 598 | } |
599 | EXPORT_SYMBOL_GPL(__set_irq_handler); | ||
598 | 600 | ||
599 | void | 601 | void |
600 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | 602 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, |
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index c20db0be9173..3aba8d12f328 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -39,6 +39,18 @@ void handle_bad_irq(unsigned int irq, struct irq_desc *desc) | |||
39 | ack_bad_irq(irq); | 39 | ack_bad_irq(irq); |
40 | } | 40 | } |
41 | 41 | ||
42 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_HARDIRQS) | ||
43 | static void __init init_irq_default_affinity(void) | ||
44 | { | ||
45 | alloc_bootmem_cpumask_var(&irq_default_affinity); | ||
46 | cpumask_setall(irq_default_affinity); | ||
47 | } | ||
48 | #else | ||
49 | static void __init init_irq_default_affinity(void) | ||
50 | { | ||
51 | } | ||
52 | #endif | ||
53 | |||
42 | /* | 54 | /* |
43 | * Linux has a controller-independent interrupt architecture. | 55 | * Linux has a controller-independent interrupt architecture. |
44 | * Every controller has a 'controller-template', that is used | 56 | * Every controller has a 'controller-template', that is used |
@@ -134,6 +146,8 @@ int __init early_irq_init(void) | |||
134 | int legacy_count; | 146 | int legacy_count; |
135 | int i; | 147 | int i; |
136 | 148 | ||
149 | init_irq_default_affinity(); | ||
150 | |||
137 | desc = irq_desc_legacy; | 151 | desc = irq_desc_legacy; |
138 | legacy_count = ARRAY_SIZE(irq_desc_legacy); | 152 | legacy_count = ARRAY_SIZE(irq_desc_legacy); |
139 | 153 | ||
@@ -219,6 +233,8 @@ int __init early_irq_init(void) | |||
219 | int count; | 233 | int count; |
220 | int i; | 234 | int i; |
221 | 235 | ||
236 | init_irq_default_affinity(); | ||
237 | |||
222 | desc = irq_desc; | 238 | desc = irq_desc; |
223 | count = ARRAY_SIZE(irq_desc); | 239 | count = ARRAY_SIZE(irq_desc); |
224 | 240 | ||
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index c589305210d7..52ee17135092 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 |
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c index ecf765c6a77a..acd88356ac76 100644 --- a/kernel/irq/numa_migrate.c +++ b/kernel/irq/numa_migrate.c | |||
@@ -71,7 +71,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc, | |||
71 | desc = irq_desc_ptrs[irq]; | 71 | desc = irq_desc_ptrs[irq]; |
72 | 72 | ||
73 | if (desc && old_desc != desc) | 73 | if (desc && old_desc != desc) |
74 | goto out_unlock; | 74 | goto out_unlock; |
75 | 75 | ||
76 | node = cpu_to_node(cpu); | 76 | node = cpu_to_node(cpu); |
77 | desc = kzalloc_node(sizeof(*desc), GFP_ATOMIC, node); | 77 | desc = kzalloc_node(sizeof(*desc), GFP_ATOMIC, node); |
@@ -84,10 +84,15 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc, | |||
84 | init_copy_one_irq_desc(irq, old_desc, desc, cpu); | 84 | init_copy_one_irq_desc(irq, old_desc, desc, cpu); |
85 | 85 | ||
86 | irq_desc_ptrs[irq] = desc; | 86 | irq_desc_ptrs[irq] = desc; |
87 | spin_unlock_irqrestore(&sparse_irq_lock, flags); | ||
87 | 88 | ||
88 | /* free the old one */ | 89 | /* free the old one */ |
89 | free_one_irq_desc(old_desc, desc); | 90 | free_one_irq_desc(old_desc, desc); |
91 | spin_unlock(&old_desc->lock); | ||
90 | kfree(old_desc); | 92 | kfree(old_desc); |
93 | spin_lock(&desc->lock); | ||
94 | |||
95 | return desc; | ||
91 | 96 | ||
92 | out_unlock: | 97 | out_unlock: |
93 | spin_unlock_irqrestore(&sparse_irq_lock, flags); | 98 | spin_unlock_irqrestore(&sparse_irq_lock, flags); |