aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/init_64.c
diff options
context:
space:
mode:
authorJohn Hubbard <[email protected]>2024-10-08 19:50:24 -0700
committerAndrew Morton <[email protected]>2024-11-06 20:11:11 -0800
commitafe789b7367ad43ba8f079981d40851f8bd319ce (patch)
tree47b27d08a063efecb2e0ed16a92b427e7537d7ad /arch/x86/mm/init_64.c
parent01a9097aa3ce4c6aef296779c163169ac403260e (diff)
kaslr: rename physmem_end and PHYSMEM_END to direct_map_physmem_end
For clarity. It's increasingly hard to reason about the code, when KASLR is moving around the boundaries. In this case where KASLR is randomizing the location of the kernel image within physical memory, the maximum number of address bits for physical memory has not changed. What has changed is the ending address of memory that is allowed to be directly mapped by the kernel. Let's name the variable, and the associated macro accordingly. Also, enhance the comment above the direct_map_physmem_end definition, to further clarify how this all works. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: John Hubbard <[email protected]> Reviewed-by: Pankaj Gupta <[email protected]> Acked-by: David Hildenbrand <[email protected]> Acked-by: Will Deacon <[email protected]> Reviewed-by: Mike Rapoport (Microsoft) <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Alistair Popple <[email protected]> Cc: Jordan Niethe <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r--arch/x86/mm/init_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index ff253648706f..5a564130b9d0 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -961,7 +961,7 @@ int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
unsigned long end = ((start_pfn + nr_pages) << PAGE_SHIFT) - 1;
int ret;
- if (WARN_ON_ONCE(end > PHYSMEM_END))
+ if (WARN_ON_ONCE(end > DIRECT_MAP_PHYSMEM_END))
return -ERANGE;
ret = __add_pages(nid, start_pfn, nr_pages, params);