Subject: re: flushing the cache
To: Emmanuel Dreyfus <manu@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: port-mips
Date: 09/16/2001 03:22:50
[Linux/Mips emulation]
Linux/Mips seems to have the strange habit of flushing all caches when
it starts a new program. This is done by the libc through the flushcache
system call.
This system call is nicely implemented: it just flushes all the caches.
How do I do this on mips? Will the MIPS_CACHEFLUSH case in
sys/arch/mips/mips/sys_machdep.c:sys_arch() do the job?
There is also a cachectl system call in linux, and I see a MIPS_CACHECTL
case in the same function. Maybe it fits nicely, what is its purpose
exactly?
netbsd/mips has `flushcache' instructions in libc. look at how those
are implemented.