From: Magnus D. <mag...@gm...> - 2007-07-18 02:40:28
|
On 7/18/07, Paul Mundt <le...@li...> wrote: > On Wed, Jul 18, 2007 at 10:23:05AM +0900, Magnus Damm wrote: > > --- 0001/arch/sh/kernel/irq.c > > +++ work/arch/sh/kernel/irq.c 2007-07-17 17:01:58.000000000 +0900 > > @@ -254,12 +254,9 @@ void __init init_IRQ(void) > > init_IRQ_pint(); > > #endif > > > > -#ifdef CONFIG_CPU_HAS_INTC2_IRQ > > - init_IRQ_intc2(); > > -#endif > > - > > -#ifdef CONFIG_CPU_HAS_IPR_IRQ > > - init_IRQ_ipr(); > > +#if defined(CONFIG_CPU_HAS_INTC2_IRQ) || defined(CONFIG_CPU_HAS_INTC2_IRQ) || \ > > + defined(CONFIG_CPU_HAS_INTC_IRQ) > > + plat_irq_setup(); > > #endif > > > > Eek. How about a weak dummy symbol instead? You've also double-cased > CPU_HAS_INTC2_IRQ, whereas I assume you meant to make one of them > CPU_HAS_IPR_IRQ. On the other hand, is it really a valid state for any > CPU not to have at least one of INTC2/INTC/IPR? In which case, make the > reference to the symbol explicit, and let the linker whine. Yeah, both ugly and incorrect - great. Sorry about that. I was thinking along the lines of a weak dummy symbol, but then I hesitated because I didn't know if it was needed at all. And then I looked at for instance setup-sh7300.c which doesn't seem to have any interrupt controller setup code at all... I guess the best solution is to require plat_irq_setup() to be present and fix the broken platforms. Thanks. / magnus |