linux-mips
[Top] [All Lists]

[PATCH urgent] MIPS: Fixup of the r4k timer

To: ralf@linux-mips.org
Subject: [PATCH urgent] MIPS: Fixup of the r4k timer
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Mon, 1 Feb 2010 17:10:55 +0800
Cc: David VomLehn <dvomlehn@cisco.com>, mbizon@freebox.fr, linux-mips@linux-mips.org, Wu Zhangjin <wuzhangjin@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=q29LBEgUBABxQbj20SsOUBh/SZYhpdRH20sJxLf9MmQ=; b=ECulLcDcCgyGZkpR3x3ao1Z115OdkJCSX+kFprpFHEYU4S5apvaVtUeRFxDrnsjjHy axL6MX1KcgQmA+dGzNwpQWCs4Zgzqjq3eS2yq3JtyB4vlJqQIHF7Ug5r5IFQRBtR9ACJ 3X+s23HG4/stBEsH6cFalhtf3T7aY4Zuqvn+A=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=iq+EpXwmUGFfunV5d0+29ZMhdJoyUgiSp8j51jrhRssumTyyphKYOMln6+5piSA976 tGzTZx/1gZ7F8712GFC7gk+0FCBYKrPofsGqiawSCr4839JVqcef9krOA1Ffa9Nb1xeH QQ4Xxa0Si9qxVQdhY9aPmo0ahJPNSVc9S277Y=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
From: Wu Zhangjin <wuzhangjin@gmail.com>

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>
---
 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;
        }
 
-- 
1.6.6


<Prev in Thread] Current Thread [Next in Thread>