From: Carsten Langgaard <carstenl@mips.com>
To: Jun Sun <jsun@mvista.com>
Cc: Daniel Jacobowitz <dan@debian.org>,
"Kevin D. Kissell" <kevink@mips.com>,
linux-mips@linux-mips.org
Subject: Re: possible Malta 4Kc cache problem ...
Date: Thu, 05 Dec 2002 10:38:54 +0100 [thread overview]
Message-ID: <3DEF1EAD.14932B13@mips.com> (raw)
In-Reply-To: 20021204145823.X4363@mvista.com
I think I know what the problem is, the PRID is telling me everything.
Jun Sun, you have just found an ancient 4Kc bug, sorry if you spend a
lot of time debugging this.
We have a newer TMSC 4Kc board, which doesn't have this problem
You fix flushing the whole cache works, but the problem with this kind
of bug, is that there are other potential problems.
There is what the errata sheet says:
E16. Fill buffers not flushed on CACHE instructions
Problem: The fill buffers in the cache controllers were not flushed by
CACHE instructions. Under certain circumstances, the fill buffer could
service future loads even though the cache was invalidated with the
intent of causing a refill from memory. The ICache fill buffer is left
valid for all cache refills (and all cacheable read requests) until the
following cache miss. In this case, memory was being updated and the
ICache was being cleared. The line being cleared was the last one to be
filled and there was not another cache miss before that line was
re-accessed. The second fetch can get the stale data from the fill
buffer. A similar problem exists in the DCache, but the DFB is
invalidated when the cache is written. Thus, the only time this would be
seen is if all ways of the DCache were locked and the fill buffer was
being treated as an extra way of the cache.
Implication: This could show up in any place where self modifying code
exists and the ICache is selectively flushed. (If the entire cache is
flushed, there will be an intervening cache miss or uncached reference
to flush the FB). The problem with the DCache would primarily show up
when accessing the same memory with different physical addresses or
cache coherency attributes. If an invalidate is used to flush an entry
from the DCache with the intent of forcing a refill, the refill may not
occur.
Workarounds: Flush the entire ICache when using self-modifying code.
Force a cache miss, cache refill, or uncached access to clear fill
buffers near the invalidation. For the instruction cache, this could be
done by using a CACHE Fill instruction to pre-load the invalidation
routine into the cache. This will force a refill which will flush the
fill buffer.
Status: Fixed.
/Carsten
Jun Sun wrote:
> I guess I still did not answer some of your questions:
>
> On Wed, Dec 04, 2002 at 09:28:34PM +0100, Carsten Langgaard wrote:
> > Could you please tell us, which 4Kc you are running on ?
>
> Is the PRID telling enough? I posted it in the other email.
>
> > What are the cache configuration (size, number of ways) ?
> > Are you running on the latest kernel sources from the CVS tree ?
>
> Debugging work is done with my kernel, but confirmed that latest
> CVS tree shows the same problem.
>
> > Have you tried the mips32_cache.h file I send and
>
> No, because I don't think it is related to indexed cache operations.
>
> > /or have you tried the kernel
> > from the ftp.mips.com FTP server ?
> >
>
> Jun
--
_ _ ____ ___ Carsten Langgaard Mailto:carstenl@mips.com
|\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527
| \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555
TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556
Denmark http://www.mips.com
next prev parent reply other threads:[~2002-12-05 9:39 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-04 6:45 possible Malta 4Kc cache problem Jun Sun
2002-12-04 9:38 ` Kevin D. Kissell
2002-12-04 9:38 ` Kevin D. Kissell
2002-12-04 9:46 ` Kevin D. Kissell
2002-12-04 9:46 ` Kevin D. Kissell
2002-12-04 10:08 ` Carsten Langgaard
2002-12-04 11:21 ` Carsten Langgaard
2002-12-04 13:06 ` Kevin D. Kissell
2002-12-04 13:06 ` Kevin D. Kissell
2002-12-04 13:14 ` Carsten Langgaard
2002-12-04 13:28 ` Carsten Langgaard
2002-12-04 17:08 ` Kevin D. Kissell
2002-12-04 17:08 ` Kevin D. Kissell
2002-12-04 17:32 ` Daniel Jacobowitz
2002-12-04 20:28 ` Carsten Langgaard
2002-12-04 22:58 ` Jun Sun
2002-12-05 9:38 ` Carsten Langgaard [this message]
2002-12-06 16:42 ` Maciej W. Rozycki
2002-12-06 22:24 ` Hartvig Ekner
2002-12-06 22:24 ` Hartvig Ekner
2002-12-09 10:51 ` Dominic Sweetman
2002-12-09 10:51 ` Dominic Sweetman
2002-12-04 22:19 ` Jun Sun
2002-12-05 9:27 ` Kevin D. Kissell
2002-12-05 9:27 ` Kevin D. Kissell
2002-12-04 21:59 ` Jun Sun
2002-12-04 23:14 ` Kevin D. Kissell
2002-12-04 23:14 ` Kevin D. Kissell
2002-12-04 22:53 ` Jun Sun
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=3DEF1EAD.14932B13@mips.com \
--to=carstenl@mips.com \
--cc=dan@debian.org \
--cc=jsun@mvista.com \
--cc=kevink@mips.com \
--cc=linux-mips@linux-mips.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.