aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDale Farnsworth <dale@farnsworth.org>2007-10-03 15:01:40 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-10-08 09:38:34 -0400
commit873553b3d6b3b19f187a5630300ece20bbf74afd (patch)
tree315a5dab9ff34a0f7a21dce093eb9687852c5a1a /arch
parent0e65bfe34c1000581746b9889d095241c4cf4a5c (diff)
[POWERPC] 85xx: Failure with odd memory sizes and CONFIG_HIGHMEM
The CONFIG_FSL_BOOKE mmu setup code fails when CONFIG_HIGHMEM=y and the 3 fixed TLB entries cannot exactly map the lowmem size. Each TLB entry can map 4MB, 16MB, 64MB or 256MB, so the failure is observed when the kernel lowmem size is not equal to the sum of up to 3 of those values. Normally, memory is sized in nice numbers, but I observed this problem while testing a crash dump kernel. The failure can also be observed by artificially reducing the kernel's main memory via the mem= kernel command line parameter. This commit fixes the problem by setting __initial_memory_limit in adjust_total_lowmem(). Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index afab247d472f..17139daeaff4 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -59,6 +59,7 @@ unsigned int num_tlbcam_entries;
59static unsigned long __cam0, __cam1, __cam2; 59static unsigned long __cam0, __cam1, __cam2;
60extern unsigned long total_lowmem; 60extern unsigned long total_lowmem;
61extern unsigned long __max_low_memory; 61extern unsigned long __max_low_memory;
62extern unsigned long __initial_memory_limit;
62#define MAX_LOW_MEM CONFIG_LOWMEM_SIZE 63#define MAX_LOW_MEM CONFIG_LOWMEM_SIZE
63 64
64#define NUM_TLBCAMS (16) 65#define NUM_TLBCAMS (16)
@@ -232,4 +233,5 @@ adjust_total_lowmem(void)
232 __cam0 >> 20, __cam1 >> 20, __cam2 >> 20, 233 __cam0 >> 20, __cam1 >> 20, __cam2 >> 20,
233 (total_lowmem - __cam0 - __cam1 - __cam2) >> 20); 234 (total_lowmem - __cam0 - __cam1 - __cam2) >> 20);
234 __max_low_memory = max_low_mem = __cam0 + __cam1 + __cam2; 235 __max_low_memory = max_low_mem = __cam0 + __cam1 + __cam2;
236 __initial_memory_limit = __max_low_memory;
235} 237}