Re: [tip: perf/core] x86/cpu: Add helper function to get the type of the current hybrid CPU
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip: perf/core] x86/cpu: Add helper function to get the type of the current hybrid CPU
- From: Dave Hansen <dave.hansen@xxxxxxxxx>
- Date: Fri, 5 May 2023 09:42:36 -0700
- Cc: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>, "Peter Zijlstra (Intel)" <peterz@xxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Len Brown <len.brown@xxxxxxxxx>, Borislav Petkov <bp@xxxxxxx>, x86@xxxxxxxxxx
- In-reply-to: <161891560955.29796.10811256921836669612.tip-bot2@tip-bot2>
- References: <1618237865-33448-3-git-send-email-kan.liang@linux.intel.com> <161891560955.29796.10811256921836669612.tip-bot2@tip-bot2>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0
On 4/20/21 03:46, tip-bot2 for Ricardo Neri wrote:
> +#define X86_HYBRID_CPU_TYPE_ID_SHIFT 24
> +
> +/**
> + * get_this_hybrid_cpu_type() - Get the type of this hybrid CPU
> + *
> + * Returns the CPU type [31:24] (i.e., Atom or Core) of a CPU in
> + * a hybrid processor. If the processor is not hybrid, returns 0.
> + */
> +u8 get_this_hybrid_cpu_type(void)
> +{
> + if (!cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
> + return 0;
> +
> + return cpuid_eax(0x0000001a) >> X86_HYBRID_CPU_TYPE_ID_SHIFT;
> +}
Hi Folks,
Sorry to dredge up an old thread. But, where does this information
about "If the processor is not hybrid, returns 0." come from?
What is there to keep cpuid_eax(0x0000001a) from having 0x0 in those
bits? Seems to me like 0 is theoretically a valid hybrid CPU type. Right?
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]