lkml.org 
[lkml]   [2013]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v14 2/3] trace,x86: Introduce entering/exiting_irq()
Date


> -----Original Message-----
> From: Steven Rostedt [mailto:rostedt@goodmis.org]
> Sent: Thursday, June 06, 2013 2:26 PM
> To: Seiji Aguchi
> Cc: linux-kernel@vger.kernel.org; hpa@zytor.com; tglx@linutronix.de; mingo@elte.hu; bp@alien8.de; linux-edac@vger.kernel.org;
> tony.luck@intel.com; dle-develop@lists.sourceforge.net; 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
>

\
 
 \ /
  Last update: 2013-06-06 23:21    [W:0.065 / U:3.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site