Skip to content

Commit f9293ad

Browse files
Xianting Tianpalmer-dabbelt
authored andcommitted
RISC-V: Add modules to virtual kernel memory layout dump
Modules always live before the kernel, MODULES_END is fixed but MODULES_VADDR isn't fixed, it depends on the kernel size. Let's add it to virtual kernel memory layout dump. As MODULES is only defined for CONFIG_64BIT, so we dump it when CONFIG_64BIT=y. eg, MODULES_VADDR - MODULES_END 0xffffffff01133000 - 0xffffffff80000000 Reviewed-by: Guo Ren <[email protected]> Reviewed-by: Heiko Stuebner <[email protected]> Signed-off-by: Xianting Tian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Fixes: 2bfc6cd ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent ad94389 commit f9293ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/riscv/mm/init.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ static void __init print_vm_layout(void)
135135
(unsigned long)VMEMMAP_END);
136136
print_ml("vmalloc", (unsigned long)VMALLOC_START,
137137
(unsigned long)VMALLOC_END);
138+
#ifdef CONFIG_64BIT
139+
print_ml("modules", (unsigned long)MODULES_VADDR,
140+
(unsigned long)MODULES_END);
141+
#endif
138142
print_ml("lowmem", (unsigned long)PAGE_OFFSET,
139143
(unsigned long)high_memory);
140144
if (IS_ENABLED(CONFIG_64BIT)) {

0 commit comments

Comments
 (0)