aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/tlb_nohash.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-06 18:39:02 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-04 22:56:08 -0400
commitcd3db0c4ca3d237e7ad20f7107216e575705d2b0 (patch)
tree03be7c14bd68a568a6e2f6df2db9fbbdf11c1483 /arch/powerpc/mm/tlb_nohash.c
parente63075a3c9377536d085bc013cd3fe6323162449 (diff)
memblock: Remove rmo_size, burry it in arch/powerpc where it belongs
The RMA (RMO is a misnomer) is a concept specific to ppc64 (in fact server ppc64 though I hijack it on embedded ppc64 for similar purposes) and represents the area of memory that can be accessed in real mode (aka with MMU off), or on embedded, from the exception vectors (which is bolted in the TLB) which pretty much boils down to the same thing. We take that out of the generic MEMBLOCK data structure and move it into arch/powerpc where it belongs, renaming it to "RMA" while at it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/tlb_nohash.c')
-rw-r--r--arch/powerpc/mm/tlb_nohash.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index 7ba32e762990..a086ed562606 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -446,4 +446,18 @@ void __cpuinit early_init_mmu_secondary(void)
446 __early_init_mmu(0); 446 __early_init_mmu(0);
447} 447}
448 448
449void setup_initial_memory_limit(phys_addr_t first_memblock_base,
450 phys_addr_t first_memblock_size)
451{
452 /* On Embedded 64-bit, we adjust the RMA size to match
453 * the bolted TLB entry. We know for now that only 1G
454 * entries are supported though that may eventually
455 * change. We crop it to the size of the first MEMBLOCK to
456 * avoid going over total available memory just in case...
457 */
458 ppc64_rma_size = min_t(u64, first_memblock_size, 0x40000000);
459
460 /* Finally limit subsequent allocations */
461 memblock_set_current_limit(ppc64_memblock_base + ppc64_rma_size);
462}
449#endif /* CONFIG_PPC64 */ 463#endif /* CONFIG_PPC64 */