From: Randy Dunlap <rdunlap@infradead.org>
To: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
x86@kernel.org, Borislav Petkov <bp@suse.de>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Tony Luck <tony.luck@intel.com>, Len Brown <len.brown@intel.com>,
"Ravi V. Shankar" <ravi.v.shankar@intel.com>,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
Dave Hansen <dave.hansen@intel.com>,
"Gautham R. Shenoy" <ego@linux.vnet.ibm.com>,
Kan Liang <kan.liang@linux.intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH 1/4] drivers core: Introduce CPU type sysfs interface
Date: Fri, 9 Oct 2020 20:14:50 -0700 [thread overview]
Message-ID: <011d6f26-0a8c-a726-a81c-cd18df43c366@infradead.org> (raw)
In-Reply-To: <20201006011550.GG6041@ranerica-svr.sc.intel.com>
On 10/5/20 6:15 PM, Ricardo Neri wrote:
> On Fri, Oct 02, 2020 at 08:27:41PM -0700, Randy Dunlap wrote:
>> On 10/2/20 6:17 PM, Ricardo Neri wrote:
>>> +/**
>>> + * arch_get_cpu_type() - Get the CPU type number
>>> + * @cpu: Index of the CPU of which the index is needed
>>> + *
>>> + * Get the CPU type number of @cpu, a non-zero unsigned 32-bit number that
>
> Thank you for your feedback Randy!
>
>> Are you sure that @cpu is non-zero?
>
> This is the intent. Maybe it can be reworked to return -EINVAL instead?
> I gues it is plausible but less likely that an arch defines a type as
> 0xffffffea;
You lost me here.
>>
>>> + * uniquely identifies a type of CPU micro-architecture. All CPUs of the same
>>> + * type have the same type number. Type numbers are defined by each CPU
>>> + * architecture.
>>> + */
>>> +u32 __weak arch_get_cpu_type(int cpu)
>>> +{
>>> + return 0;
>>> +}
>>
>> arch_get_cpu_type() in patch 4/4 allows @cpu to be 0.
>
> It should not return 0 if the system does not have
> X86_FEATURE_HYBRID_CPU. The currently existing CPU types are all
> non-zero as per the Intel SDM. Am I missing anything?
@cpu is a cpu index, not a cpu type.
--
~Randy
next prev parent reply other threads:[~2020-10-10 3:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-03 1:17 [PATCH 0/4] drivers core: Introduce CPU type sysfs interface Ricardo Neri
2020-10-03 1:17 ` [PATCH 1/4] " Ricardo Neri
2020-10-03 3:27 ` Randy Dunlap
2020-10-06 1:15 ` Ricardo Neri
2020-10-10 3:14 ` Randy Dunlap [this message]
2020-10-03 8:53 ` Greg Kroah-Hartman
2020-10-03 11:05 ` Greg Kroah-Hartman
2020-10-06 1:08 ` Ricardo Neri
2020-10-06 0:57 ` Ricardo Neri
2020-10-06 7:37 ` Greg Kroah-Hartman
2020-10-07 3:14 ` Ricardo Neri
2020-10-07 5:15 ` Greg Kroah-Hartman
2020-10-08 3:34 ` Ricardo Neri
2020-11-12 6:19 ` Brice Goglin
2020-11-12 6:42 ` Greg Kroah-Hartman
2020-11-12 9:10 ` Brice Goglin
2020-11-12 10:49 ` Greg Kroah-Hartman
2020-11-17 15:55 ` Brice Goglin
2020-11-18 10:45 ` Brice Goglin
2020-11-18 10:57 ` Greg Kroah-Hartman
[not found] ` <38f290d2-4c3a-d1b0-f3cc-a0897ea10abd@gmail.com>
2020-11-12 11:34 ` Greg Kroah-Hartman
2020-11-19 8:25 ` Fox Chen
2020-10-03 1:17 ` [PATCH 2/4] x86/cpu: Describe hybrid CPUs in cpuinfo_x86 Ricardo Neri
2020-10-03 4:07 ` kernel test robot
2020-10-03 1:17 ` [PATCH 3/4] x86/cpu/intel: Add function to get name of hybrid CPU types Ricardo Neri
2020-10-03 1:17 ` [PATCH 4/4] x86/cpu/topology: Implement the CPU type sysfs interface Ricardo Neri
2020-10-03 3:33 ` Randy Dunlap
2020-10-03 5:28 ` kernel test robot
2020-10-03 8:55 ` Greg Kroah-Hartman
2020-10-06 1:05 ` Ricardo Neri
2020-10-03 8:49 ` [PATCH 0/4] drivers core: Introduce " Borislav Petkov
2020-10-06 0:27 ` Ricardo Neri
2020-10-06 8:51 ` Qais Yousef
2020-10-07 2:50 ` Ricardo Neri
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=011d6f26-0a8c-a726-a81c-cd18df43c366@infradead.org \
--to=rdunlap@infradead.org \
--cc=ak@linux.intel.com \
--cc=bp@suse.de \
--cc=dave.hansen@intel.com \
--cc=ego@linux.vnet.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=kan.liang@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=ravi.v.shankar@intel.com \
--cc=ricardo.neri-calderon@linux.intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--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).