Re: [RFC][PATCH v7 2/2]trace,x86: code-sharing between non-traceand trace irq handlers

From: Steven Rostedt
Date: Tue Jan 15 2013 - 20:36:25 EST


On Thu, 2013-01-10 at 17:33 +0000, Seiji Aguchi wrote:
> diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
> index 624ef3f..580aa93 100644
> --- a/include/linux/hardirq.h
> +++ b/include/linux/hardirq.h
> @@ -6,6 +6,7 @@
> #include <linux/ftrace_irq.h>
> #include <linux/vtime.h>
> #include <asm/hardirq.h>
> +#include <asm/idle.h>
>
> /*
> * We put the hardirq and softirq counter into the preemption
> @@ -198,4 +199,28 @@ extern void irq_exit(void);
> ftrace_nmi_exit(); \
> } while (0)
>
> +static inline void entering_irq(void)
> +{
> + irq_enter();
> + exit_idle();
> +}
> +
> +static inline void entering_ack_irq(void)
> +{
> + ack_APIC_irq();
> + entering_irq();
> +}
> +
> +static inline void exiting_irq(void)
> +{
> + irq_exit();
> +}
> +
> +static inline void exiting_ack_irq(void)
> +{
> + irq_exit();
> + /* Ack only at the end to avoid potential reentry */
> + ack_APIC_irq();
> +}

Shouldn't these be in a x86 specific header? Not a generic header like
hardirq.h. I don't think other archs will be doing an ack_APIC_irq(), as
it's only defined in x86. Why not add these to
arch/x86/include/asm/apic.h ?

-- Steve

> +
> #endif /* LINUX_HARDIRQ_H */
> -- 1.7.1


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