[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 6 Jun 2013 20:51:07 +0000
From: Seiji Aguchi <seiji.aguchi@....com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"hpa@...or.com" <hpa@...or.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...e.hu" <mingo@...e.hu>, "bp@...en8.de" <bp@...en8.de>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"tony.luck@...el.com" <tony.luck@...el.com>,
"dle-develop@...ts.sourceforge.net"
<dle-develop@...ts.sourceforge.net>,
Tomoki Sekiyama <tomoki.sekiyama@....com>
Subject: RE: [PATCH v14 2/3] trace,x86: Introduce entering/exiting_irq()
> -----Original Message-----
> From: Steven Rostedt [mailto:rostedt@...dmis.org]
> Sent: Thursday, June 06, 2013 2:26 PM
> To: Seiji Aguchi
> 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
> 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
>
Powered by blists - more mailing lists