Cacheflush Syscall

From LinuxMIPS
Jump to: navigation, search

NAME

cacheflush - flush contents of instruction and/or data cache

SYNOPSIS

       #include <asm/cachectl.h>

       int cacheflush(char *addr, int nbytes, int cache);

DESCRIPTION

cacheflush flushes contents of indicated cache(s) for user addresses in the range addr to (addr + nbytes - 1). Cache may be one of:

ICACHE 
Flush the instruction cache.
DCACHE 
Write back to memory and invalidate the affected valid cache lines.
BCACHE 
Same as (ICACHE|DCACHE).

RETURN VALUE

cacheflush returns 0 on success or -1 on error. If errors are detected, errno will indicate the error.

ERRORS

EINVAL 
cache parameter is not one of ICACHE, DCACHE, or BCACHE.
EFAULT 
Some or all of the address range addr to (addr+nbytes-1) is not accessible.

BUGS

The current implementation ignores the addr and nbytes parameters. Therefore always the whole cache is flushed.

NOTE

This system call is only available on MIPS based systems. It should not be used in programs intended to be portable.

See also

NewPP limit report Cached time: Cache expiry: 86400 Dynamic content: false CPU time usage: 0.010 seconds Real time usage: 0.040 seconds Preprocessor visited node count: 40/1000000 Preprocessor generated node count: 56/1000000 Post‐expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Highest expansion depth: 2/40 Expensive parser function count: 0/100 Transclusion expansion time report (%,ms,calls,template) 100.00% -total Saved in parser cache with key wikidb:pcache:idhash:1221-0!*!0!!*!*!* and timestamp and revision id 11813