[RFC] [yeeloong] cache algorithms

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Mon Sep 27 08:12:06 UTC 2010


On Loongson the cache maintenance routines are subtly different (took me
a very long time to figure out). Here I attach the patch which would
adapt the algorithms for Loongson but it would also break other CPUs so
I would like your comment on how to best incorporate it into current
tree? The problems are:
1) Other bits are used to specify the way
2) i-cache has only index_invalidate and no hit_invalidate
3) secondary cache flush is a must on dma operations
Is it better to copy-paste mipsNN_* to something like mipsNN_loongson_*
or is it better to use #ifdef's ?
Should I define mips_sdcache_* to a nop on non-Loongson?


-- 

Regards
Vladimir 'φ-coder/phcoder' Serbinenko



More information about the freebsd-mips mailing list