lkml.org 
[lkml]   [2020]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86/cpu: remove redundant cpu_detect_cache_sizes
From
Date


On 18/01/2020 02:47, Borislav Petkov wrote:
> On Wed, Jan 15, 2020 at 04:00:57PM +0800, Tony W Wang-oc wrote:
>> Before call cpu_detect_cache_sizes get l2size from CPUID.80000006,
>> these CPUs have called init_intel_cacheinfo get l2size/l3size from
>> CPUID.4.
>
> Questions:
>
> * Does CPUID(4) give the same result as CPUID(80000006) on those CPUs?

Yes.
On these CPUs, CPUID(80000006).EBX for x86_tlbsize is reserved,
CPUID(80000006).ECX for l2size has the same result as CPUID(4).

>
> * cpu_detect_cache_sizes() sets c->x86_tlbsize while
> init_intel_cacheinfo() would set it only when it calls the former
> function - cpu_detect_cache_sizes() - at the end:
>
> if (!l2)
> cpu_detect_cache_sizes(c);
>
> Does that happen on those CPUs?

No.
On these CPUs, will not call the function cpu_detect_cache_sizes(c).
l2size will get from CPUID(4) and c->x86_tlbsize remain its default
value of 0.

Sincerely
TonyWWang-oc

\
 
 \ /
  Last update: 2020-01-18 03:18    [W:0.048 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site