[Top] [All Lists]

Re: Turning off cache ...

To: Jun Sun <>
Subject: Re: Turning off cache ...
From: Ralf Baechle <>
Date: Fri, 28 Jul 2000 03:08:36 +0200
In-reply-to: <>; from on Thu, Jul 27, 2000 at 05:52:42PM -0700
References: <>
On Thu, Jul 27, 2000 at 05:52:42PM -0700, Jun Sun wrote:

> Is there is easy way to turn off caching entirely?  I understand I need
> to set k0 bits in config register.  What about those C bits in TLB
> entries?  My CPU only has primary cache.

The C bits are per page, the k0 bits are for KSEG0.  If you want to
turn of caching, then you need to:

  - change the k0 bits to uncached on startup, then flush the caches or a
    writeback might corrupt your data.
  - change the caching mode of the usermode pages by modifying the
    definitions for PAGE_NONE etc. in pgtable.h.
  - comment out the cache Create_Dirty_Exclusive instructions in r4xx0.c,
    using them on uncached pages would corrupt data.

Which will make the kernel crawl awfully ...


<Prev in Thread] Current Thread [Next in Thread>