[PATCHv2 02/10] ARM: vic: MULTI_IRQ_HANDLER handler

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Nov 3 00:40:24 EST 2011


On Thu, Sep 29, 2011 at 10:30:09AM +0100, Jamie Iles wrote:
> +#ifdef CONFIG_MULTI_IRQ_HANDLER
> +static void vic_single_handle_irq(struct vic_device *vic, struct pt_regs *regs)
> +{
> +	u32 stat, irq;
> +
> +	stat = readl_relaxed(vic->base + VIC_IRQ_STATUS);
> +	while (stat) {
> +		irq = ffs(stat) - 1;
> +		handle_IRQ(irq_domain_to_irq(&vic->domain, irq), regs);
> +		stat &= ~(1 << irq);
> +	}
> +}
> +
> +asmlinkage void __exception_irq_entry vic_handle_irq(struct pt_regs *regs)
> +{
> +	int i;
> +
> +	for (i = 0; i < vic_id; ++i)
> +		vic_single_handle_irq(&vic_devices[i], regs);
> +}

And if we receive another interrupt after the read of the register, we'll
have to exit all the way back (possibly to userspace) before re-entering
the IRQ handling paths back to this point to process it.

Is there any particular reason folk are destroying the built-in efficiency
of the IRQ handling which is common-place in the existing assembly
approach?


More information about the devicetree-discuss mailing list