Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 3f1a9bc

Browse files
masahir0yIngo Molnar
authored andcommitted
x86/build: Use obj-y to descend into arch/x86/virt/
Commit c33621b ("x86/virt/tdx: Wire up basic SEAMCALL functions") introduced a new instance of core-y instead of the standardized obj-y syntax. X86 Makefiles descend into subdirectories of arch/x86/virt inconsistently; into arch/x86/virt/ via core-y defined in arch/x86/Makefile, but into arch/x86/virt/svm/ via obj-y defined in arch/x86/Kbuild. This is problematic when you build a single object in parallel because multiple threads attempt to build the same file. $ make -j$(nproc) arch/x86/virt/vmx/tdx/seamcall.o [ snip ] AS arch/x86/virt/vmx/tdx/seamcall.o AS arch/x86/virt/vmx/tdx/seamcall.o fixdep: error opening file: arch/x86/virt/vmx/tdx/.seamcall.o.d: No such file or directory make[4]: *** [scripts/Makefile.build:362: arch/x86/virt/vmx/tdx/seamcall.o] Error 2 Use the obj-y syntax, as it works correctly. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20240330060554.18524-1-masahiroy@kernel.org
1 parent 0f4a1e8 commit 3f1a9bc

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

arch/x86/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ obj-y += net/
2828

2929
obj-$(CONFIG_KEXEC_FILE) += purgatory/
3030

31-
obj-y += virt/svm/
31+
obj-y += virt/
3232

3333
# for cleaning
3434
subdir- += boot tools

arch/x86/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ archheaders:
251251

252252
libs-y += arch/x86/lib/
253253

254-
core-y += arch/x86/virt/
255-
256254
# drivers-y are linked after core-y
257255
drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
258256
drivers-$(CONFIG_PCI) += arch/x86/pci/

arch/x86/virt/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
obj-y += vmx/
2+
obj-y += svm/ vmx/

0 commit comments

Comments
 (0)