On Mon, May 2, 2011 at 9:44 AM, Carmelo AMOROSO <[email protected]> wrote: > +/* Decode the cpu dcache way size from the dcache shape */ > +/* Bits 0-3 contains associativity; bits 4-7 contains log2 of line size */ > + > +#define shape_to_waysize(__shape) ((__shape & ~0xff) / (__shape & 0xf))
It may be useful to add helper macros/functions for CACHESHAPE decoding to a common header file, and try to establish the Alpha/SH encoding as a de-facto standard on MIPS and other architectures. (I guess it goes without saying that the SH D$ will never be fully associative, and av[AT_L1D_CACHESHAPE] will never be 0?) _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
