aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/mem.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-04 00:06:41 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-04 00:21:49 -0400
commite3239ff92a17976ac5d26fa0fe40ef3a9daf2523 (patch)
treeda3c493196811ccae1b79c3c94234f5d481c8221 /arch/powerpc/mm/mem.c
parentf1c2c19c498e27de48bf0dc4221e6e31b1823169 (diff)
memblock: Rename memblock_region to memblock_type and memblock_property to memblock_region
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/mem.c')
-rw-r--r--arch/powerpc/mm/mem.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 1a84a8d00005..a33f5c186fb7 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -86,10 +86,10 @@ int page_is_ram(unsigned long pfn)
86 for (i=0; i < memblock.memory.cnt; i++) { 86 for (i=0; i < memblock.memory.cnt; i++) {
87 unsigned long base; 87 unsigned long base;
88 88
89 base = memblock.memory.region[i].base; 89 base = memblock.memory.regions[i].base;
90 90
91 if ((paddr >= base) && 91 if ((paddr >= base) &&
92 (paddr < (base + memblock.memory.region[i].size))) { 92 (paddr < (base + memblock.memory.regions[i].size))) {
93 return 1; 93 return 1;
94 } 94 }
95 } 95 }
@@ -149,7 +149,7 @@ int
149walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, 149walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages,
150 void *arg, int (*func)(unsigned long, unsigned long, void *)) 150 void *arg, int (*func)(unsigned long, unsigned long, void *))
151{ 151{
152 struct memblock_property res; 152 struct memblock_region res;
153 unsigned long pfn, len; 153 unsigned long pfn, len;
154 u64 end; 154 u64 end;
155 int ret = -1; 155 int ret = -1;
@@ -206,7 +206,7 @@ void __init do_init_bootmem(void)
206 /* Add active regions with valid PFNs */ 206 /* Add active regions with valid PFNs */
207 for (i = 0; i < memblock.memory.cnt; i++) { 207 for (i = 0; i < memblock.memory.cnt; i++) {
208 unsigned long start_pfn, end_pfn; 208 unsigned long start_pfn, end_pfn;
209 start_pfn = memblock.memory.region[i].base >> PAGE_SHIFT; 209 start_pfn = memblock.memory.regions[i].base >> PAGE_SHIFT;
210 end_pfn = start_pfn + memblock_size_pages(&memblock.memory, i); 210 end_pfn = start_pfn + memblock_size_pages(&memblock.memory, i);
211 add_active_range(0, start_pfn, end_pfn); 211 add_active_range(0, start_pfn, end_pfn);
212 } 212 }
@@ -219,16 +219,16 @@ void __init do_init_bootmem(void)
219 219
220 /* reserve the sections we're already using */ 220 /* reserve the sections we're already using */
221 for (i = 0; i < memblock.reserved.cnt; i++) { 221 for (i = 0; i < memblock.reserved.cnt; i++) {
222 unsigned long addr = memblock.reserved.region[i].base + 222 unsigned long addr = memblock.reserved.regions[i].base +
223 memblock_size_bytes(&memblock.reserved, i) - 1; 223 memblock_size_bytes(&memblock.reserved, i) - 1;
224 if (addr < lowmem_end_addr) 224 if (addr < lowmem_end_addr)
225 reserve_bootmem(memblock.reserved.region[i].base, 225 reserve_bootmem(memblock.reserved.regions[i].base,
226 memblock_size_bytes(&memblock.reserved, i), 226 memblock_size_bytes(&memblock.reserved, i),
227 BOOTMEM_DEFAULT); 227 BOOTMEM_DEFAULT);
228 else if (memblock.reserved.region[i].base < lowmem_end_addr) { 228 else if (memblock.reserved.regions[i].base < lowmem_end_addr) {
229 unsigned long adjusted_size = lowmem_end_addr - 229 unsigned long adjusted_size = lowmem_end_addr -
230 memblock.reserved.region[i].base; 230 memblock.reserved.regions[i].base;
231 reserve_bootmem(memblock.reserved.region[i].base, 231 reserve_bootmem(memblock.reserved.regions[i].base,
232 adjusted_size, BOOTMEM_DEFAULT); 232 adjusted_size, BOOTMEM_DEFAULT);
233 } 233 }
234 } 234 }
@@ -237,7 +237,7 @@ void __init do_init_bootmem(void)
237 237
238 /* reserve the sections we're already using */ 238 /* reserve the sections we're already using */
239 for (i = 0; i < memblock.reserved.cnt; i++) 239 for (i = 0; i < memblock.reserved.cnt; i++)
240 reserve_bootmem(memblock.reserved.region[i].base, 240 reserve_bootmem(memblock.reserved.regions[i].base,
241 memblock_size_bytes(&memblock.reserved, i), 241 memblock_size_bytes(&memblock.reserved, i),
242 BOOTMEM_DEFAULT); 242 BOOTMEM_DEFAULT);
243 243
@@ -257,10 +257,10 @@ static int __init mark_nonram_nosave(void)
257 257
258 for (i = 0; i < memblock.memory.cnt - 1; i++) { 258 for (i = 0; i < memblock.memory.cnt - 1; i++) {
259 memblock_region_max_pfn = 259 memblock_region_max_pfn =
260 (memblock.memory.region[i].base >> PAGE_SHIFT) + 260 (memblock.memory.regions[i].base >> PAGE_SHIFT) +
261 (memblock.memory.region[i].size >> PAGE_SHIFT); 261 (memblock.memory.regions[i].size >> PAGE_SHIFT);
262 memblock_next_region_start_pfn = 262 memblock_next_region_start_pfn =
263 memblock.memory.region[i+1].base >> PAGE_SHIFT; 263 memblock.memory.regions[i+1].base >> PAGE_SHIFT;
264 264
265 if (memblock_region_max_pfn < memblock_next_region_start_pfn) 265 if (memblock_region_max_pfn < memblock_next_region_start_pfn)
266 register_nosave_region(memblock_region_max_pfn, 266 register_nosave_region(memblock_region_max_pfn,