/* 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.  */
static void gic_ack_irq(unsigned int irq)
/* 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.  */
static void gic_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);
}