RE: [PATCH v14 2/3] trace,x86: Introduce entering/exiting_irq()
From: Seiji Aguchi
Date: Thu Jun 06 2013 - 16:52:12 EST
> -----Original Message-----
> From: Steven Rostedt [mailto:rostedt@xxxxxxxxxxx]
> Sent: Thursday, June 06, 2013 2:26 PM
> To: Seiji Aguchi
> Cc: linux-kernel@xxxxxxxxxxxxxxx; hpa@xxxxxxxxx; tglx@xxxxxxxxxxxxx; mingo@xxxxxxx; bp@xxxxxxxxx; linux-edac@xxxxxxxxxxxxxxx;
> tony.luck@xxxxxxxxx; dle-develop@xxxxxxxxxxxxxxxxxxxxx; Tomoki Sekiyama
> 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.
OK. Will do.
Seiji
>
> I think this is getting close for adding to 3.11 queue.
>
> -- Steve
>
N§²æìr¸yúèØb²X¬¶ÇvØ^)Þ{.nÇ+·¥{±êçzX§¶¡Ü}©²ÆzÚ&j:+v¨¾«êçzZ+Ê+zf£¢·h§~Ûiÿûàz¹®w¥¢¸?¨èÚ&¢)ßfù^jÇy§m
á@A«a¶Úÿ0¶ìh®åi