Skip to content

Commit

Permalink
alpha: Shift perf event pending work earlier in timer interrupt
Browse files Browse the repository at this point in the history
Pending work from the performance event subsystem is executed in
the timer interrupt.  This patch shifts the call to
perf_event_do_pending() before the call to update_process_times()
as the latter may call back into the perf event subsystem and it
is prudent to have the pending work executed first.

Signed-off-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Matt Turner <mattst88@gmail.com>
  • Loading branch information
Michael Cree authored and Matt Turner committed Sep 19, 2010
1 parent 531f047 commit bdc8b89
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/alpha/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,16 @@ irqreturn_t timer_interrupt(int irq, void *dev)

write_sequnlock(&xtime_lock);

#ifndef CONFIG_SMP
while (nticks--)
update_process_times(user_mode(get_irq_regs()));
#endif

if (test_perf_event_pending()) {
clear_perf_event_pending();
perf_event_do_pending();
}

#ifndef CONFIG_SMP
while (nticks--)
update_process_times(user_mode(get_irq_regs()));
#endif

return IRQ_HANDLED;
}

Expand Down

0 comments on commit bdc8b89

Please sign in to comment.