Skip to content

Commit e51e07e

Browse files
tkhaidavem330
authored andcommitted
sparc32: forced setting of mode of sun4m per-cpu timers
SUN4M per-cpu timers have two modes of work. These are timer mode and counter mode. Kernel doesn't write anything to the register, which is connected with mode choice. So, the mode is chosen by bootloader. This patch forces to use timer mode from the kernel and to be independent of bootloader. I had this problem with OpenBIOS. Timers don't tick and kernel fails on QEMU, when it's compiled with SMP support. The patch fixes problem. Signed-off-by: Tkhai Kirill <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7b3480f commit e51e07e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/sparc/kernel/sun4m_irq.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,9 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn)
399399
timers_global = (void __iomem *)
400400
(unsigned long) addr[num_cpu_timers];
401401

402+
/* Every per-cpu timer works in timer mode */
403+
sbus_writel(0x00000000, &timers_global->timer_config);
404+
402405
sbus_writel((((1000000/HZ) + 1) << 10), &timers_global->l10_limit);
403406

404407
master_l10_counter = &timers_global->l10_count;

0 commit comments

Comments
 (0)