[PATCHv2 02/10] ARM: vic: MULTI_IRQ_HANDLER handler
Nicolas Pitre
nicolas.pitre at linaro.org
Thu Nov 3 09:49:55 EDT 2011
On Thu, 3 Nov 2011, Russell King - ARM Linux wrote:
> stat = readl_relaxed(vic->base + VIC_IRQ_STATUS);
> while (stat) {
> while (stat) {
> irq = ffs(stat) - 1;
> stat &= ~(1 << irq);
> handle_irq(irq);
> }
> stat = readl_relaxed(vic->base + VIC_IRQ_STATUS);
> }
The inner loop could be a do { } while() construct to avoid evaluating
stat twice on each outer loop itteration. Maybe gcc is smart enough to
notice though, maybe not.
Nicolas
More information about the linux-arm-kernel
mailing list