lkml.org 
[lkml]   [2007]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/9] irq-remove: core
Date
Jeff Garzik <jeff@garzik.org> writes:

> commit 008b5fcf3c1d8456005de26ddd4256b1369225e8
> Author: Jeff Garzik <jeff@garzik.org>
> Date: Fri Oct 19 00:45:51 2007 -0400
>
> [IRQ ARG REMOVAL] core interrupt delivery infrastructure updates
>
> include/asm-generic/irq_regs.h | 25 +++++++++++++++++++++++++
> include/linux/interrupt.h | 4 ++--
> kernel/irq/handle.c | 5 +++--
> kernel/irq/manage.c | 4 ++--
> kernel/irq/spurious.c | 3 ++-
> lib/irq_regs.c | 5 +++++
> 6 files changed, 39 insertions(+), 7 deletions(-)
>
> 008b5fcf3c1d8456005de26ddd4256b1369225e8
> diff --git a/include/asm-generic/irq_regs.h b/include/asm-generic/irq_regs.h
> index 5ae1d07..1d99ef4 100644
> --- a/include/asm-generic/irq_regs.h
> +++ b/include/asm-generic/irq_regs.h
> @@ -34,4 +34,29 @@ static inline struct pt_regs *set_irq_regs(struct pt_regs
> *new_regs)
> return old_regs;
> }
>
> +DECLARE_PER_CPU(unsigned int, __irqfunc_irqs);
> +
> +static inline unsigned int get_irqfunc_irq(void)
> +{
> + return __get_cpu_var(__irqfunc_irqs);
> +}
> +
> +#if 0
> +static inline unsigned int set_irqfunc_irq(unsigned int new_irq)
> +{
> + unsigned int old_irq, *pirq = &__get_cpu_var(__irqfunc_irqs);
> +
> + old_irq = *pirq;
> + *pirq = new_irq;
> + return old_irq;
> +}
> +#else
> +static inline void set_irqfunc_irq(unsigned int new_irq)
> +{
> + int *pirq = &__get_cpu_var(__irqfunc_irqs);
> +
> + *pirq = new_irq;
> +}
> +#endif

Please look at handle_IRQ_event. Local irqs are enabled so irq
recursion can happen. So not handling old_irq is a big nasty
bug.

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

\
 
 \ /
  Last update: 2007-10-19 20:07    [from the cache]
©2003-2011 Jasper Spaans