Skip to content

Commit

Permalink
Blackfin: time-ts: ack gptimer sooner to avoid missing short ints
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Frysinger committed Apr 13, 2011
1 parent ce24ee4 commit 0bf02ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/blackfin/kernel/time-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0bf02ce

Please sign in to comment.