Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Thiemo Seufer <ths@networkno.de>, linux-mips@linux-mips.org
Subject: Re: [PATCH] mm/pg-r4k.c: Fix a typo in an R4600 v2 erratum workaround
Date: Wed, 3 Oct 2007 01:04:25 +0100	[thread overview]
Message-ID: <20071003000425.GA11833@linux-mips.org> (raw)
In-Reply-To: <Pine.LNX.4.64N.0710021435200.32726@blysk.ds.pg.gda.pl>

On Tue, Oct 02, 2007 at 02:47:22PM +0100, Maciej W. Rozycki wrote:

>  Restore a load from KSEG1 done as a workaround for an R4600 v2 
> erratum, dropped with 211be16de99a7424e66c0b6c0d00e2c970508ac2.
> 
> Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
> ---
> Thiemo,
> 
>  It reverts your change of Sep 1st, 2005; given the way the code is 
> written, I am assuming the change was accidental, correct?  At the moment 
> the load never happens.

But it should ...  So this seems to be the right thing, no?

  Ralf

diff --git a/arch/mips/mm/pg-r4k.c b/arch/mips/mm/pg-r4k.c
index dc795be..66921fb 100644
--- a/arch/mips/mm/pg-r4k.c
+++ b/arch/mips/mm/pg-r4k.c
@@ -208,8 +208,10 @@ static inline void build_cdex_p(void)
 		build_nop();
 	}
 
-	if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
+	if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) {
 		build_insn_word(0x3c01a000);	/* lui     $at, 0xa000  */
+		build_insn_word(0x8c200000);	/* lw      $zero, ($at) */
+	}
 
 	mi.c_format.opcode     = cache_op;
 	mi.c_format.rs         = 4;		/* $a0 */
@@ -390,8 +392,10 @@ void __init build_clear_page(void)
 	} else
 		build_addiu_a2_a0(off);
 
-	if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
+	if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) {
 		build_insn_word(0x3c01a000);	/* lui     $at, 0xa000  */
+		build_insn_word(0x8c200000);	/* lw      $zero, ($at) */
+	}
 
 dest = label();
 	do {
@@ -452,8 +456,10 @@ void __init build_copy_page(void)
 	} else
 		build_addiu_a2_a0(off);
 
-	if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
+	if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x()) {
 		build_insn_word(0x3c01a000);	/* lui     $at, 0xa000  */
+		build_insn_word(0x8c200000);	/* lw      $zero, ($at) */
+	}
 
 dest = label();
 	loop_start = store_offset;

  parent reply	other threads:[~2007-10-03  0:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-02 13:47 [PATCH] mm/pg-r4k.c: Fix a typo in an R4600 v2 erratum workaround Maciej W. Rozycki
2007-10-02 14:36 ` Thiemo Seufer
2007-10-03  0:04 ` Ralf Baechle [this message]
2007-10-03  0:21   ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071003000425.GA11833@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=ths@networkno.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox