aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/handle.c')
-rw-r--r--kernel/irq/handle.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index c20db0be9173..b8fa1354f01c 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -64,9 +64,6 @@ static struct irq_desc irq_desc_init = {
64 .handle_irq = handle_bad_irq, 64 .handle_irq = handle_bad_irq,
65 .depth = 1, 65 .depth = 1,
66 .lock = __SPIN_LOCK_UNLOCKED(irq_desc_init.lock), 66 .lock = __SPIN_LOCK_UNLOCKED(irq_desc_init.lock),
67#ifdef CONFIG_SMP
68 .affinity = CPU_MASK_ALL
69#endif
70}; 67};
71 68
72void init_kstat_irqs(struct irq_desc *desc, int cpu, int nr) 69void init_kstat_irqs(struct irq_desc *desc, int cpu, int nr)
@@ -88,6 +85,8 @@ void init_kstat_irqs(struct irq_desc *desc, int cpu, int nr)
88 85
89static void init_one_irq_desc(int irq, struct irq_desc *desc, int cpu) 86static void init_one_irq_desc(int irq, struct irq_desc *desc, int cpu)
90{ 87{
88 int node = cpu_to_node(cpu);
89
91 memcpy(desc, &irq_desc_init, sizeof(struct irq_desc)); 90 memcpy(desc, &irq_desc_init, sizeof(struct irq_desc));
92 91
93 spin_lock_init(&desc->lock); 92 spin_lock_init(&desc->lock);
@@ -101,6 +100,10 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int cpu)
101 printk(KERN_ERR "can not alloc kstat_irqs\n"); 100 printk(KERN_ERR "can not alloc kstat_irqs\n");
102 BUG_ON(1); 101 BUG_ON(1);
103 } 102 }
103 if (!init_alloc_desc_masks(desc, node, false)) {
104 printk(KERN_ERR "can not alloc irq_desc cpumasks\n");
105 BUG_ON(1);
106 }
104 arch_init_chip_data(desc, cpu); 107 arch_init_chip_data(desc, cpu);
105} 108}
106 109
@@ -119,9 +122,6 @@ static struct irq_desc irq_desc_legacy[NR_IRQS_LEGACY] __cacheline_aligned_in_sm
119 .handle_irq = handle_bad_irq, 122 .handle_irq = handle_bad_irq,
120 .depth = 1, 123 .depth = 1,
121 .lock = __SPIN_LOCK_UNLOCKED(irq_desc_init.lock), 124 .lock = __SPIN_LOCK_UNLOCKED(irq_desc_init.lock),
122#ifdef CONFIG_SMP
123 .affinity = CPU_MASK_ALL
124#endif
125 } 125 }
126}; 126};
127 127
@@ -141,7 +141,7 @@ int __init early_irq_init(void)
141 desc[i].irq = i; 141 desc[i].irq = i;
142 desc[i].kstat_irqs = kstat_irqs_legacy[i]; 142 desc[i].kstat_irqs = kstat_irqs_legacy[i];
143 lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); 143 lockdep_set_class(&desc[i].lock, &irq_desc_lock_class);
144 144 init_alloc_desc_masks(&desc[i], 0, true);
145 irq_desc_ptrs[i] = desc + i; 145 irq_desc_ptrs[i] = desc + i;
146 } 146 }
147 147
@@ -188,6 +188,10 @@ struct irq_desc *irq_to_desc_alloc_cpu(unsigned int irq, int cpu)
188 printk(KERN_ERR "can not alloc irq_desc\n"); 188 printk(KERN_ERR "can not alloc irq_desc\n");
189 BUG_ON(1); 189 BUG_ON(1);
190 } 190 }
191 if (!init_alloc_desc_masks(desc, node, false)) {
192 printk(KERN_ERR "can not alloc irq_desc cpumasks\n");
193 BUG_ON(1);
194 }
191 init_one_irq_desc(irq, desc, cpu); 195 init_one_irq_desc(irq, desc, cpu);
192 196
193 irq_desc_ptrs[irq] = desc; 197 irq_desc_ptrs[irq] = desc;
@@ -207,9 +211,6 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
207 .handle_irq = handle_bad_irq, 211 .handle_irq = handle_bad_irq,
208 .depth = 1, 212 .depth = 1,
209 .lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock), 213 .lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock),
210#ifdef CONFIG_SMP
211 .affinity = CPU_MASK_ALL
212#endif
213 } 214 }
214}; 215};
215 216
@@ -222,9 +223,10 @@ int __init early_irq_init(void)
222 desc = irq_desc; 223 desc = irq_desc;
223 count = ARRAY_SIZE(irq_desc); 224 count = ARRAY_SIZE(irq_desc);
224 225
225 for (i = 0; i < count; i++) 226 for (i = 0; i < count; i++) {
226 desc[i].irq = i; 227 desc[i].irq = i;
227 228 init_alloc_desc_masks(&desc[i], 0, true);
229 }
228 return arch_early_irq_init(); 230 return arch_early_irq_init();
229} 231}
230 232