linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: "H. Peter Anvin" <hpa@zytor.com>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	"Theodore Ts'o" <tytso@mit.edu>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Xin Li" <xin@zytor.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Borislav Petkov" <bp@alien8.de>,
	"Brian Gerst" <brgerst@gmail.com>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"James Morse" <james.morse@arm.com>,
	"Jarkko Sakkinen" <jarkko@kernel.org>,
	"Josh Poimboeuf" <jpoimboe@kernel.org>,
	"Kees Cook" <kees@kernel.org>, "Nam Cao" <namcao@linutronix.de>,
	"Oleg Nesterov" <oleg@redhat.com>,
	"Perry Yuan" <perry.yuan@amd.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Thomas Huth" <thuth@redhat.com>,
	"Uros Bizjak" <ubizjak@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-sgx@vger.kernel.org, x86@kernel.org
Subject: [PATCH v4.1 02/10] x86/entry/vdso: move vdso2c to arch/x86/tools
Date: Tue,  6 Jan 2026 13:18:35 -0800	[thread overview]
Message-ID: <20260106211856.560186-2-hpa@zytor.com> (raw)
In-Reply-To: <vdso-cleanup-patch-4.1@zytor.com>

It is generally better to build tools in arch/x86/tools to keep host
cflags proliferation down, and to reduce makefile sequencing issues.
Move the vdso build tool vdso2c into arch/x86/tools in preparation for
refactoring the vdso makefiles.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
---
 arch/x86/Makefile                       |  2 +-
 arch/x86/entry/vdso/Makefile            |  7 +++----
 arch/x86/tools/Makefile                 | 15 ++++++++++-----
 arch/x86/{entry/vdso => tools}/vdso2c.c |  0
 arch/x86/{entry/vdso => tools}/vdso2c.h |  0
 5 files changed, 14 insertions(+), 10 deletions(-)
 rename arch/x86/{entry/vdso => tools}/vdso2c.c (100%)
 rename arch/x86/{entry/vdso => tools}/vdso2c.h (100%)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 1d403a3612ea..9ab7522ced18 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -252,7 +252,7 @@ endif
 
 
 archscripts: scripts_basic
-	$(Q)$(MAKE) $(build)=arch/x86/tools relocs
+	$(Q)$(MAKE) $(build)=arch/x86/tools relocs vdso2c
 
 ###
 # Syscall table generation
diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index 7f833026d5b2..3d9b09f00c70 100644
--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
@@ -38,13 +38,12 @@ VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 \
 $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE
 	$(call if_changed,vdso_and_check)
 
-HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi -I$(srctree)/arch/$(SUBARCH)/include/uapi
-hostprogs += vdso2c
+VDSO2C = $(objtree)/arch/x86/tools/vdso2c
 
 quiet_cmd_vdso2c = VDSO2C  $@
-      cmd_vdso2c = $(obj)/vdso2c $< $(<:%.dbg=%) $@
+      cmd_vdso2c = $(VDSO2C) $< $(<:%.dbg=%) $@
 
-$(obj)/vdso%-image.c: $(obj)/vdso%.so.dbg $(obj)/vdso%.so $(obj)/vdso2c FORCE
+$(obj)/vdso%-image.c: $(obj)/vdso%.so.dbg $(obj)/vdso%.so $(VDSO2C) FORCE
 	$(call if_changed,vdso2c)
 
 #
diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile
index 7278e2545c35..39a183fffd04 100644
--- a/arch/x86/tools/Makefile
+++ b/arch/x86/tools/Makefile
@@ -38,9 +38,14 @@ $(obj)/insn_decoder_test.o: $(srctree)/tools/arch/x86/lib/insn.c $(srctree)/tool
 
 $(obj)/insn_sanity.o: $(srctree)/tools/arch/x86/lib/insn.c $(srctree)/tools/arch/x86/lib/inat.c $(srctree)/tools/arch/x86/include/asm/inat_types.h $(srctree)/tools/arch/x86/include/asm/inat.h $(srctree)/tools/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c
 
-HOST_EXTRACFLAGS += -I$(srctree)/tools/include
-hostprogs	+= relocs
-relocs-objs     := relocs_32.o relocs_64.o relocs_common.o
-PHONY += relocs
-relocs: $(obj)/relocs
+HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi \
+		    -I$(srctree)/arch/$(SUBARCH)/include/uapi
+
+hostprogs	+= relocs vdso2c
+relocs-objs	:= relocs_32.o relocs_64.o relocs_common.o
+
+always-y	:= $(hostprogs)
+
+PHONY += $(hostprogs)
+$(hostprogs): %: $(obj)/%
 	@:
