diff options
| author | Stefan Roese <sr@denx.de> | 2008-07-09 11:09:23 -0400 |
|---|---|---|
| committer | Josh Boyer <jwboyer@linux.vnet.ibm.com> | 2008-07-09 14:13:01 -0400 |
| commit | 2bf3016f89344d4cd8b2c96bbec2b642a2bde413 (patch) | |
| tree | dd472d2d20ae41bc93c189ca141ea61ddae9826a | |
| parent | 3fa69dd57759cb45fa48bb70a055025d25a7e4e8 (diff) | |
powerpc: Fix problems with 32bit PPC's running with >= 4GB of RAM
This patch enables 32bit PPC's (with 36bit physical address space, e.g.
IBM/AMCC PPC44x) to run with >= 4GB of RAM. Mostly its just replacing types
(unsigned long -> phys_addr_t).
Tested on an AMCC Katmai with 4GB of DDR2.
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
| -rw-r--r-- | arch/powerpc/mm/init_32.c | 4 | ||||
| -rw-r--r-- | arch/powerpc/mm/mem.c | 8 | ||||
| -rw-r--r-- | arch/powerpc/mm/mmu_decl.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 45418590b6a9..388ceda632f3 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
| @@ -57,8 +57,8 @@ | |||
| 57 | 57 | ||
| 58 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 58 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
| 59 | 59 | ||
| 60 | unsigned long total_memory; | 60 | phys_addr_t total_memory; |
| 61 | unsigned long total_lowmem; | 61 | phys_addr_t total_lowmem; |
| 62 | 62 | ||
| 63 | phys_addr_t memstart_addr = (phys_addr_t)~0ull; | 63 | phys_addr_t memstart_addr = (phys_addr_t)~0ull; |
| 64 | EXPORT_SYMBOL(memstart_addr); | 64 | EXPORT_SYMBOL(memstart_addr); |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 776ba6ad5e1e..1ca2235f0965 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
| @@ -330,7 +330,7 @@ static int __init mark_nonram_nosave(void) | |||
| 330 | void __init paging_init(void) | 330 | void __init paging_init(void) |
| 331 | { | 331 | { |
| 332 | unsigned long total_ram = lmb_phys_mem_size(); | 332 | unsigned long total_ram = lmb_phys_mem_size(); |
| 333 | unsigned long top_of_ram = lmb_end_of_DRAM(); | 333 | phys_addr_t top_of_ram = lmb_end_of_DRAM(); |
| 334 | unsigned long max_zone_pfns[MAX_NR_ZONES]; | 334 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
| 335 | 335 | ||
| 336 | #ifdef CONFIG_PPC32 | 336 | #ifdef CONFIG_PPC32 |
| @@ -349,10 +349,10 @@ void __init paging_init(void) | |||
| 349 | kmap_prot = PAGE_KERNEL; | 349 | kmap_prot = PAGE_KERNEL; |
| 350 | #endif /* CONFIG_HIGHMEM */ | 350 | #endif /* CONFIG_HIGHMEM */ |
| 351 | 351 | ||
| 352 | printk(KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n", | 352 | printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%lx\n", |
| 353 | top_of_ram, total_ram); | 353 | (u64)top_of_ram, total_ram); |
| 354 | printk(KERN_DEBUG "Memory hole size: %ldMB\n", | 354 | printk(KERN_DEBUG "Memory hole size: %ldMB\n", |
| 355 | (top_of_ram - total_ram) >> 20); | 355 | (long int)((top_of_ram - total_ram) >> 20)); |
| 356 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); | 356 | memset(max_zone_pfns, 0, sizeof(max_zone_pfns)); |
| 357 | #ifdef CONFIG_HIGHMEM | 357 | #ifdef CONFIG_HIGHMEM |
| 358 | max_zone_pfns[ZONE_DMA] = lowmem_end_addr >> PAGE_SHIFT; | 358 | max_zone_pfns[ZONE_DMA] = lowmem_end_addr >> PAGE_SHIFT; |
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h index 46585b7bb194..fab3cfad4099 100644 --- a/arch/powerpc/mm/mmu_decl.h +++ b/arch/powerpc/mm/mmu_decl.h | |||
| @@ -49,8 +49,8 @@ extern unsigned int num_tlbcam_entries; | |||
| 49 | extern unsigned long ioremap_bot; | 49 | extern unsigned long ioremap_bot; |
| 50 | extern unsigned long __max_low_memory; | 50 | extern unsigned long __max_low_memory; |
| 51 | extern phys_addr_t __initial_memory_limit_addr; | 51 | extern phys_addr_t __initial_memory_limit_addr; |
| 52 | extern unsigned long total_memory; | 52 | extern phys_addr_t total_memory; |
| 53 | extern unsigned long total_lowmem; | 53 | extern phys_addr_t total_lowmem; |
| 54 | extern phys_addr_t memstart_addr; | 54 | extern phys_addr_t memstart_addr; |
| 55 | extern phys_addr_t lowmem_end_addr; | 55 | extern phys_addr_t lowmem_end_addr; |
| 56 | 56 | ||
