[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 06 Jun 2013 14:26:13 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Seiji Aguchi <seiji.aguchi@....com>
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, tglx@...utronix.de,
mingo@...e.hu, bp@...en8.de, linux-edac@...r.kernel.org,
tony.luck@...el.com, dle-develop@...ts.sourceforge.net,
tomoki.sekiyama@....com
Subject: Re: [PATCH v14 2/3] trace,x86: Introduce entering/exiting_irq()
On Thu, 2013-06-06 at 11:23 -0400, Seiji Aguchi wrote:
> ---
> arch/x86/include/asm/apic.h | 27 +++++++++++++++++++++++++++
> 1 files changed, 27 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> index 3388034..f8119b5 100644
> --- a/arch/x86/include/asm/apic.h
> +++ b/arch/x86/include/asm/apic.h
> @@ -12,6 +12,7 @@
> #include <asm/fixmap.h>
> #include <asm/mpspec.h>
> #include <asm/msr.h>
> +#include <asm/idle.h>
>
> #define ARCH_APICTIMER_STOPS_ON_C3 1
>
> @@ -687,5 +688,31 @@ extern int default_check_phys_apicid_present(int phys_apicid);
> #endif
>
> #endif /* CONFIG_X86_LOCAL_APIC */
> +extern void irq_enter(void);
> +extern void irq_exit(void);
> +
> +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();
> +}
>
> #endif /* _ASM_X86_APIC_H */
I think it also makes sense to use these in this patch as well. That is,
go ahead and make the changes likes this:
@@ -919,17 +919,14 @@ void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs)
/*
* NOTE! We'd better ACK the irq immediately,
* because timer handling can be slow.
- */
- ack_APIC_irq();
- /*
+ *
* update_process_times() expects us to have done irq_enter().
* Besides, if we don't timer interrupts ignore the global
* interrupt lock, which is the WrongThing (tm) to do.
*/
- irq_enter();
- exit_idle();
+ entering_ack_irq();
local_apic_timer_interrupt();
- irq_exit();
+ exiting_irq();
set_irq_regs(old_regs);
}
And do that with all the interrupts.
I think this is getting close for adding to 3.11 queue.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists