[PATCHv2 02/10] ARM: vic: MULTI_IRQ_HANDLER handler
Nicolas Pitre
nicolas.pitre at linaro.org
Fri Nov 4 00:49:55 EST 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 devicetree-discuss
mailing list