Re: [patch v2 17/35] Hexagon: Add interrupts

From: Arnd Bergmann
Date: Wed Aug 31 2011 - 09:50:31 EST


On Tuesday 30 August 2011, Richard Kuo wrote:
> Signed-off-by: Richard Kuo <rkuo@xxxxxxxxxxxxxx>

Acked-by: Arnd Bergmann <arnd@xxxxxxxx>

> +
> +/* Number of first-level interrupts associated with the CPU core. */
> +#define HEXAGON_CPUINTS 32
> +
> +/*
> + * XXX TODO FIXME this should be pulled from a platform file!
> + * Must define NR_IRQS before including <asm-generic/irq.h>
> + * 64 == the two SIRC's, 176 == the two gpio's
> + */
> +#define NR_IRQS (HEXAGON_CPUINTS + 64 + 176)

I disagree with that comment: NR_IRQS is a constant and should
not be platform specific. There should be no compile-time settings
that are strictly specific to one platform, otherwise you are not
able to run the same kernel on multiple platforms, which is very
valuable for testing purposes.

Just make the constant large enough to always fit. Use sparse IRQs
if necessary.

> +#include <asm-generic/irq.h>
> +
> +extern void __init hexagon_cpu_irq_init(void);
> +

I don't think you actually need to declare hexagon_cpu_irq_init(), just
rename that function to init_IRQ() and remove the wrapper.

Arnd
--
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/