From: Jun Sun <jsun@mvista.com>
To: Pete Popov <ppopov@mvista.com>
Cc: Ralf Baechle <ralf@oss.sgi.com>, linux-mips@oss.sgi.com
Subject: Re: CONFIG_MIPS_UNCACHED
Date: Wed, 24 Jan 2001 17:37:31 -0800 [thread overview]
Message-ID: <3A6F835B.72A293A5@mvista.com> (raw)
In-Reply-To: 3A6F7CB8.322668CF@mvista.com
Pete Popov wrote:
>
> Ralf Baechle wrote:
> >
> > On Wed, Jan 24, 2001 at 12:10:32PM -0800, Jun Sun wrote:
> >
> > > It is really surprising to know this. It sounds like a CPU bug to me. Can
> > > some MIPS "gods" clarify if such a behaviour is a bug or allowed?
> > >
> > > BTW, the CPU in EV96100 is QED RM7000, I believe.
> >
> > If you want to be strictly correct you have to execute the code that
> > disables caching of KSEG0 in uncached space like KSEG1, then flush the
> > caches before you can resume execution in KSEG0. Otherwise you might
> > end up with dirty d-caches which when flushed will overwrite more
> > uptodate data in memory. The window is very small but yet exists if
> > things are just right.
>
> The EV96100 running Galileo's pmon exhibits exactly this symptom. Pmon
> apparently sets up kseg0 to cache coherency 3; but eventhough the
> kernel also sets it to 3, if I don't flush the caches first I end up
> with overwritten data. A different version of pmon that I have sets
> kseg0 to 1 (writethrough). Changing that to 3 isn't a problem -- or at
> least it doesn't seem to cause any problems.
>
I don't think it is the same problem.
Here is the simplified view of the process, if I understand Pete correctly:
1. pmon sets kseg0 to 3 (cache enabled)
2. kernel starts in KSEG0
3. kernel sets kseg0 to 3 again (essentially keeps the same config value)
4. kernel flushes cache
===> Q: data corruption or not?
I think the data should be consistent. Otherwise it looks like a CPU bug to
me.
What ralf described is something like the following:
1. pmon sets kseg0 to 3 (KSEG0 cache enabled)
2. kernel starts in KSEG0
3. kernel sets kseg0 to 2 (disable kseg0 cache)
4. kernel flushes cache
===> Q: data corruption or not? YES, data can be corrupted!
Jun
next prev parent reply other threads:[~2001-01-25 1:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-23 23:26 CONFIG_MIPS_UNCACHED Quinn Jensen
2001-01-23 23:53 ` CONFIG_MIPS_UNCACHED Pete Popov
2001-01-24 20:10 ` CONFIG_MIPS_UNCACHED Jun Sun
2001-01-25 0:31 ` CONFIG_MIPS_UNCACHED Ralf Baechle
2001-01-25 1:09 ` CONFIG_MIPS_UNCACHED Pete Popov
2001-01-25 1:37 ` Jun Sun [this message]
2001-01-26 10:02 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-01-26 10:02 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
-- strict thread matches above, loose matches on Subject: below --
2001-06-23 16:05 CONFIG_MIPS_UNCACHED Jun Sun
2001-06-23 17:17 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-06-23 17:17 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-06-23 17:49 ` CONFIG_MIPS_UNCACHED Jun Sun
2001-06-23 20:15 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-06-23 20:15 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-06-25 4:42 ` CONFIG_MIPS_UNCACHED Jun Sun
2001-06-25 6:51 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-06-25 6:51 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-06-25 16:38 ` CONFIG_MIPS_UNCACHED Jun Sun
2001-06-25 17:35 ` CONFIG_MIPS_UNCACHED Justin Carlson
2001-06-26 8:50 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-06-26 8:50 ` CONFIG_MIPS_UNCACHED Kevin D. Kissell
2001-06-26 13:11 ` CONFIG_MIPS_UNCACHED Maciej W. Rozycki
2001-06-25 13:22 ` CONFIG_MIPS_UNCACHED Maciej W. Rozycki
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=3A6F835B.72A293A5@mvista.com \
--to=jsun@mvista.com \
--cc=linux-mips@oss.sgi.com \
--cc=ppopov@mvista.com \
--cc=ralf@oss.sgi.com \
/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