Subject: [PATCH v5 06/27] irq_domain/powerpc: eliminate irq_map; use irq_alloc_desc() instead

From: [email-masked] (Andreas Schwab)
Date: Thu, 05 Apr 2012 12:51:27 +0200

Grant Likely <[email-masked]> writes:

> I bet it is NR_IRQS related.  You have SPARSE_IRQ enabled, which means
> the maximum number of irq_descs is IRQ_BITMAP_BITS (NR_IRQS + 8192).

The actual definition uses NR_IRQS + 8196.  Guess that's a typo.  (Does
it really make sense to add NR_IRQS here?)

> diff --git a/arch/powerpc/include/asm/irq.h b/arch/powerpc/include/asm/irq.h
> index cf417e51..9edf499 100644
> --- a/arch/powerpc/include/asm/irq.h
> +++ b/arch/powerpc/include/asm/irq.h
> @@ -20,7 +20,7 @@
>  
>  /* Define a way to iterate across irqs. */
>  #define for_each_irq(i) \
> -       for ((i) = 0; (i) < NR_IRQS; ++(i))
> +       for ((i) = 0; (i) < nr_irqs; ++(i))

There are exactly two uses of for_each_irq, one is related to cpu
hotplug, the other to kexec, so that cannot make any difference.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."