aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/40x_mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/40x_mmu.c')
-rw-r--r--arch/powerpc/mm/40x_mmu.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c
index 58969b51f454..5810967511d4 100644
--- a/arch/powerpc/mm/40x_mmu.c
+++ b/arch/powerpc/mm/40x_mmu.c
@@ -141,7 +141,19 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
141 * coverage with normal-sized pages (or other reasons) do not 141 * coverage with normal-sized pages (or other reasons) do not
142 * attempt to allocate outside the allowed range. 142 * attempt to allocate outside the allowed range.
143 */ 143 */
144 memblock_set_current_limit(memstart_addr + mapped); 144 memblock_set_current_limit(mapped);
145 145
146 return mapped; 146 return mapped;
147} 147}
148
149void setup_initial_memory_limit(phys_addr_t first_memblock_base,
150 phys_addr_t first_memblock_size)
151{
152 /* We don't currently support the first MEMBLOCK not mapping 0
153 * physical on those processors
154 */
155 BUG_ON(first_memblock_base != 0);
156
157 /* 40x can only access 16MB at the moment (see head_40x.S) */
158 memblock_set_current_limit(min_t(u64, first_memblock_size, 0x00800000));
159}