[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e4e1723-321a-4e8e-bbac-e2e5d8b08bfc@zytor.com>
Date: Tue, 4 Mar 2025 02:18:51 -0800
From: Xin Li <xin@...or.com>
To: Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>
Cc: "Aithal, Srikanth" <sraithal@....com>, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
dave.hansen@...ux.intel.com, x86@...nel.org, will@...nel.org,
peterz@...radead.org, yury.norov@...il.com, akpm@...ux-foundation.org,
acme@...nel.org, namhyung@...nel.org, brgerst@...il.com,
andrew.cooper3@...rix.com, nik.borisov@...e.com
Subject: Re: [PATCH v6 3/5] x86/cpufeatures: Generate a feature mask header
based on build config
On 3/3/2025 5:25 AM, Borislav Petkov wrote:
> On Mon, Mar 03, 2025 at 04:05:54AM -0800, H. Peter Anvin wrote:
>> "make headers" on an unconfigured tree should presumably only produce the uapi headers, not kernel-internal ones, one could surmise?
>
> Well, that's kinda a question for you guys:
>
> cfc7686900a87 (H. Peter Anvin (Intel) 2025-02-28 00:23:36 -0800 281)archheaders: $(out)/$(featuremasks_hdr)
> 1f57d5d85ba7f (Ingo Molnar 2015-06-03 18:36:41 +0200 282) $(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all
>
> and the headers target has
>
> headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts
>
> as its prereq.
>
> Judging by
>
> 59b2bd05f5f4 ("kbuild: add 'headers' target to build up uapi headers in usr/include")
It seems that 'archprepare' works, however I'm not sure if it's the best
choice. Any suggestion?
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 60583987d320..2db535958b8d 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -276,9 +276,9 @@ $(out)/$(featuremasks_hdr): $(featuremasks_awk)
$(cpufeatures_hdr) $(KCONFIG_CON
$(shell mkdir -p $(out))
$(call if_changed,gen_featuremasks)
-targets += $(out)/$(featuremasks_hdr)
+archprepare: $(out)/$(featuremasks_hdr)
-archheaders: $(out)/$(featuremasks_hdr)
+archheaders:
$(Q)$(MAKE) $(build)=arch/x86/entry/syscalls all
###
>
> it sure looks like "make headers" should be for uapi headers only.
>
> Oh, and it should be documented in "make help" output btw.
Want me to add it btw?
Thanks!
Xin
Powered by blists - more mailing lists