Skip to content

Commit

Permalink
xtensa: clear timer IRQ unconditionally in its handler
Browse files Browse the repository at this point in the history
PIC irq_ack doesn't clear timer IRQ, because timer interrupt handler
usually set up new timer by writing to ccompare register and thus
clearing timer IRQ. However timer may not be set up in the IRQ handler,
e.g. with tickless idle on SMP, or when CPU is going offline, leaving
timer IRQ raised and making do_interrupt attempting to handle it
forever.

To fix this always write current value of ccompare SR chosen to be linux
timer back to that SR on entry to timer interrupt handler.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
  • Loading branch information
Max Filippov authored and Chris Zankel committed Jan 14, 2014
1 parent 9962323 commit bae07f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/xtensa/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
{
struct clock_event_device *evt = &this_cpu_ptr(&ccount_timer)->evt;

set_linux_timer(get_linux_timer());
evt->event_handler(evt);

/* Allow platform to do something useful (Wdog). */
Expand Down

0 comments on commit bae07f8

Please sign in to comment.