Received: from mail.onstor.com (66.201.51.107) by exch1.onstor.net
 (10.0.0.225) with Microsoft SMTP Server id 8.1.311.2; Mon, 22 Dec 2008
 11:22:12 -0800
Received: from ausesmta2-3.messageone.com ([64.20.241.45]) by mail.onstor.com
 with Microsoft SMTPSVC(6.0.3790.3959);	 Mon, 22 Dec 2008 11:22:12 -0800
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])	by
 ausesmta2-3.messageone.com (8.13.8/8.13.8) with ESMTP id mBMJMB3f018317	for
 <andy.sharp@onstor.com>; Mon, 22 Dec 2008 13:22:11 -0600
Received: from localhost.localdomain ([127.0.0.1]:44960 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S24208382AbYLVTVd
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Mon, 22 Dec 2008 19:21:33 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 22 Dec 2008 19:21:17
 +0000 (GMT)
Received: from fnoeppeil48.netpark.at ([217.175.205.176]:10680 "EHLO
	roarinelk.homelinux.net") by ftp.linux-mips.org with ESMTP	id
 S24208361AbYLVTVO (ORCPT <rfc822;linux-mips@linux-mips.org>);	Mon, 22 Dec
 2008 19:21:14 +0000
Received: (qmail 15755 invoked from network); 22 Dec 2008 20:20:50 +0100
Received: from scarran.roarinelk.net (HELO localhost.localdomain)
 (192.168.0.242)  by 192.168.0.1 with SMTP; 22 Dec 2008 20:20:50 +0100
From: Manuel Lauss <mano@roarinelk.homelinux.net>
To: Linux-MIPS <linux-mips@linux-mips.org>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Mon, 22 Dec 2008 11:21:07 -0800
Subject: [PATCH 1/2] Alchemy: MIPS hazard workarounds are not required.
Thread-Topic: [PATCH 1/2] Alchemy: MIPS hazard workarounds are not required.
Thread-Index: AclkapeighkcL0baS1OCuEPb+yQAbg==
Message-ID: <1229973668-18182-1-git-send-email-mano@roarinelk.homelinux.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 0b
X-MS-Exchange-Organization-AuthSource: exch1.onstor.net
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-originalarrivaltime: 22 Dec 2008 19:22:12.0310 (UTC)
 FILETIME=[9737D760:01C9646A]
errors-to: linux-mips-bounce@linux-mips.org
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: Z21DpxY0vhZ6M3eC2oXJWw==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2008-12-22_10:2008-12-22,2008-12-22,2008-12-22 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-0810130000 definitions=main-0812220115
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21655
x-ecartis-version: Ecartis v1.0.0
x-original-sender: mano@roarinelk.homelinux.net
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Quoting the Au1xxx manuals:
"All pipeline hazards and dependencies are enforced by hardware interlocks
 so that any sequence of instructions is guaranteed to execute correctly.
 Therefore, it is not necessary to pad legacy MIPS hazards (such as
 load delay slots and coprocessor accesses) with NOPs."

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
---
 arch/mips/include/asm/hazards.h |    5 +++--
 arch/mips/mm/tlbex.c            |   14 +++++++-------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/mips/include/asm/hazards.h b/arch/mips/include/asm/hazard=
s.h
index 43baed1..0a0f241 100644
--- a/arch/mips/include/asm/hazards.h
+++ b/arch/mips/include/asm/hazards.h
@@ -87,7 +87,7 @@ do {									\
 	: "=3Dr" (tmp));							\
 } while (0)
=20
-#elif defined(CONFIG_CPU_MIPSR1)
+#elif defined(CONFIG_CPU_MIPSR1) && !defined(CONFIG_MACH_ALCHEMY)
=20
 /*
  * These are slightly complicated by the fact that we guarantee R1 kernels=
 to
@@ -138,7 +138,8 @@ do {									\
 		__instruction_hazard();					\
 } while (0)
=20
-#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON)
+#elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON)	\
+   || defined(CONFIG_MACH_ALCHEMY)
=20
 /*
  * R10000 rocks - all hazards handled in hardware, so this becomes a nobra=
iner.
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 4294203..c36e8c2 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -292,13 +292,6 @@ static void __cpuinit build_tlb_write_entry(u32 **p, s=
truct uasm_label **l,
 	case CPU_R4300:
 	case CPU_5KC:
 	case CPU_TX49XX:
-	case CPU_AU1000:
-	case CPU_AU1100:
-	case CPU_AU1500:
-	case CPU_AU1550:
-	case CPU_AU1200:
-	case CPU_AU1210:
-	case CPU_AU1250:
 	case CPU_PR4450:
 		uasm_i_nop(p);
 		tlbw(p);
@@ -318,6 +311,13 @@ static void __cpuinit build_tlb_write_entry(u32 **p, s=
truct uasm_label **l,
 	case CPU_BCM4710:
 	case CPU_LOONGSON2:
 	case CPU_CAVIUM_OCTEON:
+	case CPU_AU1000:
+	case CPU_AU1100:
+	case CPU_AU1500:
+	case CPU_AU1550:
+	case CPU_AU1200:
+	case CPU_AU1210:
+	case CPU_AU1250:
 		if (m4kc_tlbp_war())
 			uasm_i_nop(p);
 		tlbw(p);
--=20
1.6.0.4


