Re: [PATCH 00/33] dyn_array and nr_irqs support v4

From: Yinghai Lu
Date: Wed Aug 06 2008 - 16:58:34 EST


On Wed, Aug 6, 2008 at 1:35 PM, Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
> "Yinghai Lu" <yhlu.kernel@xxxxxxxxx> writes:
>
>>> My suggestion for a non-breaking path:
>>> - Kill NR_IRQS in then generic code.
>>> With Alan's serial patch and my kstat patch it looks like we have
>>> the worst of that.
>>
>> will use Alan's patch.at first.
>> already reused your patch about kstat. and move kstat_irqs to irq_desc.
>
> Part of what I am thinking is that there should never be a patch
> that does s/NR_IRQS/nr_irqs/ that is just pointless noise.

for some platform like 32bit, may not like to mess up with
CONFIG_HAVE_SPARSE_IRQ, to have dyn_array to take small nr_irqs with
probing.

>
> Either we need a new abstraction like for_each_irq or to update the
> code to the current best practices.

already add for_each_irq_desc(irq, desc)...

| #ifndef CONFIG_HAVE_DYN_ARRAY
| /* could be removed if we get rid of all irq_desc reference */
| extern struct irq_desc irq_desc[NR_IRQS];
| #else
| extern struct irq_desc *irq_desc;
| #endif
|
| #define for_each_irq_desc(irq, desc) \
| for (irq = 0, desc = irq_desc; irq < nr_irqs; irq++, desc =
&irq_desc[irq])
|
|#else
|
|extern struct irq_desc *irq_descX;
|#define for_each_irq_desc(irqX, desc) \
| for (desc = irq_descX, irqX = desc->irq; desc && irqX != -1U;
desc = desc->next, irqX = desc ? desc->irq: -1U)
|
|#endif


>
> Which means the patches should be uncontroversial and mergeble on their
> own with no weird dependencies.

sure.

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/