diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 21:52:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-21 21:52:11 -0400 |
commit | 3044100e58c84e133791c8b60a2f5bef69d732e4 (patch) | |
tree | f9ed0d1f3df89c31dd81ccaf0cf3478f57b08440 /arch/sh/mm/init.c | |
parent | b5153163ed580e00c67bdfecb02b2e3843817b3e (diff) | |
parent | 67e87f0a1c5cbc750f81ebf6a128e8ff6f4376cc (diff) |
Merge branch 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (74 commits)
x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S
xen: Cope with unmapped pages when initializing kernel pagetable
memblock, bootmem: Round pfn properly for memory and reserved regions
memblock: Annotate memblock functions with __init_memblock
memblock: Allow memblock_init to be called early
memblock/arm: Fix memblock_region_is_memory() typo
x86, memblock: Remove __memblock_x86_find_in_range_size()
memblock: Fix wraparound in find_region()
x86-32, memblock: Make add_highpages honor early reserved ranges
x86, memblock: Fix crashkernel allocation
arm, memblock: Fix the sparsemem build
memblock: Fix section mismatch warnings
powerpc, memblock: Fix memblock API change fallout
memblock, microblaze: Fix memblock API change fallout
x86: Remove old bootmem code
x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve
x86: Remove not used early_res code
x86, memblock: Replace e820_/_early string with memblock_
x86: Use memblock to replace early_res
x86, memblock: Use memblock_debug to control debug message print out
...
Fix up trivial conflicts in arch/x86/kernel/setup.c and kernel/Makefile
Diffstat (limited to 'arch/sh/mm/init.c')
-rw-r--r-- | arch/sh/mm/init.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index d0e249100e98..552bea5113f5 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -200,7 +200,6 @@ static void __init bootmem_init_one_node(unsigned int nid) | |||
200 | unsigned long total_pages, paddr; | 200 | unsigned long total_pages, paddr; |
201 | unsigned long end_pfn; | 201 | unsigned long end_pfn; |
202 | struct pglist_data *p; | 202 | struct pglist_data *p; |
203 | int i; | ||
204 | 203 | ||
205 | p = NODE_DATA(nid); | 204 | p = NODE_DATA(nid); |
206 | 205 | ||
@@ -226,11 +225,12 @@ static void __init bootmem_init_one_node(unsigned int nid) | |||
226 | * reservations in other nodes. | 225 | * reservations in other nodes. |
227 | */ | 226 | */ |
228 | if (nid == 0) { | 227 | if (nid == 0) { |
228 | struct memblock_region *reg; | ||
229 | |||
229 | /* Reserve the sections we're already using. */ | 230 | /* Reserve the sections we're already using. */ |
230 | for (i = 0; i < memblock.reserved.cnt; i++) | 231 | for_each_memblock(reserved, reg) { |
231 | reserve_bootmem(memblock.reserved.region[i].base, | 232 | reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT); |
232 | memblock_size_bytes(&memblock.reserved, i), | 233 | } |
233 | BOOTMEM_DEFAULT); | ||
234 | } | 234 | } |
235 | 235 | ||
236 | sparse_memory_present_with_active_regions(nid); | 236 | sparse_memory_present_with_active_regions(nid); |
@@ -238,13 +238,14 @@ static void __init bootmem_init_one_node(unsigned int nid) | |||
238 | 238 | ||
239 | static void __init do_init_bootmem(void) | 239 | static void __init do_init_bootmem(void) |
240 | { | 240 | { |
241 | struct memblock_region *reg; | ||
241 | int i; | 242 | int i; |
242 | 243 | ||
243 | /* Add active regions with valid PFNs. */ | 244 | /* Add active regions with valid PFNs. */ |
244 | for (i = 0; i < memblock.memory.cnt; i++) { | 245 | for_each_memblock(memory, reg) { |
245 | unsigned long start_pfn, end_pfn; | 246 | unsigned long start_pfn, end_pfn; |
246 | start_pfn = memblock.memory.region[i].base >> PAGE_SHIFT; | 247 | start_pfn = memblock_region_memory_base_pfn(reg); |
247 | end_pfn = start_pfn + memblock_size_pages(&memblock.memory, i); | 248 | end_pfn = memblock_region_memory_end_pfn(reg); |
248 | __add_active_range(0, start_pfn, end_pfn); | 249 | __add_active_range(0, start_pfn, end_pfn); |
249 | } | 250 | } |
250 | 251 | ||