diff options
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/fsl_booke_mmu.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/init_32.c | 5 | ||||
-rw-r--r-- | arch/powerpc/mm/init_64.c | 3 | ||||
-rw-r--r-- | arch/powerpc/mm/mem.c | 5 |
4 files changed, 10 insertions, 5 deletions
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index ada249bf977..ce10e2b1b90 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c | |||
@@ -202,7 +202,7 @@ adjust_total_lowmem(void) | |||
202 | cam_max_size = max_lowmem_size; | 202 | cam_max_size = max_lowmem_size; |
203 | 203 | ||
204 | /* adjust lowmem size to max_lowmem_size */ | 204 | /* adjust lowmem size to max_lowmem_size */ |
205 | ram = min(max_lowmem_size, total_lowmem); | 205 | ram = min(max_lowmem_size, (phys_addr_t)total_lowmem); |
206 | 206 | ||
207 | /* Calculate CAM values */ | 207 | /* Calculate CAM values */ |
208 | __cam0 = 1UL << 2 * (__ilog2(ram) / 2); | 208 | __cam0 = 1UL << 2 * (__ilog2(ram) / 2); |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index 47325f23c51..578750e4ca8 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
@@ -59,7 +59,10 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | |||
59 | unsigned long total_memory; | 59 | unsigned long total_memory; |
60 | unsigned long total_lowmem; | 60 | unsigned long total_lowmem; |
61 | 61 | ||
62 | phys_addr_t memstart_addr; | 62 | phys_addr_t memstart_addr = (phys_addr_t)~0ull; |
63 | EXPORT_SYMBOL(memstart_addr); | ||
64 | phys_addr_t kernstart_addr; | ||
65 | EXPORT_SYMBOL(kernstart_addr); | ||
63 | phys_addr_t lowmem_end_addr; | 66 | phys_addr_t lowmem_end_addr; |
64 | 67 | ||
65 | int boot_mapsize; | 68 | int boot_mapsize; |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 698bd000f98..c5ac532a016 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -72,7 +72,8 @@ | |||
72 | #warning TASK_SIZE is smaller than it needs to be. | 72 | #warning TASK_SIZE is smaller than it needs to be. |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | phys_addr_t memstart_addr; | 75 | phys_addr_t memstart_addr = ~0; |
76 | phys_addr_t kernstart_addr; | ||
76 | 77 | ||
77 | void free_initmem(void) | 78 | void free_initmem(void) |
78 | { | 79 | { |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 16def4dcff6..0062e6b1c55 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -216,7 +216,7 @@ void __init do_init_bootmem(void) | |||
216 | unsigned long total_pages; | 216 | unsigned long total_pages; |
217 | int boot_mapsize; | 217 | int boot_mapsize; |
218 | 218 | ||
219 | max_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; | 219 | max_low_pfn = max_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; |
220 | total_pages = (lmb_end_of_DRAM() - memstart_addr) >> PAGE_SHIFT; | 220 | total_pages = (lmb_end_of_DRAM() - memstart_addr) >> PAGE_SHIFT; |
221 | #ifdef CONFIG_HIGHMEM | 221 | #ifdef CONFIG_HIGHMEM |
222 | total_pages = total_lowmem >> PAGE_SHIFT; | 222 | total_pages = total_lowmem >> PAGE_SHIFT; |
@@ -232,7 +232,8 @@ void __init do_init_bootmem(void) | |||
232 | 232 | ||
233 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); | 233 | start = lmb_alloc(bootmap_pages << PAGE_SHIFT, PAGE_SIZE); |
234 | 234 | ||
235 | boot_mapsize = init_bootmem(start >> PAGE_SHIFT, total_pages); | 235 | min_low_pfn = MEMORY_START >> PAGE_SHIFT; |
236 | boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn); | ||
236 | 237 | ||
237 | /* Add active regions with valid PFNs */ | 238 | /* Add active regions with valid PFNs */ |
238 | for (i = 0; i < lmb.memory.cnt; i++) { | 239 | for (i = 0; i < lmb.memory.cnt; i++) { |