Message ID | 20110611185524.GA1369@hiauly1.hia.nrc.ca (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
John David Anglin wrote: > The CPU irqs (timer and IPI) are not shared and only need to be claimed > once. A mismatch error occurs if they are claimed more than once. > > Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca> > Cc: Kyle McMartin <kyle@mcmartin.ca> > Cc: Helge Deller <deller@gmx.de> > Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> > > Dave It's a bad idea to put the patch behind your signature as it then get's stripped by mailers when replying. Anyway... > int i; > +#ifdef CONFIG_SMP > + static int irqs_claimed; > + if (irqs_claimed) > + return; > + irqs_claimed = 1; > +#endif Shouldn't this be bool then? Now that we have it. Eike
On Sat, 11 Jun 2011, Rolf Eike Beer wrote: > > int i; > > +#ifdef CONFIG_SMP > > + static int irqs_claimed; > > + if (irqs_claimed) > > + return; > > + irqs_claimed = 1; > > +#endif > > Shouldn't this be bool then? Now that we have it. Yes but I would like to here with this approach is acceptable. Another alternative might be a function init_IRQ_SMP that doesn't call claim_cpu_irqs. Dave
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index c0b1aff..8293704 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -393,6 +393,12 @@ static struct irqaction ipi_action = { static void claim_cpu_irqs(void) { int i; +#ifdef CONFIG_SMP + static int irqs_claimed; + if (irqs_claimed) + return; + irqs_claimed = 1; +#endif for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) { irq_set_chip_and_handler(i, &cpu_interrupt_type, handle_percpu_irq);
The CPU irqs (timer and IPI) are not shared and only need to be claimed once. A mismatch error occurs if they are claimed more than once. Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Dave