On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > @@ -173,5 +176,7 @@ static void __attribute__((constructor)) > init_cache_info(void) > fallback_cache_info(&isize, &dsize); > > qemu_icache_linesize = isize; > + qemu_icache_linesize_log = 31 - clz32(isize); > qemu_dcache_linesize = dsize; > + qemu_dcache_linesize_log = 31 - clz32(dsize);
Either pow2ceil or realize that linesize is already a power of 2 and use ctz32. r~