Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/mm: Update the memory limit based on direct mapping restrictions

memory limit value specified by the user are further updated such that
the value is 16MB aligned. This is because hash translation mode use
16MB as direct mapping page size. Make sure we update the global
variable 'memory_limit' with the 16MB aligned value such that all kernel
components will see the new aligned value of the memory limit.

Signed-off-by: Aneesh Kumar K.V (IBM) <aneesh.kumar@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240403083611.172833-3-aneesh.kumar@kernel.org

authored by

Aneesh Kumar K.V (IBM) and committed by
Michael Ellerman
5a799af9 f94f5ac0

+2 -3
+2 -3
arch/powerpc/kernel/prom.c
··· 779 779 780 780 void __init early_init_devtree(void *params) 781 781 { 782 - phys_addr_t limit; 783 782 784 783 DBG(" -> early_init_devtree(%px)\n", params); 785 784 ··· 849 850 memory_limit = 0; 850 851 851 852 /* Align down to 16 MB which is large page size with hash page translation */ 852 - limit = ALIGN_DOWN(memory_limit ?: memblock_phys_mem_size(), SZ_16M); 853 - memblock_enforce_memory_limit(limit); 853 + memory_limit = ALIGN_DOWN(memory_limit ?: memblock_phys_mem_size(), SZ_16M); 854 + memblock_enforce_memory_limit(memory_limit); 854 855 855 856 #if defined(CONFIG_PPC_BOOK3S_64) && defined(CONFIG_PPC_4K_PAGES) 856 857 if (!early_radix_enabled())