summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiwei Bie <tiwei.btw@antgroup.com>2025-02-21 12:18:55 +0800
committerJohannes Berg <johannes.berg@intel.com>2025-03-18 11:04:39 +0100
commite82cf3051e6193f61e03898f8dba035199064d36 (patch)
tree40ba7b2266059925097f5608de224b53273e3dab
parentf664a1399633c63706f763d4bb58c96110355330 (diff)
um: Update min_low_pfn to match changes in uml_reserved
When uml_reserved is updated, min_low_pfn must also be updated accordingly. Otherwise, min_low_pfn will not accurately reflect the lowest available PFN. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20250221041855.1156109-1-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--arch/um/kernel/mem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 05ffceb555b4..61b5a5ede01c 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -68,6 +68,7 @@ void __init mem_init(void)
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
memblock_free((void *)brk_end, uml_reserved - brk_end);
uml_reserved = brk_end;
+ min_low_pfn = PFN_UP(__pa(uml_reserved));
/* this will put all low memory onto the freelists */
memblock_free_all();