9 #include <linux/bitmap.h>
16 #include <asm/setup.h>
17 #include <asm/traps.h>
35 unsigned int vpe_pending;
56 static void gic_eic_irq_dispatch(
void)
71 static void __init vpe_local_setup(
unsigned int numvpes)
95 for (i = 0; i < numvpes; i++) {
105 gic_eic_irq_dispatch);
122 unsigned long *pending, *intrmask, *pcpu_mask;
123 unsigned long *pending_abs, *intrmask_abs;
136 GICREAD(*pending_abs, pending[i]);
137 GICREAD(*intrmask_abs, intrmask[i]);
148 static void gic_mask_irq(
struct irq_data *
d)
153 static void gic_unmask_irq(
struct irq_data *
d)
169 cpumask_and(&tmp, cpumask, cpu_online_mask);
186 spin_unlock_irqrestore(&gic_lock, flags);
192 static struct irq_chip gic_irq_controller = {
195 .irq_mask = gic_mask_irq,
196 .irq_mask_ack = gic_mask_irq,
197 .irq_unmask = gic_unmask_irq,
200 .irq_set_affinity = gic_set_affinity,
204 static void __init gic_setup_intr(
unsigned int intr,
unsigned int cpu,
205 unsigned int pin,
unsigned int polarity,
unsigned int trigtype,
214 for (cpu = 0; cpu <
NR_CPUS; cpu += 32) {
226 gic_eic_irq_dispatch);
244 set_bit(intr, pcpu_masks[cpu].pcpu_mask);
251 static void __init gic_basic_init(
int numintrs,
int numvpes,
255 unsigned int pin_offset = 0;
260 for (i = 0; i < numintrs; i++) {
279 for (i = 0; i < mapsize; i++) {
283 if (cpu == 0 && i != 0 && intrmap[i].flags == 0)
287 intrmap[i].pin + pin_offset,
293 vpe_local_setup(numvpes);
297 unsigned long gic_addrspace_size,
298 struct gic_intr_map *intr_map,
unsigned int intr_map_size,
299 unsigned int irqbase)
301 unsigned int gicconfig;
302 int numvpes, numintrs;
311 numintrs = ((numintrs + 1) * 8);
315 numvpes = numvpes + 1;
317 gic_basic_init(numintrs, numvpes, intr_map, intr_map_size);