Skip to contentSkip to conversation

x86/mm: dynamic memory layout declarations

PATCH New Dmitrii Bundin 1 participant 1 message Aug 26, 2022 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mm: dynamic memory layout declarations

The declarations page_offset_base, vmalloc_base and vmemmap_base makes sense only if CONFIG_DYNAMIC_MEMORY_LAYOUT is enabled. Hides the declarations behind a conditional macro checking the option.

---
 arch/x86/include/asm/page_64.h | 2 ++
 1 file changed, 2 insertions(+)
arch/x86/include/asm/page_64.h +2 -0
index baa70451b8df..2968b3644912 100644
@@ -12,9 +12,11 @@
 extern unsigned long max_pfn;
 extern unsigned long phys_base;
 
+#ifdef CONFIG_DYNAMIC_MEMORY_LAYOUT
 extern unsigned long page_offset_base;
 extern unsigned long vmalloc_base;
 extern unsigned long vmemmap_base;
+#endif /* CONFIG_DYNAMIC_MEMORY_LAYOUT */
 
 static __always_inline unsigned long __phys_addr_nodebug(unsigned long x)
 {
Signature · 1 line
2.17.1