linux-mips-fnet
[Top] [All Lists]

Re: Caching Functions!

To: Jalaja Devi <jdevi@cosinecom.com>
Subject: Re: Caching Functions!
From: Ralf Baechle <ralf@uni-koblenz.de>
Date: Fri, 17 Nov 2000 13:37:20 +0100
Cc: "'linux-mips@fnet.fr'" <linux-mips@fnet.fr>
In-reply-to: <04E4C688484FD41186E100D0B73EC6EF7AAF7D@exchsrv2.cosinecom.com>; from jdevi@cosinecom.com on Fri, Nov 17, 2000 at 01:38:41AM +0100
References: <04E4C688484FD41186E100D0B73EC6EF7AAF7D@exchsrv2.cosinecom.com>
On Fri, Nov 17, 2000 at 01:38:41AM +0100, Jalaja Devi wrote:

> Hi, Could anyone tell me whether there are any hands-on functions available
> for flushing and validation the cache. I am running Linux2.4 on MIPS. 

The functions

  void _dma_cache_wback_inv(unsigned long start, unsigned long size);
  void _dma_cache_wback(unsigned long start, unsigned long size);
  void _dma_cache_inv(unsigned long start, unsigned long size);

are used to maintain cache coherency in MIPS-specific drivers.  Generic
PCI drivers should use the API documented in Documentation/DMA-mapping.

Thsee functions in include/asm-mips/pgtable.h are not generally suitable for
use in drivers but used the memory managment.  In your case which is RM7000
derived most of them are no-ops:

void flush_cache_all(void);
void flush_cache_mm(struct mm_struct *mm);
void flush_cache_range(struct mm_struct *mm, unsigned long start,
        unsigned long end);
void flush_cache_page(struct vm_area_struct *vma, unsigned long page);
void flush_cache_sigtramp(unsigned long addr);
void flush_page_to_ram(struct page * page);
void flush_icache_range(unsigned long start, unsigned long end);
void flush_icache_page(struct vm_area_struct *vma, struct page *page,
        unsigned long addr);
void flush_dcache_page(struct page *);

  Ralf

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Caching Functions!, Ralf Baechle <=