linux-mips
[Top] [All Lists]

[PATCH] fix local_irq_save()/local_irq_restore() when CONFIG_CPU_MIPSR2

To: linux-mips@linux-mips.org
Subject: [PATCH] fix local_irq_save()/local_irq_restore() when CONFIG_CPU_MIPSR2 & CONFIG_IRQ_CPU
From: Maxime Bizon <mbizon@freebox.fr>
Date: Tue, 20 Dec 2005 06:32:19 +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hello all,

I was unable to get my R4KECr2 board working with CONFIG_CPU_MIPSR2 &
CONFIG_IRQ_CPU, irq delivery is not working.

local_irq_restore() logic is to check that "flags" is non zero, and
enable irq accordingly.

But "flags" comes directly from di, which according to mips instruction
set, saves whole status content, not just IE bit.

Attached patch to fix this.


Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

--- linux.git/include/asm-mips/interrupt.h.old  2005-12-20 06:20:44.000000000 
+0100
+++ linux.git/include/asm-mips/interrupt.h      2005-12-20 06:21:02.000000000 
+0100
@@ -93,6 +93,7 @@
        "       .set    noat                                            \n"
 #ifdef CONFIG_CPU_MIPSR2
        "       di      \\result                                        \n"
+       "       andi    \\result, 1                                     \n"
 #else
        "       mfc0    \\result, $12                                   \n"
        "       ori     $1, \\result, 1                                 \n"



Thanks,

-- 
Maxime

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