linux-mips
[Top] [All Lists]

[patch] arch/mips/au1000/common/time.c

To: <linux-mips@linux-mips.org>, "Ralf Baechle \(E-mail\)" <ralf@linux-mips.org>
Subject: [patch] arch/mips/au1000/common/time.c
From: "Joseph Chiu" <joseph@omnilux.net>
Date: Fri, 18 Mar 2005 17:13:12 -0800
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Thread-index: AcUsH6MMLEuw/udPSleoURTdhR92NwAAGYow
Thread-topic: time.c fix
Hi,

I reported on this a few years ago on 2.4.18, but it never seemed to have been 
addressed...

in linux/arch/mips/au1000/common/time.c, mips_timer_interrupt calls irq_enter() 
*before*
checking if (r4k_offset == 0), and then exits the interrupt without calling 
irq_exit().

This problem was crashing our boards in some test cases...  Please apply.

Thanks,
Joseph

----

RCS file: /mnt/cvs/kernel-2.6/arch/mips/au1000/common/time.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 time.c
*** time.c      13 Mar 2005 08:19:05 -0000      1.1.1.1
--- time.c      19 Mar 2005 01:04:19 -0000
***************
*** 86,96 ****
        int irq = 63;
        unsigned long count;
  
-       irq_enter();
-       kstat_this_cpu.irqs[irq]++;
- 
        if (r4k_offset == 0)
                goto null;
  
        do {
                count = read_c0_count();
--- 86,96 ----
        int irq = 63;
        unsigned long count;
  
        if (r4k_offset == 0)
                goto null;
+ 
+       irq_enter();
+       kstat_this_cpu.irqs[irq]++;
  
        do {
                count = read_c0_count();

<Prev in Thread] Current Thread [Next in Thread>
  • [patch] arch/mips/au1000/common/time.c, Joseph Chiu <=