/* * Routines to acknowledge, disable and enable interrupts */ static void gic_ack_irq(unsigned int irq) { spin_lock(&irq_controller_lock); #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ u32 mask = 1 << (irq % 32); /* * Linux assumes that when we're done with an interrupt we need to * unmask it, in the same way we need to unmask an interrupt when * we first enable it. * * The GIC has a separate notion of "end of interrupt" to re-enable * an interrupt after handling, in order to support hardware * prioritisation. * * We can make the GIC behave in the way that Linux expects by making * our "acknowledge" routine disable the interrupt, then mark it as * complete. */ writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4); #endif writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI); spin_unlock(&irq_controller_lock); }
/* * Routines to acknowledge, disable and enable interrupts */ static void gic_ack_irq(unsigned int irq) { spin_lock(&irq_controller_lock); writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI); spin_unlock(&irq_controller_lock); }
static void gic_mask_ack_irq(unsigned int irq) { u32 mask = 1 << (irq % 32); spin_lock(&irq_controller_lock); writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4); writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI); spin_unlock(&irq_controller_lock); }
void gic_ack_irq(unsigned int irq) { u32 mask = 1 << (irq % 32); spin_lock(&irq_controller_lock); mmio_writel(mask, gic_dist_base(irq) + ICDICER + (gic_irq(irq) / 32) * 4); mmio_writel(gic_irq(irq), gic_cpu_base(irq) + ICCEOIR); spin_unlock(&irq_controller_lock); }
static void gic_eoi_irq(struct irq_data *d) { if (gic_arch_extn.irq_eoi) { raw_spin_lock(&irq_controller_lock); gic_arch_extn.irq_eoi(d); raw_spin_unlock(&irq_controller_lock); } writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); }
static void gic_ack_irq(unsigned int irq) { spin_lock(&irq_controller_lock); #ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ u32 mask = 1 << (irq % 32); writel(mask, gic_dist_base(irq) + GIC_DIST_ENABLE_CLEAR + (gic_irq(irq) / 32) * 4); #endif writel(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI); spin_unlock(&irq_controller_lock); }
void gic_eoi_irq(struct vmm_host_irq *irq) { gic_write(gic_irq(irq), gic_cpu_base(irq) + GIC_CPU_EOI); }