Skip to content

Commit f9cca24

Browse files
ardbiesheuvelctmarinas
authored andcommitted
arm64: ptdump: Discover start of vmemmap region at runtime
We will soon reclaim the part of the vmemmap region that covers VA space that is not addressable by the hardware. To avoid confusion, ensure that the 'vmemmap start' marker points at the start of the region that is actually being used for the struct page array, rather than the start of the region we set aside for it at build time. Signed-off-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]> Acked-by: Mark Rutland <[email protected]>
1 parent 34f879f commit f9cca24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/arm64/mm/ptdump.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ void ptdump_check_wx(void)
346346

347347
static int __init ptdump_init(void)
348348
{
349+
u64 page_offset = _PAGE_OFFSET(vabits_actual);
350+
u64 vmemmap_start = (u64)virt_to_page((void *)page_offset);
349351
struct addr_marker m[] = {
350352
{ PAGE_OFFSET, "Linear Mapping start" },
351353
{ PAGE_END, "Linear Mapping end" },
@@ -357,7 +359,7 @@ static int __init ptdump_init(void)
357359
{ MODULES_END, "Modules end" },
358360
{ VMALLOC_START, "vmalloc() area" },
359361
{ VMALLOC_END, "vmalloc() end" },
360-
{ VMEMMAP_START, "vmemmap start" },
362+
{ vmemmap_start, "vmemmap start" },
361363
{ VMEMMAP_END, "vmemmap end" },
362364
{ PCI_IO_START, "PCI I/O start" },
363365
{ PCI_IO_END, "PCI I/O end" },

0 commit comments

Comments
 (0)