From patchwork Mon Feb 1 09:10:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [urgent] MIPS: Fixup of the r4k timer Date: Mon, 01 Feb 2010 08:10:55 -0000 From: Wu Zhangjin X-Patchwork-Id: 922 Message-Id: <1265015455-32553-1-git-send-email-wuzhangjin@gmail.com> To: ralf@linux-mips.org Cc: David VomLehn , mbizon@freebox.fr, linux-mips@linux-mips.org, Wu Zhangjin From: Wu Zhangjin 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 Signed-off-by: Wu Zhangjin Tested-by: Shane McDonald --- arch/mips/kernel/traps.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 338dfe8..31b204b 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -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; }