]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
MIPS: Fixup of the r4k timer
authorWu Zhangjin <wuzhangjin@gmail.com>
Mon, 1 Feb 2010 09:10:55 +0000 (17:10 +0800)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 10 Feb 2010 21:15:42 +0000 (22:15 +0100)
As reported by Maxime Bizon, the commit "MIPS: PowerTV: Fix support for
timer interrupts with > 64 external IRQs" have broken the r4k timer
since it didn't initialize the cp0_compare_irq_shift variable used in
c0_compare_int_pending() on the architectures whose cpu_has_mips_r2 is
false.

This patch fixes it via initializing the cp0_compare_irq_shift as the
cp0_compare_irq used in the old c0_compare_int_pending().

Reported-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: David VomLehn <dvomlehn@cisco.com>
Cc: mbizon@freebox.fr
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/922/
Tested-by: Shane McDonald <mcdonald.shane@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/traps.c

index 338dfe8ed002be67a633e83ac30ee161ca4674dc..31b204b26ba08915e647369fbe6c3c0930a7642e 100644 (file)
@@ -1501,6 +1501,7 @@ void __cpuinit per_cpu_trap_init(void)
                        cp0_perfcount_irq = -1;
        } else {
                cp0_compare_irq = CP0_LEGACY_COMPARE_IRQ;
+               cp0_compare_irq_shift = cp0_compare_irq;
                cp0_perfcount_irq = -1;
        }