Skip to content

Commit

Permalink
m68k: sun3/sun3c: use legacy_timer_tick
Browse files Browse the repository at this point in the history
These two are different from all other machines:

* sun3 does not call timer_routine() but open-codes it
  except for the profile_tick() call that appears to
  be unintentionally missing.

* sun3x has a commented-out timer irq handler but no
  functional timer tick I could find.

Change both to calling the new legacy_timer_tick here,
which includes the call to profile_tick() but does not
fix sun3x as that is still commented out.

Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
arndb committed Oct 30, 2020
1 parent d644409 commit 4a1c287
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions arch/m68k/Kconfig.machine
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ config HP300
config SUN3X
bool "Sun3x support"
depends on MMU
select LEGACY_TIMER_TICK
select MMU_MOTOROLA if MMU
select M68030
help
Expand Down Expand Up @@ -126,6 +127,7 @@ config SUN3
depends on MMU
depends on !MMU_MOTOROLA
select MMU_SUN3 if MMU
select LEGACY_TIMER_TICK
select NO_DMA
select M68020
help
Expand Down
3 changes: 1 addition & 2 deletions arch/m68k/sun3/sun3ints.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ static irqreturn_t sun3_int5(int irq, void *dev_id)
#ifdef CONFIG_SUN3
intersil_clear();
#endif
xtime_update(1);
update_process_times(user_mode(get_irq_regs()));
legacy_timer_tick(1);
cnt = kstat_irqs_cpu(irq, 0);
if (!(cnt % 20))
sun3_leds(led_pattern[cnt % 160 / 20]);
Expand Down
3 changes: 1 addition & 2 deletions arch/m68k/sun3x/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@ int sun3x_hwclk(int set, struct rtc_time *t)
#if 0
static irqreturn_t sun3x_timer_tick(int irq, void *dev_id)
{
irq_handler_t timer_routine = dev_id;
unsigned long flags;

local_irq_save(flags);
/* Clear the pending interrupt - pulse the enable line low */
disable_irq(5);
enable_irq(5);
timer_routine(0, NULL);
legacy_timer_tick(1);
local_irq_restore(flags);

return IRQ_HANDLED;
Expand Down

0 comments on commit 4a1c287

Please sign in to comment.