Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589720

Re: [PATCH v3 04/25] clocksource: Add Owl timer

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v3 04/25] clocksource: Add Owl timer
Date 2017-02-28 20:40 +0100
Message-ID <tfVMS-oA-25@gated-at.bofh.it> (permalink)
References <tfJLI-GX-3@gated-at.bofh.it> <tfJVp-Kr-31@gated-at.bofh.it> <tfTrI-7ry-19@gated-at.bofh.it> <tfTrI-7ry-17@gated-at.bofh.it> <tfU4p-7JC-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, 28 Feb 2017, Daniel Lezcano wrote:
> On Tue, Feb 28, 2017 at 06:08:06PM +0100, Andreas Färber wrote:
> > >> +static irqreturn_t owl_timer1_interrupt(int irq, void *dev_id)
> > >> +{
> > >> +	struct clock_event_device *evt = (struct clock_event_device *)dev_id;
> > >> +
> > >> +	writel(OWL_Tx_CTL_PD, owl_timer_get_base(1) + OWL_Tx_CTL);
> > >> +
> > >> +	evt->event_handler(evt);
> > 
> > Is there any guideline as to whether to clear such flag before or after?
> 
> Mmh, good question. I'm not sure it makes a different.

It makes a difference depending on what this flag does. If it clears the
current pending interrupt, then you _must_ do it before rearming the
timer. Otherwise you might clear the pending interrupt of the rearmed timer
(when the timeout is very small) which makes the machine wait forever for
the next timer interrupt.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 04/25] clocksource: Add Owl timer Andreas Färber <afaerber@suse.de> - 2017-02-28 08:00 +0100
  Re: [PATCH v3 04/25] clocksource: Add Owl timer Andreas Färber <afaerber@suse.de> - 2017-02-28 18:10 +0100
    Re: [PATCH v3 04/25] clocksource: Add Owl timer Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-02-28 18:50 +0100
      Re: [PATCH v3 04/25] clocksource: Add Owl timer Andreas Färber <afaerber@suse.de> - 2017-02-28 19:20 +0100
        Re: [PATCH v3 04/25] clocksource: Add Owl timer Thomas Gleixner <tglx@linutronix.de> - 2017-02-28 21:40 +0100
      Re: [PATCH v3 04/25] clocksource: Add Owl timer Thomas Gleixner <tglx@linutronix.de> - 2017-02-28 20:40 +0100
  Re: [PATCH v3 04/25] clocksource: Add Owl timer Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-02-28 20:00 +0100

csiph-web