Messages in this thread | | | Date | Sun, 21 Dec 2008 19:22:34 +0100 (CET) | From | Thomas Gleixner <> | Subject | Re: [PATCH 1/2 v5] SGI RTC: add generic timer system interrupt |
| |
On Fri, 19 Dec 2008, Dimitri Sivanich wrote: > This patch allocates a system interrupt vector for platform specific use > in implementing timer interrupts.
Why is this restricted to timer interrupts. That's simply a dynamic allocation of an interrupt vector.
> + > +/* Function pointer for generic timer interrupt handling */ > +static void (*generic_timer_interrupt_extension)(void); > + > +int > +register_generic_timer_extension(void (*fn)(void))
One line. All over the place.
> +{ > + if (generic_timer_interrupt_extension) > + return 1;
-EBUSY perhaps ?
> + generic_timer_interrupt_extension = fn; > + return 0; > +} > +EXPORT_SYMBOL_GPL(register_generic_timer_extension); > + > +void > +unregister_generic_timer_extension(void) > +{ > + if (generic_timer_interrupt_extension) > + generic_timer_interrupt_extension = NULL; > +} > +EXPORT_SYMBOL_GPL(unregister_generic_timer_extension); > + > +void smp_generic_timer_interrupt(struct pt_regs *regs) > +{ > + struct pt_regs *old_regs = set_irq_regs(regs); > + > + ack_APIC_irq(); > + > + exit_idle(); > + > + irq_enter(); > + > + if (generic_timer_interrupt_extension) > + generic_timer_interrupt_extension();
interrupt statistics are missing.
> + irq_exit(); > + > + set_irq_regs(old_regs); > +} > +
Thanks,
tglx
| |