Thread (49 messages) 49 messages, 7 authors, 2021-11-16

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

From: Dave Hansen <hidden>
Date: 2021-10-11 23:12:27
Also in: linux-arm-kernel, linux-devicetree, linux-doc, linux-hwmon, lkml, openbmc

On 10/11/21 1:53 PM, Winiarska, Iwona wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help