diff options
| author | Tiwei Bie <tiwei.btw@antgroup.com> | 2025-08-27 08:57:03 +0800 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2025-09-10 14:23:52 +0200 |
| commit | e047f9af9d6948728614f7eea41ba53d5b767e9f (patch) | |
| tree | 42bda26d92b48016f25c9445dd509406e55fe0ab /arch/um/kernel/um_arch.c | |
| parent | b765d69a1adf83b969f1f0c8353b80c3c18ef2f7 (diff) | |
um: Centralize stub size calculations
Currently, the stub size is calculated in multiple places. Define
a macro that performs the calculation so that the code is easier
to read and maintain.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um/kernel/um_arch.c')
| -rw-r--r-- | arch/um/kernel/um_arch.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 2f5ee045bc7a..6cd464c9095f 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -331,9 +331,7 @@ int __init linux_main(int argc, char **argv, char **envp) host_task_size = get_top_address(envp); /* reserve a few pages for the stubs */ - stub_start = host_task_size - STUB_DATA_PAGES * PAGE_SIZE; - /* another page for the code portion */ - stub_start -= PAGE_SIZE; + stub_start = host_task_size - STUB_SIZE; host_task_size = stub_start; /* Limit TASK_SIZE to what is addressable by the page table */ |