]> Git Repo - linux.git/commitdiff
x86/build: Use obj-y to descend into arch/x86/virt/
authorMasahiro Yamada <[email protected]>
Sat, 30 Mar 2024 06:05:54 +0000 (15:05 +0900)
committerIngo Molnar <[email protected]>
Sat, 30 Mar 2024 09:41:49 +0000 (10:41 +0100)
Commit c33621b4c5ad ("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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
arch/x86/Kbuild
arch/x86/Makefile
arch/x86/virt/Makefile

index 6a1f36df6a181761d805d99279539874095f096a..cf0ad89f5639da8a9eaa502eb1a8b8f2432fa1ba 100644 (file)
@@ -28,7 +28,7 @@ obj-y += net/
 
 obj-$(CONFIG_KEXEC_FILE) += purgatory/
 
-obj-y += virt/svm/
+obj-y += virt/
 
 # for cleaning
 subdir- += boot tools
index 662d9d4033e6b855c327615fa20765f3b374f644..5ab93fcdd691dcf2d58e3c5c5e4dff67838ed951 100644 (file)
@@ -251,8 +251,6 @@ archheaders:
 
 libs-y  += arch/x86/lib/
 
-core-y += arch/x86/virt/
-
 # drivers-y are linked after core-y
 drivers-$(CONFIG_MATH_EMULATION) += arch/x86/math-emu/
 drivers-$(CONFIG_PCI)            += arch/x86/pci/
index 1e36502cd7383ad031d3ceaa3ddced2703e4f61d..ea343fc392dcc89f0aa2690cebb25fe6fa68aee8 100644 (file)
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0-only
-obj-y  += vmx/
+obj-y  += svm/ vmx/
This page took 0.059624 seconds and 4 git commands to generate.