diff options
author | Tkhai Kirill <tkhai@yandex.ru> | 2012-01-10 13:17:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-10 16:28:24 -0800 |
commit | e51e07e0ac7e3ff847d640f41b7527db04d4a4e7 (patch) | |
tree | 1cd232b43e4b80f5e8881d802949a02a29b4ceda /arch/sparc | |
parent | 7b3480f8b701170c046e1ed362946f5f0d005e13 (diff) | |
download | op-kernel-dev-e51e07e0ac7e3ff847d640f41b7527db04d4a4e7.zip op-kernel-dev-e51e07e0ac7e3ff847d640f41b7527db04d4a4e7.tar.gz |
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 <tkhai@yandex.ru>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/sun4m_irq.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index 422c16d..e611651 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c @@ -399,6 +399,9 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn) timers_global = (void __iomem *) (unsigned long) addr[num_cpu_timers]; + /* Every per-cpu timer works in timer mode */ + sbus_writel(0x00000000, &timers_global->timer_config); + sbus_writel((((1000000/HZ) + 1) << 10), &timers_global->l10_limit); master_l10_counter = &timers_global->l10_count; |