Re: [PATCH 1/6] x86/cpu: Break Vendor/Family/Model macros into separate header
From: Dave Hansen
Date: Tue Feb 10 2026 - 17:18:06 EST
On 2/10/26 14:13, Sohil Mehta wrote:
> On 2/6/2026 3:14 PM, Dave Hansen wrote:
>> The intel-family.h header uses Vendor/Family/Model macros but it does not
>> #include the header where they are defined. If that header is included,
>> the build blows up in #include hell.
>>
>
> Is the cause of the #include hell the single line in peci-cpu.h?
>
> #include "../../arch/x86/include/asm/intel-family.h"
Maybe. I didn't investigate too deeply because the fix here at least
moved the needle in the right direction.
...
> AFAIU, the PECI driver is the only user of this VFM stuff in non-x86
> code. Are we expecting other generic usages for it?
Definitely not. PECI is weird.
> The VFM macros and the VFM model defines usually go hand-in-hand. Is
> there a reason for keeping intel-family header in arch/x86 but the VFM
> one in asm-generic/?
We should just move the Intel header as long as it's used in generic code.
> I wonder if it would more consistent to move the VFM macros into
> arch/x86/include/asm/vfm.h?
>
> And then let the PECI driver do:
>
> #include "../../arch/x86/include/asm/vfm.h"
>
> Though, intel-family.h would probably need:
>
> #ifdef CONFIG_X86
> #include <asm/vfm.h>
> #endif
The reality is that we have non-x86 code using an x86 header. That's
crazy and it's very very unusual and we're probably going to keep
accidentally breaking it.
Our only hope is to just move all that gunk to generic code for _real_.