Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.1830);
	 Tue, 5 Aug 2008 03:44:05 -0700
Received: from ausesmta2-2.messageone.com ([64.20.241.45]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.1830);
	 Tue, 5 Aug 2008 03:44:05 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by ausesmta2-2.messageone.com (8.13.8/8.13.8) with ESMTP id m75Ai38Z016638
	for <andy.sharp@onstor.com>; Tue, 5 Aug 2008 05:44:04 -0500
Received: from localhost.localdomain ([127.0.0.1]:7607 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S20022242AbYHEKng (ORCPT <rfc822;andy.sharp@onstor.com>);
	Tue, 5 Aug 2008 11:43:36 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 05 Aug 2008 11:43:19 +0100 (BST)
Received: from smtp.gentoo.org ([140.211.166.183]:3276 "EHLO smtp.gentoo.org")
	by ftp.linux-mips.org with ESMTP id S20021597AbYHEKnR (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Tue, 5 Aug 2008 11:43:17 +0100
Received: by smtp.gentoo.org (Postfix, from userid 2204)
	id 5FB1D67445; Tue,  5 Aug 2008 10:43:14 +0000 (UTC)
Date: 	Tue, 5 Aug 2008 10:43:14 +0000
From: Ricardo Mendoza <ricmm@gentoo.org>
To: linux-mips@linux-mips.org
Cc: yoichi_yuasa@tripeaks.co.jp, ralf@linux-mips.org, ricmm@gentoo.org
Subject: [PATCH] vr41xx: fix problem with vr41xx_cpu_wait
Message-ID: <20080805104314.GB4628@woodpecker.gentoo.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-09)
X-archive-position: 20100
X-ecartis-version: Ecartis v1.0.0
Sender: linux-mips-bounce@linux-mips.org
Errors-to: linux-mips-bounce@linux-mips.org
X-original-sender: ricmm@gentoo.org
Precedence: bulk
X-list: 	linux-mips
X-MessageOne-Virus-Version: vendor=fsecure engine=4.65.7161:2.4.4,1.2.40,4.0.164 definitions=2008-08-04_08:2008-07-30,2008-08-04,2008-08-04 signatures=0
X-MessageOne-Virus-Scanned: Clean
X-MessageOne-Envelope-Sender: linux-mips-bounce@linux-mips.org
X-MessageOne-Spam-Details: rule=m773emszm_notspam policy=m773emszm score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0805090000 definitions=main-0808050020
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 05 Aug 2008 10:44:05.0192 (UTC) FILETIME=[2E6ED480:01C8F6E8]

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)

