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; Fri, 30 Jan 2009
 09:30:47 -0800
Received: from chiesmta2-3.messageone.com ([216.203.30.55]) by mail.onstor.com
 with Microsoft SMTPSVC(6.0.3790.3959);	 Fri, 30 Jan 2009 09:30:46 -0800
Received: from ftp.linux-mips.org (ftp.linux-mips.org [213.58.128.207])	by
 chiesmta2-3.messageone.com (8.13.8/8.13.8) with ESMTP id n0UHUkIW018513	for
 <andy.sharp@onstor.com>; Fri, 30 Jan 2009 11:30:46 -0600
Received: from localhost.localdomain ([127.0.0.1]:1513 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S21366217AbZA3Rak
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Fri, 30 Jan 2009 17:30:40 +0000
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 30 Jan 2009 17:30:23
 +0000 (GMT)
Received: from fnoeppeil36.netpark.at ([217.175.205.164]:1742 "EHLO
	roarinelk.homelinux.net") by ftp.linux-mips.org with ESMTP	id
 S21366381AbZA3R3h (ORCPT <rfc822;linux-mips@linux-mips.org>);	Fri, 30 Jan
 2009 17:29:37 +0000
Received: (qmail 16263 invoked from network); 30 Jan 2009 18:29:36 +0100
Received: from scarran.roarinelk.net (HELO localhost.localdomain)
 (192.168.0.242)  by 192.168.0.1 with SMTP; 30 Jan 2009 18:29:36 +0100
From: Manuel Lauss <mano@roarinelk.homelinux.net>
To: Ralf Baechle <ralf@linux-mips.org>
CC: Linux-MIPS <linux-mips@linux-mips.org>, Manuel Lauss
	<mano@roarinelk.homelinux.net>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Fri, 30 Jan 2009 09:30:11 -0800
Subject: [PATCH 3/3] Alchemy: MIPS hazard workarounds are not required.
Thread-Topic: [PATCH 3/3] Alchemy: MIPS hazard workarounds are not required.
Thread-Index: AcmDAHzH82+mHZ3sT2qLjX6wO2bKnQ==
Message-ID: <1233336611-6450-3-git-send-email-mano@roarinelk.homelinux.net>
References: <1233336611-6450-1-git-send-email-mano@roarinelk.homelinux.net>
 <1233336611-6450-2-git-send-email-mano@roarinelk.homelinux.net>
In-Reply-To: <1233336611-6450-2-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: 30 Jan 2009 17:30:46.0372 (UTC)
 FILETIME=[7C32EA40:01C98300]
errors-to: linux-mips-bounce@linux-mips.org
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: IgJd9RlfTADcw4ASdUX58Q==
x-messageone-virus-version: vendor=fsecure
 engine=4.65.7400:2.4.4,1.2.40,4.0.164
 definitions=2009-01-30_12:2009-01-29,2009-01-30,2009-01-30 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-0901300107
x-messageone-spam-score: 0
x-messageone-spam-bar:
x-list: linux-mips
x-archive-position: 21897
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

The Alchemy manuals state:

"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."

Run-tested on Au12x0, without any ill effects.

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

diff --git a/arch/mips/include/asm/hazards.h b/arch/mips/include/asm/hazard=
s.h
index 43baed1..7cb68a4 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 00ac573..bb58628 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -292,7 +292,6 @@ static void __cpuinit build_tlb_write_entry(u32 **p, st=
ruct uasm_label **l,
 	case CPU_R4300:
 	case CPU_5KC:
 	case CPU_TX49XX:
-	case CPU_ALCHEMY:
 	case CPU_PR4450:
 		uasm_i_nop(p);
 		tlbw(p);
@@ -312,6 +311,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, st=
ruct uasm_label **l,
 	case CPU_BCM4710:
 	case CPU_LOONGSON2:
 	case CPU_CAVIUM_OCTEON:
+	case CPU_ALCHEMY:
 		if (m4kc_tlbp_war())
 			uasm_i_nop(p);
 		tlbw(p);
--=20
1.6.1.1


