Re: [PATCH v6 3/5] x86/cpufeatures: Generate a feature mask header based on build config
From: Xin Li
Date: Wed Mar 05 2025 - 02:31:53 EST
On 3/4/2025 2:29 AM, Borislav Petkov wrote:
On Tue, Mar 04, 2025 at 02:18:51AM -0800, Xin Li wrote:
It seems that 'archprepare' works, however I'm not sure if it's the best
choice. Any suggestion?
Why do you even need featuremasks_hdr as a prereq?
I'm not sure I'm calling it a prereq; it needs to be generated after we
have a build config and before any kernel source file is built.
"perpare" is defined as a post config build target used before starting
building the kernel or the modules, and "archprepare" is used in arch
Makefiles. E.g., on x86, "archprepare" is already used for ORC header
generation:
ifdef CONFIG_UNWINDER_ORC
orc_hash_h := arch/$(SRCARCH)/include/generated/asm/orc_hash.h
orc_hash_sh := $(srctree)/scripts/orc_hash.sh
targets += $(orc_hash_h)
quiet_cmd_orc_hash = GEN $@
cmd_orc_hash = mkdir -p $(dir $@); \
$(CONFIG_SHELL) $(orc_hash_sh) < $< > $@
$(orc_hash_h): $(srctree)/arch/x86/include/asm/orc_types.h
$(orc_hash_sh) FORCE
$(call if_changed,orc_hash)
archprepare: $(orc_hash_h)
endif
In any case, you'd have to redo your patches - we've zapped them from tip.
Sorry for the build noise. Ofc they should be zapped.
BTW, I'm asking if this build check could be added to Intel-LKP.
Want me to add it btw?
Yes pls.
Sure.
However it needs to change Makefile in the root directory, which is not
maintained in tip, so I will send a separate patch to KERNEL BUILD
maintainers and list. Make sense?
Thanks!
Xin