qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 01/12] cacheinfo: add i/d cache_linesize_log


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 01/12] cacheinfo: add i/d cache_linesize_log
Date: Tue, 11 Sep 2018 14:57:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 11/09/2018 14:16, Richard Henderson wrote:
> 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.

Changed to ctz32.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]