summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/8xx_mmu.c
diff options
context:
space:
mode:
authorChristophe Leroy2016-02-09 17:07:54 +0100
committerScott Wood2016-03-12 00:18:01 +0100
commit516d91893b548d7868adb9e0173a7ca307dc9c17 (patch)
tree625e64ab92a3e78c7c63ce216eeb687998088338 /arch/powerpc/mm/8xx_mmu.c
parentpowerpc: Update documentation for noltlbs kernel parameter (diff)
downloadkernel-qcow2-linux-516d91893b548d7868adb9e0173a7ca307dc9c17.tar.gz
kernel-qcow2-linux-516d91893b548d7868adb9e0173a7ca307dc9c17.tar.xz
kernel-qcow2-linux-516d91893b548d7868adb9e0173a7ca307dc9c17.zip
powerpc/8xx: move setup_initial_memory_limit() into 8xx_mmu.c
Now we have a 8xx specific .c file for that so put it in there as other powerpc variants do Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'arch/powerpc/mm/8xx_mmu.c')
-rw-r--r--arch/powerpc/mm/8xx_mmu.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/mm/8xx_mmu.c b/arch/powerpc/mm/8xx_mmu.c
index 2d42745f6cff..a84f5ebed1c1 100644
--- a/arch/powerpc/mm/8xx_mmu.c
+++ b/arch/powerpc/mm/8xx_mmu.c
@@ -81,3 +81,20 @@ unsigned long __init mmu_mapin_ram(unsigned long top)
return mapped;
}
+
+void setup_initial_memory_limit(phys_addr_t first_memblock_base,
+ phys_addr_t first_memblock_size)
+{
+ /* We don't currently support the first MEMBLOCK not mapping 0
+ * physical on those processors
+ */
+ BUG_ON(first_memblock_base != 0);
+
+#ifdef CONFIG_PIN_TLB
+ /* 8xx can only access 24MB at the moment */
+ memblock_set_current_limit(min_t(u64, first_memblock_size, 0x01800000));
+#else
+ /* 8xx can only access 8MB at the moment */
+ memblock_set_current_limit(min_t(u64, first_memblock_size, 0x00800000));
+#endif
+}