diff --git a/arch/x86/entry/vdso/vdso2c.c b/arch/x86/tools/vdso2c.c
similarity index 100%
rename from arch/x86/entry/vdso/vdso2c.c
rename to arch/x86/tools/vdso2c.c
diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/tools/vdso2c.h
similarity index 100%
rename from arch/x86/entry/vdso/vdso2c.h
rename to arch/x86/tools/vdso2c.h
-- 
2.52.0



  parent reply	other threads:[~2026-01-06 21:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16 21:25 [PATCH v4 00/10] x86/entry/vdso: clean up the vdso build, vdso updates H. Peter Anvin
2025-12-16 21:25 ` [PATCH v4 01/10] x86/entry/vdso: rename vdso_image_* to vdso*_image H. Peter Anvin
2025-12-16 21:25 ` [PATCH v4 02/10] x86/entry/vdso: move vdso2c to arch/x86/tools H. Peter Anvin
2025-12-16 21:25 ` [PATCH v4 03/10] x86/entry/vdso: refactor the vdso build H. Peter Anvin
2025-12-16 21:25 ` [PATCH v4 04/10] x86/entry/vdso32: don't rely on int80_landing_pad for adjusting ip H. Peter Anvin
2025-12-16 21:25 ` [PATCH v4 05/10] x86/entry/vdso32: remove SYSCALL_ENTER_KERNEL macro in sigreturn.S H. Peter Anvin
2025-12-16 21:26 ` [PATCH v4 06/10] x86/entry/vdso32: remove open-coded DWARF " H. Peter Anvin
2025-12-16 21:26 ` [PATCH v4 07/10] x86/entry/vdso: include GNU_PROPERTY and GNU_STACK PHDRs H. Peter Anvin
2025-12-18  2:16   ` Brian Gerst
2025-12-18  6:56     ` Brian Gerst
2025-12-16 21:26 ` [PATCH v4 08/10] x86/vdso: abstract out vdso system call internals H. Peter Anvin
2026-01-06 18:09   ` Uros Bizjak
2025-12-16 21:26 ` [PATCH v4 09/10] x86/cpufeature: replace X86_FEATURE_SYSENTER32 with X86_FEATURE_SYSFAST32 H. Peter Anvin
2025-12-16 21:26 ` [PATCH v4 10/10] x86/entry/vdso32: when using int $0x80, use it directly H. Peter Anvin
2026-01-06 21:18 ` [PATCH v4.1 00/10] x86/entry/vdso: clean up the vdso build, vdso updates H. Peter Anvin
2026-01-06 21:18   ` [PATCH v4.1 01/10] x86/entry/vdso: rename vdso_image_* to vdso*_image H. Peter Anvin
2026-01-06 21:18   ` H. Peter Anvin [this message]
2026-01-06 21:18   ` [PATCH v4.1 03/10] x86/entry/vdso: refactor the vdso build H. Peter Anvin
2026-01-06 21:18   ` [PATCH v4.1 04/10] x86/entry/vdso32: don't rely on int80_landing_pad for adjusting ip H. Peter Anvin
2026-01-06 21:18   ` [PATCH v4.1 05/10] x86/entry/vdso32: remove SYSCALL_ENTER_KERNEL macro in sigreturn.S H. Peter Anvin
2026-01-06 21:18   ` [PATCH v4.1 06/10] x86/entry/vdso32: remove open-coded DWARF " H. Peter Anvin
2026-01-06 21:18   ` [PATCH v4.1 07/10] x86/entry/vdso: include GNU_PROPERTY and GNU_STACK PHDRs H. Peter Anvin
2026-01-07 12:10     ` Andrew Cooper
2026-01-06 21:18   ` [PATCH v4.1 08/10] x86/vdso: abstract out vdso system call internals H. Peter Anvin
2026-01-06 21:18   ` [PATCH v4.1 09/10] x86/cpufeature: replace X86_FEATURE_SYSENTER32 with X86_FEATURE_SYSFAST32 H. Peter Anvin
2026-01-06 21:18   ` [PATCH v4.1 10/10] x86/entry/vdso32: when using int $0x80, use it directly H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260106211856.560186-2-hpa@zytor.com \
    --to=hpa@zytor.com \
    --cc=Jason@zx2c4.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=james.morse@arm.com \
    --cc=jarkko@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namcao@linutronix.de \
    --cc=oleg@redhat.com \
    --cc=perry.yuan@amd.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=thuth@redhat.com \
    --cc=tytso@mit.edu \
    --cc=ubizjak@gmail.com \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox