From: Tiwei Bie <tiwei.bie@linux.dev>
To: linux@weissschuh.net
Cc: richard@nod.at, anton.ivanov@cambridgegreys.com,
johannes@sipsolutions.net, johannes.berg@intel.com,
linux-um@lists.infradead.org, linux-kernel@vger.kernel.org,
tiwei.btw@antgroup.com, tiwei.bie@linux.dev
Subject: Re: [PATCH] um: Avoid circular dependency on asm-offsets in pgtable.h
Date: Tue, 28 Oct 2025 18:17:50 +0800 [thread overview]
Message-ID: <20251028101750.3263748-1-tiwei.bie@linux.dev> (raw)
In-Reply-To: <20251028-uml-offsets-circular-v1-1-601c363cfaaa@weissschuh.net>
On Tue, 28 Oct 2025 10:02:55 +0100, Thomas Weißschuh wrote:
> Recent changes have added an include of as-layout.h to pgtable.h.
> However this introduces a circular dependency during asm-offsets
> generation as as-layout.h depends on asm-offsets and pgtable.h is an
> input for asm-offsets.
>
> Building from a clean state results in the following error:
>
> CC arch/um/kernel/asm-offsets.s
> In file included from arch/um/include/asm/pgtable.h:48,
> from include/linux/pgtable.h:6,
> from include/linux/mm.h:31,
> from include/linux/pid_namespace.h:7,
> from include/linux/ptrace.h:10,
> from include/linux/audit.h:13,
> from arch/um/kernel/asm-offsets.c:8:
> arch/um/include/shared/as-layout.h:9:10: fatal error: generated/asm-offsets.h: No such file or directory
> 9 | #include <generated/asm-offsets.h>
> | ^~~~~~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[4]: *** [scripts/Makefile.build:182: arch/um/kernel/asm-offsets.s] Error 1
>
> As the inclusion of as-layout.h in pgtable.h is not yet needed while
> asm-offsets are generated, break the dependency here.
>
> Fixes: a7f7dbae94a5 ("um: Remove file-based iomem emulation support")
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> arch/um/include/asm/pgtable.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
> index 1a0d7405e97c..3b42b0f45bf6 100644
> --- a/arch/um/include/asm/pgtable.h
> +++ b/arch/um/include/asm/pgtable.h
> @@ -45,7 +45,9 @@ extern unsigned long *empty_zero_page;
> * area for the same reason. ;)
> */
>
> +#ifndef COMPILE_OFFSETS
> #include <as-layout.h> /* for high_physmem */
> +#endif
Oops, my bad. Thanks for the fix!
Reviewed-by: Tiwei Bie <tiwei.btw@antgroup.com>
Regards,
Tiwei
prev parent reply other threads:[~2025-10-28 10:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 9:02 [PATCH] um: Avoid circular dependency on asm-offsets in pgtable.h Thomas Weißschuh
2025-10-28 10:17 ` Tiwei Bie [this message]
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=20251028101750.3263748-1-tiwei.bie@linux.dev \
--to=tiwei.bie@linux.dev \
--cc=anton.ivanov@cambridgegreys.com \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linux@weissschuh.net \
--cc=richard@nod.at \
--cc=tiwei.btw@antgroup.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;
as well as URLs for NNTP newsgroup(s).