From: Carsten Langgaard <carstenl@mips.com>
To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Cc: Ralf Baechle <ralf@oss.sgi.com>,
linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: Re: [update] [patch] linux: Cache coherency fixes
Date: Fri, 02 Aug 2002 10:10:24 +0200 [thread overview]
Message-ID: <3D4A3E68.E330BA7A@mips.com> (raw)
In-Reply-To: Pine.GSO.3.96.1020801173504.8256H-100000@delta.ds2.pg.gda.pl
"Maciej W. Rozycki" wrote:
> On Thu, 1 Aug 2002, Ralf Baechle wrote:
>
> > Looks mostly right except that the code in config-shared.in which deciedes
> > if a system is coherent is wrong. Basically it assumes every R10000 or
> > every uniprocessor system is non-coherent and that's wrong. As coherency
> > between CPUs and for DMA I/O is basically the same thing I've changed your
> > code from the use of CONFIG_CPU_CACHE_COHERENCY to CONFIG_NONCOHERENT_IO
> > which did already exist; I don't think we need another config symbol to
> > handle this. Will apply once I did a few test builds and patches the
> > whole thing into 2.5 ...
>
> Huh? Coherent caching mode can be used for a few processors only, namely
> R4[04]00MC and presumably SB1 (inferred from the sources), i.e. the ones
> that support the interprocessor coherency protocol. If you know of any
> other processor that supports the protocol, I'd be pleased to see a
> reference to a spec -- I hoped someone, possibly you, would fill the
> missing bits when I proposed the patch a month ago. Nobody bothered,
> though, sigh...
The 20Kc has support for cache coherency, but it doesn't support Coherent
Update on Write (CUW), it only support Coherent exclusive (CE).
The way I implemented the coherency support locally, was I used a boot option
(coherency), where I could tell whether I wanted to run coherent or not.
The dma cache routines would then either be the normal (non-coherent version)
or a empty function.
As my system (a Malta board) can have different daughter cards attached, I can
have different CPUs and system controllers and I really like the idea, that I
can run the same kernel on all the different system setups.
So if the kernel was started with the "coherency" option, I checked whether or
not the CPU and system controller has support for coherency or not, if one or
both didn't support coherency, I die telling the user that the system didn't
support coherency.
In both the coherency and non-coherency case, I used the write-back
non-coherent cache attribute, as the 20Kc still responses to Intervention and
Invalidate request from the system controller.
The coherent exclusive cache attribute is really only needed in multi CPU
systems. I don't know if other CPU works the same way as the 20Kc.
>
> I see your changes are broken conceptually, as the caching mode for the
> TLB should be inferred from the CPU configuration in the first place and
> not the system selection (actually it should be best selected ath the run
> time). Hence I'd invert the flag, since most systems are non-coherent,
> and only permit it for certain processors. Using a non-coherent
> configuration for an UP system that supports coherency (do SGI IP27 and
> SiByte SB1250 have another agent in the chipset that may issue coherent
> requests regardless of the number of processors started?) results in a
> performance hit only due to superfluous invalidations, but using a
> coherent configuration for a processor/system that doesn't support it may
> lead to a hard to debug hang with no apparent reason (as I wrote
> previously, even NMI/Reset stopped working on my system -- I had to hit
> the power switch).
>
> I'll cook another patch to fix what got broken.
>
> Maciej
>
> --
> + Maciej W. Rozycki, Technical University of Gdansk, Poland +
> +--------------------------------------------------------------+
> + e-mail: macro@ds2.pg.gda.pl, PGP key available +
--
_ _ ____ ___ 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-08-02 8:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-05 15:21 [patch] linux: Cache coherency fixes Maciej W. Rozycki
2002-07-29 14:29 ` [update] " Maciej W. Rozycki
2002-07-29 14:48 ` Carsten Langgaard
2002-08-01 8:31 ` Carsten Langgaard
2002-08-01 13:25 ` Ralf Baechle
2002-08-01 16:05 ` Maciej W. Rozycki
2002-08-01 16:49 ` Ralf Baechle
2002-08-01 17:06 ` Thiemo Seufer
2002-08-02 10:16 ` Ralf Baechle
2002-08-01 17:14 ` Maciej W. Rozycki
2002-08-01 17:58 ` Ralf Baechle
2002-08-01 18:49 ` Maciej W. Rozycki
2002-08-01 19:18 ` Dan Malek
2002-08-02 8:23 ` Carsten Langgaard
2002-08-02 8:36 ` Maciej W. Rozycki
2002-08-02 10:38 ` Ralf Baechle
2002-08-02 8:10 ` Carsten Langgaard [this message]
2002-08-05 12:04 ` 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=3D4A3E68.E330BA7A@mips.com \
--to=carstenl@mips.com \
--cc=linux-mips@fnet.fr \
--cc=linux-mips@oss.sgi.com \
--cc=macro@ds2.pg.gda.pl \
--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 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.