[POWERPC] Remove and replace uses of PPC_MEMSTART with memstart_addr

A number of users of PPC_MEMSTART (40x, ppc_mmu_32) can just always
use 0 as we don't support booting these kernels at non-zero physical
addresses since their exception vectors must be at 0 (or 0xfffx_xxxx).

For the sub-arches that support relocatable interrupt vectors
(book-e), it's reasonable to have memory start at a non-zero physical
address.  For those cases use the variable memstart_addr instead of
the #define PPC_MEMSTART since the only uses of PPC_MEMSTART are for
initialization and in the future we can set memstart_addr at runtime
to have a relocatable kernel.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Kumar Gala
2008-04-16 05:52:21 +10:00
committed by Paul Mackerras
parent 1993cbf4ae
commit 99c62dd773
7 changed files with 15 additions and 24 deletions

View File

@ -59,8 +59,8 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
unsigned long total_memory;
unsigned long total_lowmem;
unsigned long ppc_memstart;
unsigned long ppc_memoffset = PAGE_OFFSET;
phys_addr_t memstart_addr;
phys_addr_t lowmem_end_addr;
int boot_mapsize;
#ifdef CONFIG_PPC_PMAC
@ -145,8 +145,7 @@ void __init MMU_init(void)
printk(KERN_WARNING "Only using first contiguous memory region");
}
total_memory = lmb_end_of_DRAM();
total_lowmem = total_memory;
total_lowmem = total_memory = lmb_end_of_DRAM() - memstart_addr;
#ifdef CONFIG_FSL_BOOKE
/* Freescale Book-E parts expect lowmem to be mapped by fixed TLB