From: Tiwei Bie <tiwei.bie@linux.dev>
To: richard@nod.at, anton.ivanov@cambridgegreys.com,
johannes@sipsolutions.net
Cc: linux-um@lists.infradead.org, tiwei.btw@antgroup.com,
tiwei.bie@linux.dev
Subject: [PATCH v2 1/4] um: Make host_task_size a local variable
Date: Mon, 27 Oct 2025 13:45:16 +0800 [thread overview]
Message-ID: <20251027054519.1996090-2-tiwei.bie@linux.dev> (raw)
In-Reply-To: <20251027054519.1996090-1-tiwei.bie@linux.dev>
From: Tiwei Bie <tiwei.btw@antgroup.com>
Currently, host_task_size is a global variable, but it is only used
in linux_main() to compute stub_start and task_size. Make it a local
variable to limit its scope to where it is actually needed.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
arch/um/include/shared/as-layout.h | 1 -
arch/um/kernel/um_arch.c | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h
index 7c7e17bce403..02ef258e3395 100644
--- a/arch/um/include/shared/as-layout.h
+++ b/arch/um/include/shared/as-layout.h
@@ -44,7 +44,6 @@ extern unsigned long start_vm;
extern unsigned long brk_start;
-extern unsigned long host_task_size;
extern unsigned long stub_start;
extern int linux_main(int argc, char **argv, char **envp);
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index cfbbbf8500c3..5b982031e5ae 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -254,8 +254,6 @@ unsigned long stub_start;
unsigned long task_size;
EXPORT_SYMBOL(task_size);
-unsigned long host_task_size;
-
unsigned long brk_start;
unsigned long end_iomem;
EXPORT_SYMBOL(end_iomem);
@@ -308,6 +306,7 @@ int __init linux_main(int argc, char **argv, char **envp)
{
unsigned long avail, diff;
unsigned long virtmem_size, max_physmem;
+ unsigned long host_task_size;
unsigned long stack;
unsigned int i;
int add;
--
2.34.1
next prev parent reply other threads:[~2025-10-27 5:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 5:45 [PATCH v2 0/4] um: Memory related cleanups Tiwei Bie
2025-10-27 5:45 ` Tiwei Bie [this message]
2025-10-27 5:45 ` [PATCH v2 2/4] um: Use PAGE_ALIGN() for address alignment Tiwei Bie
2025-10-27 5:45 ` [PATCH v2 3/4] um: Replace UML_ROUND_UP() with PAGE_ALIGN() Tiwei Bie
2025-10-27 5:45 ` [PATCH v2 4/4] um: Remove file-based iomem emulation support Tiwei Bie
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=20251027054519.1996090-2-tiwei.bie@linux.dev \
--to=tiwei.bie@linux.dev \
--cc=anton.ivanov@cambridgegreys.com \
--cc=johannes@sipsolutions.net \
--cc=linux-um@lists.infradead.org \
--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).