diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-08-26 19:20:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-29 09:53:00 -0400 |
commit | 372e24b0cb764ec55b4cf3408a95ae40a29e5b96 (patch) | |
tree | ee8b1e26ec723e509f6478898f4cfbd826aac5f2 | |
parent | 31b47cf7609288893a10706c648faa932c7aef90 (diff) |
irq: Make sure irq_desc for legacy irq get correct node setting
when there is no ram on node 0.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
LKML-Reference: <4A95C32D.5040605@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | kernel/irq/handle.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 065205bdd920..a81cf80554db 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -161,7 +161,7 @@ int __init early_irq_init(void) | |||
161 | 161 | ||
162 | desc = irq_desc_legacy; | 162 | desc = irq_desc_legacy; |
163 | legacy_count = ARRAY_SIZE(irq_desc_legacy); | 163 | legacy_count = ARRAY_SIZE(irq_desc_legacy); |
164 | node = first_online_node; | 164 | node = first_online_node; |
165 | 165 | ||
166 | /* allocate irq_desc_ptrs array based on nr_irqs */ | 166 | /* allocate irq_desc_ptrs array based on nr_irqs */ |
167 | irq_desc_ptrs = kcalloc(nr_irqs, sizeof(void *), GFP_NOWAIT); | 167 | irq_desc_ptrs = kcalloc(nr_irqs, sizeof(void *), GFP_NOWAIT); |
@@ -172,6 +172,9 @@ int __init early_irq_init(void) | |||
172 | 172 | ||
173 | for (i = 0; i < legacy_count; i++) { | 173 | for (i = 0; i < legacy_count; i++) { |
174 | desc[i].irq = i; | 174 | desc[i].irq = i; |
175 | #ifdef CONFIG_SMP | ||
176 | desc[i].node = node; | ||
177 | #endif | ||
175 | desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids; | 178 | desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids; |
176 | lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); | 179 | lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); |
177 | alloc_desc_masks(&desc[i], node, true); | 180 | alloc_desc_masks(&desc[i], node, true); |