On Tue, 23 Oct 2007 07:21:28 +0200 (CEST)
Thomas Gleixner <email@example.com> wrote:
> On Tue, 23 Oct 2007, Atsushi Nemoto wrote:
> > Added Thomas Gleixner for CC list.
> > On Tue, 23 Oct 2007 11:15:58 +0900, Yoichi Yuasa
> > <firstname.lastname@example.org> wrote:
> > > > > > These clockevent routines are always called with interrupt disabled,
> > > > > > so I suppose those spin_lock_irqsave/spin_unlock_irqrestore pairs
> > > > > > can
> > > > > > be omitted. (or this timer can be used on SMP?)
> > > > >
> > > > > Yes, it can be used on Malta(SMP).
> > > >
> > > > Then spin_lock()/spin_unlock() is enough, isn't it?
> > >
> > > The timer control register(GT_TC_CONTROL_OFS) is shared with 4 timers.
> > > The 4 timers are connected with separate IRQ.
> > >
> > > clockevents_program_event() and clockevents_set_mode() can be called from
> > > anywhere(in the kernel).
> > >
> > > I think that it's necessary for it.
> > Hmm... clockevents_set_mode() must be called with interrupt disabled
> > as stated in its comment. There are no such a comment for
> > clockevents_program_event(), but it is always called with interrupt
> > disabled if the interrupt for the event was registered with
> > IRQF_DISABLED flag.
> > I agree that saving/restoring irq_flag would be safer, but I think it
> > can be omitted at least for now.
> > If clockevents_program_event() could be called with interrupt enabled,
> > mips_next_event() in cevt-r4k.c should be fixed.
> > Thomas, clockevents_program_event() (or ->set_next_event() method for
> > clock_event_device) is supposed to be called with interrupt enabled?
> Actually all call sites have interrupts disabled right now and I can
> not think of a reason why we would ever call with interrupts
> enabled. Time to add some comment.
OK, I'll update GT641xx clockevent.
Thanks Nemoto-san and Thomas,