linux-mips
[Top] [All Lists]

[PATCH 3/6] Alchemy: MIPS hazard workarounds are not required.

To: Linux-MIPS <linux-mips@linux-mips.org>
Subject: [PATCH 3/6] Alchemy: MIPS hazard workarounds are not required.
From: Manuel Lauss <mano@roarinelk.homelinux.net>
Date: Wed, 25 Mar 2009 17:49:30 +0100
Cc: Manuel Lauss <mano@roarinelk.homelinux.net>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=UAm75xdoSY/V9IywfiVkE35NZtIgCh1HNTODBcklz7c=; b=Veid4M/VTSQb9i2lFKJidJp4POCgNo4SmBC89XMWjVLZ2JcD2dw/Wr5o2tGW+4+vCG MbEui0z9g2K7DglHJUSj0rUEQuM5+ty/QaFNqJHXm91wj+dUEhr5JCOE+hXVIwJhmF1g SiyUyGTkKrGY6KUy0ZMj7mY3po/ltl4LwqpQs=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=Piv7XSwFDMk4Zn1586MYZSNrjnf95vC+Uzd6ELGAn4UdfQAAnXzMCBGk9aCFXupAmD w869Gb1jduK/Fl1BqQ2EpTgwB9SEZHKgBoP9+9jJjHKo8/mYXqmaxd3akFePx2RrXWA3 F26GRw09tyyap7DHQ4qdWs6yjbKbz4P2Mv1/E=
In-reply-to: <1237999773-5174-3-git-send-email-mano@roarinelk.homelinux.net>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1237999773-5174-1-git-send-email-mano@roarinelk.homelinux.net> <1237999773-5174-2-git-send-email-mano@roarinelk.homelinux.net> <1237999773-5174-3-git-send-email-mano@roarinelk.homelinux.net>
Sender: linux-mips-bounce@linux-mips.org
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 |    4 ++--
 arch/mips/mm/tlbex.c            |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/hazards.h b/arch/mips/include/asm/hazards.h
index 134e1fc..a12d971 100644
--- a/arch/mips/include/asm/hazards.h
+++ b/arch/mips/include/asm/hazards.h
@@ -87,7 +87,7 @@ do {                                                          
        \
        : "=r" (tmp));                                                  \
 } while (0)
 
-#elif defined(CONFIG_CPU_MIPSR1)
+#elif defined(CONFIG_CPU_MIPSR1) && !defined(CONFIG_MACH_ALCHEMY)
 
 /*
  * These are slightly complicated by the fact that we guarantee R1 kernels to
@@ -139,7 +139,7 @@ do {                                                        
                \
 } while (0)
 
 #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_CAVIUM_OCTEON) || \
-      defined(CONFIG_CPU_R5500)
+      defined(CONFIG_CPU_R5500) || defined(CONFIG_MACH_ALCHEMY)
 
 /*
  * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer.
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 122c9c1..0615b62 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, struct 
uasm_label **l,
        case CPU_R4300:
        case CPU_5KC:
        case CPU_TX49XX:
-       case CPU_ALCHEMY:
        case CPU_PR4450:
                uasm_i_nop(p);
                tlbw(p);
@@ -315,6 +314,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct 
uasm_label **l,
        case CPU_R5500:
                if (m4kc_tlbp_war())
                        uasm_i_nop(p);
+       case CPU_ALCHEMY:
                tlbw(p);
                break;
 
-- 
1.6.2


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