Received: from mail.onstor.com ([66.201.51.107]) by onstor-exch02.onstor.net with Microsoft SMTPSVC(6.0.3790.1830);
	 Tue, 19 Aug 2008 08:03:48 -0700
Received: from dalesmta2-3.messageone.com ([129.41.169.249]) by mail.onstor.com with Microsoft SMTPSVC(6.0.3790.1830);
	 Tue, 19 Aug 2008 08:03:48 -0700
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])
	by dalesmta2-3.messageone.com (8.13.8/8.13.8) with ESMTP id m7JF3ksY012424
	for <andy.sharp@onstor.com>; Tue, 19 Aug 2008 10:03:46 -0500
Received: from localhost.localdomain ([127.0.0.1]:11458 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP
	id S28574382AbYHSPDD (ORCPT <rfc822;andy.sharp@onstor.com>);
	Tue, 19 Aug 2008 16:03:03 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 19 Aug 2008 16:02:46 +0100 (BST)
Received: from mba.ocn.ne.jp ([122.1.235.107]:36080 "HELO smtp.mba.ocn.ne.jp")
	by ftp.linux-mips.org with SMTP id S28574371AbYHSPCj (ORCPT
	<rfc822;linux-mips@linux-mips.org>); Tue, 19 Aug 2008 16:02:39 +0100
Received: from localhost (p6195-ipad311funabasi.chiba.ocn.ne.jp [123.217.216.195])
	by smtp.mba.ocn.ne.jp (Postfix) with ESMTP
	id 80BFCB6B9; Wed, 20 Aug 2008 00:02:32 +0900 (JST)
Date: 	Wed, 20 Aug 2008 00:02:36 +0900 (JST)
Message-Id: <20080820.000236.93205674.anemo@mba.ocn.ne.jp>
To: ralf@linux-mips.org
Cc: ricmm@gentoo.org, yoichi_yuasa@tripeaks.co.jp, linux-mips@linux-mips.org
Subject: Re: [PATCH] vr41xx: fix problem with vr41xx_cpu_wait
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
In-Reply-To: <20080806171531.GA5848@linux-mips.org>
References: <20080806161710.GA22957@woodpecker.gentoo.org>
	<20080807.021057.59650770.anemo@mba.ocn.ne.jp>
	<20080806171531.GA5848@linux-mips.org>
X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A  B746 CA77 FE94 2874 D52F
X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F
X-Mailer: Mew version 5.2 on Emacs 21.4 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-archive-position: 20276
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: anemo@mba.ocn.ne.jp
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-19_04:2008-08-12,2008-08-19,2008-08-19 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-0808190041
X-MessageOne-Spam-Score: 0
X-MessageOne-Spam-Bar: 
Return-Path: linux-mips-bounce@linux-mips.org
X-OriginalArrivalTime: 19 Aug 2008 15:03:48.0887 (UTC) FILETIME=[C8D27A70:01C9020C]

On Wed, 6 Aug 2008 18:15:31 +0100, Ralf Baechle <ralf@linux-mips.org> wrote:
> > http://www.linux-mips.org/archives/linux-mips/2007-11/msg00123.html
> > 
> > To support vr41's standby instruction in same way, we might have to
> > synthesise rollback_handle_int, etc. or r4k_wait at runtime...
> 
> The infrastructure for that is now there :-)  Another question of course
> is if that stuff really deserve this ultimate degree of optimization.

Well, this patch on top of my patch might be enough.

--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -152,7 +152,7 @@ LEAF(r4k_wait)
 	.set	push
 	.set	noat
 	MFC0	k0, CP0_EPC
-	PTR_LA	k1, r4k_wait
+	PTR_L	k1, cpu_wait
 	ori	k0, 0x1f	/* 32 byte rollback region */
 	xori	k0, 0x1f
 	bne	k0, k1, 9f

Of course old_vr41xx_cpu_wait should be modified as like as r4k_wait
and "rollback = (cpu_wait == r4k_wait)" lines in traps.c should be
changed...

---
Atsushi Nemoto

