Commit 372e24b0 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

irq: Make sure irq_desc for legacy irq get correct node setting

when there is no ram on node 0.
Signed-off-by: default avatarYinghai 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: default avatarIngo Molnar <mingo@elte.hu>
parent 31b47cf7
...@@ -161,7 +161,7 @@ int __init early_irq_init(void) ...@@ -161,7 +161,7 @@ int __init early_irq_init(void)
desc = irq_desc_legacy; desc = irq_desc_legacy;
legacy_count = ARRAY_SIZE(irq_desc_legacy); legacy_count = ARRAY_SIZE(irq_desc_legacy);
node = first_online_node; node = first_online_node;
/* allocate irq_desc_ptrs array based on nr_irqs */ /* allocate irq_desc_ptrs array based on nr_irqs */
irq_desc_ptrs = kcalloc(nr_irqs, sizeof(void *), GFP_NOWAIT); irq_desc_ptrs = kcalloc(nr_irqs, sizeof(void *), GFP_NOWAIT);
...@@ -172,6 +172,9 @@ int __init early_irq_init(void) ...@@ -172,6 +172,9 @@ int __init early_irq_init(void)
for (i = 0; i < legacy_count; i++) { for (i = 0; i < legacy_count; i++) {
desc[i].irq = i; desc[i].irq = i;
#ifdef CONFIG_SMP
desc[i].node = node;
#endif
desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids; desc[i].kstat_irqs = kstat_irqs_legacy + i * nr_cpu_ids;
lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
alloc_desc_masks(&desc[i], node, true); alloc_desc_masks(&desc[i], node, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment