]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Blackfin: time-ts: ack gptimer sooner to avoid missing short ints
authorMike Frysinger <vapier@gentoo.org>
Mon, 4 Apr 2011 15:26:11 +0000 (15:26 +0000)
committerMike Frysinger <vapier@gentoo.org>
Wed, 13 Apr 2011 23:34:05 +0000 (19:34 -0400)
If the period of a gptimer is fairly low, we might miss an interrupt
by acking it too late (we end up acking the new int as well).

Reported-by: Isabelle Leonardi <i.leonardi@detracom.fr>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/blackfin/kernel/time-ts.c

index 8c9a43daf80fad1f4ecaec62f25ea0778cc2be94..cdb4beb6bc8fc9507bf0531317b8b834eca9d4c8 100644 (file)
@@ -206,8 +206,14 @@ irqreturn_t bfin_gptmr0_interrupt(int irq, void *dev_id)
 {
        struct clock_event_device *evt = dev_id;
        smp_mb();
-       evt->event_handler(evt);
+       /*
+        * We want to ACK before we handle so that we can handle smaller timer
+        * intervals.  This way if the timer expires again while we're handling
+        * things, we're more likely to see that 2nd int rather than swallowing
+        * it by ACKing the int at the end of this handler.
+        */
        bfin_gptmr0_ack();
+       evt->event_handler(evt);
        return IRQ_HANDLED;
 }