From: Nathan Chancellor <nathan@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>, Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Nicolas Schier <nsc@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Marc Zyngier <maz@kernel.org>, Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org, linux-mips@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, loongarch@lists.linux.dev
Subject: Re: [PATCH v3 1/7] kbuild: support generated asm-headers in subdirectories
Date: Wed, 22 Jul 2026 10:21:40 -0700 [thread overview]
Message-ID: <20260722172140.GA2947455@ax162> (raw)
In-Reply-To: <20260722-vdso-arch-clockmodes-v3-1-4c5753191cc4@linutronix.de>
On Wed, Jul 22, 2026 at 09:53:27AM +0200, Thomas Weißschuh wrote:
> Extend the asm-header stub generation to also handle subdirectories.
> An upcoming vdso/ header refactoring requires this.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> scripts/Makefile.asm-headers | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
> index 8a4856e74180..772b53ffdeb4 100644
> --- a/scripts/Makefile.asm-headers
> +++ b/scripts/Makefile.asm-headers
> @@ -48,14 +48,13 @@ syscall-y := $(addprefix $(obj)/, $(syscall-y))
> generated-y := $(addprefix $(obj)/, $(generated-y))
>
> # Remove stale wrappers when the corresponding files are removed from generic-y
> -old-headers := $(wildcard $(obj)/*.h)
> +old-headers := $(shell test -d $(obj) && find $(obj) -name *.h)
> unwanted := $(filter-out $(generic-y) $(generated-y) $(syscall-y),$(old-headers))
>
> -quiet_cmd_wrap = WRAP $@
> - cmd_wrap = echo "\#include <asm-generic/$*.h>" > $@
> +filechk_wrap = echo "\#include <asm-generic/$*.h>"
>
> quiet_cmd_remove = REMOVE $(unwanted)
> - cmd_remove = rm -f $(unwanted)
> + cmd_remove = rm -f $(unwanted); find $(obj) -type -d -empty -delete
There appears to be a stray '-' in the find command ('-type -d' instead
of '-type d').
>
> quiet_cmd_syshdr = SYSHDR $@
> cmd_syshdr = $(CONFIG_SHELL) $(syshdr) \
> @@ -74,8 +73,8 @@ all: $(generic-y) $(syscall-y)
> $(if $(unwanted),$(call cmd,remove))
> @:
>
> -$(obj)/%.h: $(srctree)/$(generic)/%.h
> - $(call cmd,wrap)
> +$(obj)/%.h: $(srctree)/$(generic)/%.h FORCE
> + $(call filechk,wrap)
>
> $(obj)/unistd_%.h: $(syscalltbl) $(syshdr) FORCE
> $(call if_changed,syshdr)
>
> --
> 2.55.0
--
Cheers,
Nathan
WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>, Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@kernel.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Nicolas Schier <nsc@kernel.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Marc Zyngier <maz@kernel.org>, Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org, linux-mips@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, loongarch@lists.linux.dev
Subject: Re: [PATCH v3 1/7] kbuild: support generated asm-headers in subdirectories
Date: Wed, 22 Jul 2026 10:21:40 -0700 [thread overview]
Message-ID: <20260722172140.GA2947455@ax162> (raw)
In-Reply-To: <20260722-vdso-arch-clockmodes-v3-1-4c5753191cc4@linutronix.de>
On Wed, Jul 22, 2026 at 09:53:27AM +0200, Thomas Weißschuh wrote:
> Extend the asm-header stub generation to also handle subdirectories.
> An upcoming vdso/ header refactoring requires this.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> scripts/Makefile.asm-headers | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
> index 8a4856e74180..772b53ffdeb4 100644
> --- a/scripts/Makefile.asm-headers
> +++ b/scripts/Makefile.asm-headers
> @@ -48,14 +48,13 @@ syscall-y := $(addprefix $(obj)/, $(syscall-y))
> generated-y := $(addprefix $(obj)/, $(generated-y))
>
> # Remove stale wrappers when the corresponding files are removed from generic-y
> -old-headers := $(wildcard $(obj)/*.h)
> +old-headers := $(shell test -d $(obj) && find $(obj) -name *.h)
> unwanted := $(filter-out $(generic-y) $(generated-y) $(syscall-y),$(old-headers))
>
> -quiet_cmd_wrap = WRAP $@
> - cmd_wrap = echo "\#include <asm-generic/$*.h>" > $@
> +filechk_wrap = echo "\#include <asm-generic/$*.h>"
>
> quiet_cmd_remove = REMOVE $(unwanted)
> - cmd_remove = rm -f $(unwanted)
> + cmd_remove = rm -f $(unwanted); find $(obj) -type -d -empty -delete
There appears to be a stray '-' in the find command ('-type -d' instead
of '-type d').
>
> quiet_cmd_syshdr = SYSHDR $@
> cmd_syshdr = $(CONFIG_SHELL) $(syshdr) \
> @@ -74,8 +73,8 @@ all: $(generic-y) $(syscall-y)
> $(if $(unwanted),$(call cmd,remove))
> @:
>
> -$(obj)/%.h: $(srctree)/$(generic)/%.h
> - $(call cmd,wrap)
> +$(obj)/%.h: $(srctree)/$(generic)/%.h FORCE
> + $(call filechk,wrap)
>
> $(obj)/unistd_%.h: $(syscalltbl) $(syshdr) FORCE
> $(call if_changed,syshdr)
>
> --
> 2.55.0
--
Cheers,
Nathan
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-07-22 17:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 7:53 [PATCH v3 0/7] vDSO: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdeffery Thomas Weißschuh
2026-07-22 7:53 ` Thomas Weißschuh
2026-07-22 7:53 ` [PATCH v3 1/7] kbuild: support generated asm-headers in subdirectories Thomas Weißschuh
2026-07-22 7:53 ` Thomas Weißschuh
2026-07-22 17:21 ` Nathan Chancellor [this message]
2026-07-22 17:21 ` Nathan Chancellor
2026-07-22 7:53 ` [PATCH v3 2/7] vDSO: Make clockmode constants available without CONFIG_GENERIC_GETTIMEOFDAY Thomas Weißschuh
2026-07-22 7:53 ` Thomas Weißschuh
2026-07-22 7:53 ` [PATCH v3 3/7] MIPS: csrc-r4k: Remove CONFIG_GENERIC_GETTIMEOFDAY ifdeffery Thomas Weißschuh
2026-07-22 7:53 ` Thomas Weißschuh
2026-07-22 7:53 ` [PATCH v3 4/7] clocksource/drivers/mips-gic-timer: " Thomas Weißschuh
2026-07-22 7:53 ` Thomas Weißschuh
2026-07-22 7:53 ` [PATCH v3 5/7] clocksource/drivers/arm_arch_timer: " Thomas Weißschuh
2026-07-22 7:53 ` Thomas Weißschuh
2026-07-22 8:10 ` Marc Zyngier
2026-07-22 8:10 ` Marc Zyngier
2026-07-22 7:53 ` [PATCH v3 6/7] clocksource/drivers/timer-riscv: " Thomas Weißschuh
2026-07-22 7:53 ` Thomas Weißschuh
2026-07-22 7:53 ` [PATCH v3 7/7] LoongArch: " Thomas Weißschuh
2026-07-22 7:53 ` Thomas Weißschuh
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=20260722172140.GA2947455@ax162 \
--to=nathan@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=loongarch@lists.linux.dev \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=nsc@kernel.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=tglx@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=vincenzo.frascino@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.