From d7917ba7051e3fd12ebe2d5a09b29fb3a2b38190 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 16 Apr 2008 05:52:22 +1000 Subject: [POWERPC] Introduce lowmem_end_addr to distinguish from total_lowmem total_lowmem represents the amount of low memory, not the physical address that low memory ends at. If the start of memory is at 0 it happens that total_lowmem can be used as both the size and the address that lowmem ends at (or more specifically one byte beyond the end). To make the code a bit more clear and deal with the case when the start of memory isn't at physical 0, we introduce lowmem_end_addr that represents one byte beyond the last physical address in the lowmem region. Signed-off-by: Kumar Gala Signed-off-by: Paul Mackerras --- arch/powerpc/mm/44x_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/mm/44x_mmu.c') diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c index 04dc08798d3d..953fb919eb06 100644 --- a/arch/powerpc/mm/44x_mmu.c +++ b/arch/powerpc/mm/44x_mmu.c @@ -67,7 +67,7 @@ unsigned long __init mmu_mapin_ram(void) /* Pin in enough TLBs to cover any lowmem not covered by the * initial 256M mapping established in head_44x.S */ - for (addr = PPC_PIN_SIZE; addr < total_lowmem; + for (addr = PPC_PIN_SIZE; addr < lowmem_end_addr; addr += PPC_PIN_SIZE) ppc44x_pin_tlb(addr + PAGE_OFFSET, addr); -- cgit v1.2.1