Re: [PATCH v2 4/5] x86/cpu: Add CPU type to struct cpuinfo_topology

From: Dave Hansen
Date: Tue Oct 22 2024 - 13:09:48 EST


On 10/22/24 09:13, Mario Limonciello wrote:
> On 10/22/2024 11:03, Dave Hansen wrote:
...
>> Having:
>>
>>     TOPO_CPU_TYPE_EFFICIENCY, and
>>     TOPO_CPU_TYPE_PERFORMANCE
>>
>> is totally fine in generic code.  But we also need to preserve the:
>>
>>     TOPO_HW_CPU_TYPE_INTEL_ATOM
>>     TOPO_HW_CPU_TYPE_INTEL_CORE
>>
>> values also for use in vendor-specific code.
>
> What you're suggesting is to keep an enum in the intel.c code and any
> code that needs to match atom vs core can directly use
>
> c->topo.intel_type == TOPO_HW_CPU_TYPE_INTEL_ATOM
>
> Right?

Yep, exactly.

> As it stands today none of this is exported anywhere but debugfs; so
> I wouldn't say we have ABI concerns (yet). Could we wait until the
> one that breaks the mold shows up?

Oh, debugfs is fine. I was, for some reason, assuming that the strings
were getting spit out in sysfs proper somewhere, not debugfs. Sorry for
the noise.