Re: [PATCH v2 01/15] x86/cpu: Move intel-family to arch-independent headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/11/21 1:53 PM, Winiarska, Iwona wrote:
>> If you're in include/linux/x86-hacks.h, what prevents you from doing
>>
>> #include "../../arch/x86/include/asm/intel-family.h"
>>
>> ?
>>
>> In the end, to the compiler, it's just a file in a weird location in the
>> tree.  I think I'd prefer one weird include to moving that file out of
>> arch/x86.
> Using relative includes in include/linux is uncommon (I can see just one usage
> in libfdt.h pulling stuff from scripts), so I thought I can't use it in this way
> (seems slightly hacky to pull stuff from outside include path).
> 
> But if that would be ok, it looks like a good alternative to avoid duplication
> in this case.

If you don't want to do it from a header, you can also do it directly
from a .c file that's outside of arch/x86.

I think that's a much better alternative than moving stuff elsewhere.



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux