[PATCH] powerpc: Mark memory_limit as initdata

Michael Ellerman mpe at ellerman.id.au
Mon Apr 22 21:52:31 AEST 2024


The `memory_limit` variable should only be used during boot, enforce
that by marking it initdata.

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 arch/powerpc/mm/mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 3a440004b97d..12316ac66e7e 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -30,7 +30,7 @@
 
 #include <mm/mmu_decl.h>
 
-unsigned long long memory_limit;
+unsigned long long memory_limit __initdata;
 
 unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] __page_aligned_bss;
 EXPORT_SYMBOL(empty_zero_page);
-- 
2.44.0



More information about the Linuxppc-dev mailing list