linux-mips
[Top] [All Lists]

[PATCH] vr41xx: fix problem with vr41xx_cpu_wait

To: linux-mips@linux-mips.org
Subject: [PATCH] vr41xx: fix problem with vr41xx_cpu_wait
From: Ricardo Mendoza <ricmm@gentoo.org>
Date: Tue, 5 Aug 2008 10:43:14 +0000
Cc: yoichi_yuasa@tripeaks.co.jp, ralf@linux-mips.org, ricmm@gentoo.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.16 (2007-06-09)
Hello,

Yoichi, please correct me if I am wrong but I think that the "standby"
instruction does not set IE bit on its own, so calling it with
interrupts disabled will loop the cpu away forever on standby state
being unable to come back due to no interrupts getting through.

Please ack the patch if you consider it correct.

Please apply afterwards, Ralf.


     Ricardo

---

Standby instruction can't be called with interrupts disabled
as it doesn't set IE bit on it's own.

Signed-off-by: Ricardo Mendoza <ricmm@gentoo.org>
---
 arch/mips/vr41xx/common/pmu.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/mips/vr41xx/common/pmu.c b/arch/mips/vr41xx/common/pmu.c
index 028aaf7..6d651ec 100644
--- a/arch/mips/vr41xx/common/pmu.c
+++ b/arch/mips/vr41xx/common/pmu.c
@@ -48,14 +48,8 @@ static void __iomem *pmu_base;
 
 static void vr41xx_cpu_wait(void)
 {
-       local_irq_disable();
        if (!need_resched())
-               /*
-                * "standby" sets IE bit of the CP0_STATUS to 1.
-                */
                __asm__("standby;\n");
-       else
-               local_irq_enable();
 }
 
 static inline void software_reset(void)

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