diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-04-27 20:57:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-28 06:21:14 -0400 |
commit | 9ec4fa271faf2db3b8e1419c998da1ca6b094eb6 (patch) | |
tree | 2dd817bd41526fc1d1252e50b0b1a0714ae34a7f /kernel | |
parent | e25c2c873f59c57cf1c2b1979cc8fb01958305ef (diff) |
irq, cpumask: correct CPUMASKS_OFFSTACK typo and fix fallout
CPUMASKS_OFFSTACK is not defined anywhere (it is CPUMASK_OFFSTACK).
It is a typo and init_allocate_desc_masks() is called before it set
affinity to all cpus...
Split init_alloc_desc_masks() into all_desc_masks() and init_desc_masks().
Also use CPUMASK_OFFSTACK in alloc_desc_masks().
[ Impact: fix smp_affinity copying/setup when moving irq_desc between CPUs ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
LKML-Reference: <49F6546E.3040406@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/irq/handle.c | 9 | ||||
-rw-r--r-- | kernel/irq/numa_migrate.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index d82142be8dd2..882c79800107 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -115,10 +115,11 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int cpu) | |||
115 | printk(KERN_ERR "can not alloc kstat_irqs\n"); | 115 | printk(KERN_ERR "can not alloc kstat_irqs\n"); |
116 | BUG_ON(1); | 116 | BUG_ON(1); |
117 | } | 117 | } |
118 | if (!init_alloc_desc_masks(desc, cpu, false)) { | 118 | if (!alloc_desc_masks(desc, cpu, false)) { |
119 | printk(KERN_ERR "can not alloc irq_desc cpumasks\n"); | 119 | printk(KERN_ERR "can not alloc irq_desc cpumasks\n"); |
120 | BUG_ON(1); | 120 | BUG_ON(1); |
121 | } | 121 | } |
122 | init_desc_masks(desc); | ||
122 | arch_init_chip_data(desc, cpu); | 123 | arch_init_chip_data(desc, cpu); |
123 | } | 124 | } |
124 | 125 | ||
@@ -169,7 +170,8 @@ int __init early_irq_init(void) | |||
169 | desc[i].irq = i; | 170 | desc[i].irq = i; |
170 | desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids; | 171 | desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids; |
171 | lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); | 172 | lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); |
172 | init_alloc_desc_masks(&desc[i], 0, true); | 173 | alloc_desc_masks(&desc[i], 0, true); |
174 | init_desc_masks(&desc[i]); | ||
173 | irq_desc_ptrs[i] = desc + i; | 175 | irq_desc_ptrs[i] = desc + i; |
174 | } | 176 | } |
175 | 177 | ||
@@ -256,7 +258,8 @@ int __init early_irq_init(void) | |||
256 | 258 | ||
257 | for (i = 0; i < count; i++) { | 259 | for (i = 0; i < count; i++) { |
258 | desc[i].irq = i; | 260 | desc[i].irq = i; |
259 | init_alloc_desc_masks(&desc[i], 0, true); | 261 | alloc_desc_masks(&desc[i], 0, true); |
262 | init_desc_masks(&desc[i]); | ||
260 | desc[i].kstat_irqs = kstat_irqs_all[i]; | 263 | desc[i].kstat_irqs = kstat_irqs_all[i]; |
261 | } | 264 | } |
262 | return arch_early_irq_init(); | 265 | return arch_early_irq_init(); |
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c index 44bbdcbaf8d2..5760d7251626 100644 --- a/kernel/irq/numa_migrate.c +++ b/kernel/irq/numa_migrate.c | |||
@@ -37,7 +37,7 @@ static bool init_copy_one_irq_desc(int irq, struct irq_desc *old_desc, | |||
37 | struct irq_desc *desc, int cpu) | 37 | struct irq_desc *desc, int cpu) |
38 | { | 38 | { |
39 | memcpy(desc, old_desc, sizeof(struct irq_desc)); | 39 | memcpy(desc, old_desc, sizeof(struct irq_desc)); |
40 | if (!init_alloc_desc_masks(desc, cpu, false)) { | 40 | if (!alloc_desc_masks(desc, cpu, false)) { |
41 | printk(KERN_ERR "irq %d: can not get new irq_desc cpumask " | 41 | printk(KERN_ERR "irq %d: can not get new irq_desc cpumask " |
42 | "for migration.\n", irq); | 42 | "for migration.\n", irq); |
43 | return false; | 43 | return false; |