Linux MIPS Architecture development
 help / color / mirror / Atom feed
* How to make part of kseg0 uncached
@ 2003-05-02 23:56 Jimmy Zhang
  2003-05-02 23:56 ` Jimmy Zhang
  2003-05-03  1:06 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: Jimmy Zhang @ 2003-05-02 23:56 UTC (permalink / raw)
  To: linux-mips

It is pretty simple to make the WHOLE kseg0 cached or uncached. However,
I only want part of kseg0 uncached. 

I must uncache that region because it gives me too much trouble with DMA
data, however, I don't want to uncache the whole kseg0 segment in order
to get better performance.  Kseg0 is not mapped through TLB, so it seems
I can't achieve my goal through TLB. 

Cite from the book See Mips Run, "if you feel that your system needs to
make uncached references to cacheable memory, then I strongly recommand
that you divide memory into regions that are always accessed uncached
and regions that are always accessed through the cache - and don't let
them overlap. " But how ?

Thanks,

Jimmy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* How to make part of kseg0 uncached
  2003-05-02 23:56 How to make part of kseg0 uncached Jimmy Zhang
@ 2003-05-02 23:56 ` Jimmy Zhang
  2003-05-03  1:06 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Jimmy Zhang @ 2003-05-02 23:56 UTC (permalink / raw)
  To: linux-mips

It is pretty simple to make the WHOLE kseg0 cached or uncached. However,
I only want part of kseg0 uncached. 

I must uncache that region because it gives me too much trouble with DMA
data, however, I don't want to uncache the whole kseg0 segment in order
to get better performance.  Kseg0 is not mapped through TLB, so it seems
I can't achieve my goal through TLB. 

Cite from the book See Mips Run, "if you feel that your system needs to
make uncached references to cacheable memory, then I strongly recommand
that you divide memory into regions that are always accessed uncached
and regions that are always accessed through the cache - and don't let
them overlap. " But how ?

Thanks,

Jimmy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to make part of kseg0 uncached
  2003-05-02 23:56 How to make part of kseg0 uncached Jimmy Zhang
  2003-05-02 23:56 ` Jimmy Zhang
@ 2003-05-03  1:06 ` Ralf Baechle
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2003-05-03  1:06 UTC (permalink / raw)
  To: Jimmy Zhang; +Cc: linux-mips

On Fri, May 02, 2003 at 04:56:44PM -0700, Jimmy Zhang wrote:

> It is pretty simple to make the WHOLE kseg0 cached or uncached. However,
> I only want part of kseg0 uncached. 
> 
> I must uncache that region because it gives me too much trouble with DMA
> data, however, I don't want to uncache the whole kseg0 segment in order
> to get better performance.  Kseg0 is not mapped through TLB, so it seems
> I can't achieve my goal through TLB. 
> 
> Cite from the book See Mips Run, "if you feel that your system needs to
> make uncached references to cacheable memory, then I strongly recommand
> that you divide memory into regions that are always accessed uncached
> and regions that are always accessed through the cache - and don't let
> them overlap. " But how ?

By not using KSEG0 for all your data.  As you figured the caching mode only
can only modifed for the entire KSEG0.  And because some part of your
code such as exception handlers will always run in KSEG0 you never want
to switch KSEG0 to uncached.  Easy solution, KSEG1 maps the same address
space as KSEG0 but is always uncached.  The usual warning applies, using
uncached memory is a bad idea in most cases.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-03  1:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-02 23:56 How to make part of kseg0 uncached Jimmy Zhang
2003-05-02 23:56 ` Jimmy Zhang
2003-05-03  1:06 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox