From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B9EA411F95; Wed, 22 Jul 2026 17:21:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784740908; cv=none; b=DJq/BILDHgaUbw2cF0qnjXJcQ9o9WJZlqjNjtG7QUFSxy822VDhH6/sEAWI53DGTY3vgiii202NPnw9b9JKbY5gZBAcAtV5/IxUFCxRhpM6yicD55Ier/XwFc6kY/rlJD1sa7JjDLbhvzyVsS1xZdh5w8BOQ3tmUKhtIACNi6pM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784740908; c=relaxed/simple; bh=AlcHC/s/YIEVyt0pCF8jhgsZAftRoNvQ7vNQm6sfZMg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LNYMqRI/HcpmO/Rr2I8NTmCYsm+A6iEGfIebrJaG0AahJ2IaHB+MTnrxONYs+TEhnc9+t9StSqRPyKgLECromww41LdQXIxYI3PRmTrh87NQ6sDOdYDOdKv+OE6rhrJt2X65vg/9zwaCyzoTIFvsuxJN4+IteKi96ucZxgSb2rI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AHXpKMkO; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AHXpKMkO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C30691F000E9; Wed, 22 Jul 2026 17:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784740907; bh=n4+qE4ZoohVYF/j3isYgupSr93BAAzyHcaf7DgfjxBs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=AHXpKMkO2HaiOLjQtij21gEqEeLylpNpBFJ5KyxuzWUbJsESp3qJ+AGg5XBVCzzcS CiLE8BAwjLbx4FNVDfE8IM1EQDFTS6VUv9AZSAlBoYae6xUcLLpZX0oUGpSmSpW/BN kxLInKY8s8iYTEqmEWlZDMBiWUMgbU6TawTUpKkEHJsJ8lSR0w4uo4yD7J9N9T7O8r nqg7isqUOL3kWu8OgnEN7EW1X42MVptnquDBqHtLfa+J+zXv/8Hn+EJjIIqfw0DGE/ bMzHj40KOtPobKR5ISocxtNdU6XGTwGpvQzJnFyiXit1GzhhJkjMcrrRiluIqzfyUe 4+Yn7UsdVn5nw== Date: Wed, 22 Jul 2026 10:21:40 -0700 From: Nathan Chancellor To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Nicolas Schier , Thomas Bogendoerfer , Daniel Lezcano , Mark Rutland , Marc Zyngier , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Huacai Chen , WANG Xuerui , 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 Message-ID: <20260722172140.GA2947455@ax162> References: <20260722-vdso-arch-clockmodes-v3-0-4c5753191cc4@linutronix.de> <20260722-vdso-arch-clockmodes-v3-1-4c5753191cc4@linutronix.de> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 > --- > 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 " > $@ > +filechk_wrap = echo "\#include " > > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A645CC4453C for ; Wed, 22 Jul 2026 17:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uerNdy16UTjsdxveTfXICxhzXOZdXOQ7Ifd44LHly14=; b=YKMm4zannngAXA tIfg1oVnT8Jn/0q59mUB8xoeijFf0NvyXsrpEkZ7MQ4i+XexEM2uuGU49qirWAwl/y0WbF2n6G8LW ybAeWUgbSwObunB3njS5JOZZkx6vRUevEubo2QmF9Zk7grrQFw13co2VcWqJ4etByGyNq567x5W48 +0AOu3vn3bOq1kOSK1IlZhqqO6o6urihxquz4NL78ZZWq/ldKHDt77gnLUNw8fjT0/Lo3RZhfzZLA V3fJKwJvFGIZAHwDZUodfSZyH6DnnNL3keu+Suatdg6K9eEFxKIDNUaoChoH4CFmVpuwKVOf9IxJ1 bPsXQ+ug/e5RDWiuEG8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wmadj-0000000CRdU-2V7z; Wed, 22 Jul 2026 17:21:51 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wmadh-0000000CRcx-3Gvp; Wed, 22 Jul 2026 17:21:49 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 6FC3960051; Wed, 22 Jul 2026 17:21:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C30691F000E9; Wed, 22 Jul 2026 17:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784740907; bh=n4+qE4ZoohVYF/j3isYgupSr93BAAzyHcaf7DgfjxBs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=AHXpKMkO2HaiOLjQtij21gEqEeLylpNpBFJ5KyxuzWUbJsESp3qJ+AGg5XBVCzzcS CiLE8BAwjLbx4FNVDfE8IM1EQDFTS6VUv9AZSAlBoYae6xUcLLpZX0oUGpSmSpW/BN kxLInKY8s8iYTEqmEWlZDMBiWUMgbU6TawTUpKkEHJsJ8lSR0w4uo4yD7J9N9T7O8r nqg7isqUOL3kWu8OgnEN7EW1X42MVptnquDBqHtLfa+J+zXv/8Hn+EJjIIqfw0DGE/ bMzHj40KOtPobKR5ISocxtNdU6XGTwGpvQzJnFyiXit1GzhhJkjMcrrRiluIqzfyUe 4+Yn7UsdVn5nw== Date: Wed, 22 Jul 2026 10:21:40 -0700 From: Nathan Chancellor To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Nicolas Schier , Thomas Bogendoerfer , Daniel Lezcano , Mark Rutland , Marc Zyngier , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Huacai Chen , WANG Xuerui , 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 Message-ID: <20260722172140.GA2947455@ax162> References: <20260722-vdso-arch-clockmodes-v3-0-4c5753191cc4@linutronix.de> <20260722-vdso-arch-clockmodes-v3-1-4c5753191cc4@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260722-vdso-arch-clockmodes-v3-1-4c5753191cc4@linutronix.de> X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, Jul 22, 2026 at 09:53:27AM +0200, Thomas Wei=DFschuh wrote: > Extend the asm-header stub generation to also handle subdirectories. > An upcoming vdso/ header refactoring requires this. > = > Signed-off-by: Thomas Wei=DFschuh > --- > 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 :=3D $(addprefix $(obj)/, $(syscall-y)) > generated-y :=3D $(addprefix $(obj)/, $(generated-y)) > = > # Remove stale wrappers when the corresponding files are removed from ge= neric-y > -old-headers :=3D $(wildcard $(obj)/*.h) > +old-headers :=3D $(shell test -d $(obj) && find $(obj) -name *.h) > unwanted :=3D $(filter-out $(generic-y) $(generated-y) $(syscall-y),$= (old-headers)) > = > -quiet_cmd_wrap =3D WRAP $@ > - cmd_wrap =3D echo "\#include " > $@ > +filechk_wrap =3D echo "\#include " > = > quiet_cmd_remove =3D REMOVE $(unwanted) > - cmd_remove =3D rm -f $(unwanted) > + cmd_remove =3D rm -f $(unwanted); find $(obj) -type -d -empty -del= ete There appears to be a stray '-' in the find command ('-type -d' instead of '-type d'). > = > quiet_cmd_syshdr =3D SYSHDR $@ > cmd_syshdr =3D $(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