linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>
To: Borislav Petkov <bp@alien8.de>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>,
	<x86@kernel.org>, <linux-kernel@vger.kernel.org>,
	<DavidWang@zhaoxin.com>, <CooperYan@zhaoxin.com>,
	<QiyuanWang@zhaoxin.com>, <HerryYang@zhaoxin.com>
Subject: Re: [PATCH] x86/cpu: remove redundant cpu_detect_cache_sizes
Date: Sat, 18 Jan 2020 10:18:29 +0800	[thread overview]
Message-ID: <ecc18541-f3c3-b887-0c4d-b9d404b0246b@zhaoxin.com> (raw)
In-Reply-To: <20200117184720.GB31472@zn.tnic>



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

  reply	other threads:[~2020-01-18  2:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15  8:00 [PATCH] x86/cpu: remove redundant cpu_detect_cache_sizes Tony W Wang-oc
2020-01-17 18:47 ` Borislav Petkov
2020-01-18  2:18   ` Tony W Wang-oc [this message]
2020-01-20 15:39 ` [tip: x86/cpu] x86/cpu: Remove redundant cpu_detect_cache_sizes() call tip-bot2 for Tony W Wang-oc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecc18541-f3c3-b887-0c4d-b9d404b0246b@zhaoxin.com \
    --to=tonywwang-oc@zhaoxin.com \
    --cc=CooperYan@zhaoxin.com \
    --cc=DavidWang@zhaoxin.com \
    --cc=HerryYang@zhaoxin.com \
    --cc=QiyuanWang@zhaoxin.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).