hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/irqchip/irq-bcm6345-l1.c
....@@ -82,6 +82,7 @@
8282 };
8383
8484 struct bcm6345_l1_cpu {
85
+ struct bcm6345_l1_chip *intc;
8586 void __iomem *map_base;
8687 unsigned int parent_irq;
8788 u32 enable_cache[];
....@@ -115,16 +116,10 @@
115116
116117 static void bcm6345_l1_irq_handle(struct irq_desc *desc)
117118 {
118
- struct bcm6345_l1_chip *intc = irq_desc_get_handler_data(desc);
119
- struct bcm6345_l1_cpu *cpu;
119
+ struct bcm6345_l1_cpu *cpu = irq_desc_get_handler_data(desc);
120
+ struct bcm6345_l1_chip *intc = cpu->intc;
120121 struct irq_chip *chip = irq_desc_get_chip(desc);
121122 unsigned int idx;
122
-
123
-#ifdef CONFIG_SMP
124
- cpu = intc->cpus[cpu_logical_map(smp_processor_id())];
125
-#else
126
- cpu = intc->cpus[0];
127
-#endif
128123
129124 chained_irq_enter(chip, desc);
130125
....@@ -257,6 +252,7 @@
257252 if (!cpu)
258253 return -ENOMEM;
259254
255
+ cpu->intc = intc;
260256 cpu->map_base = ioremap(res.start, sz);
261257 if (!cpu->map_base)
262258 return -ENOMEM;
....@@ -272,7 +268,7 @@
272268 return -EINVAL;
273269 }
274270 irq_set_chained_handler_and_data(cpu->parent_irq,
275
- bcm6345_l1_irq_handle, intc);
271
+ bcm6345_l1_irq_handle, cpu);
276272
277273 return 0;
278274 }