]> Git Repo - linux.git/commitdiff
arch/arm/kernel/: use memblock apis for early memory allocations
authorSantosh Shilimkar <[email protected]>
Tue, 21 Jan 2014 23:50:47 +0000 (15:50 -0800)
committerLinus Torvalds <[email protected]>
Wed, 22 Jan 2014 00:19:47 +0000 (16:19 -0800)
Switch to memblock interfaces for early memory allocator instead of
bootmem allocator.  No functional change in beahvior than what it is in
current code from bootmem users points of view.

Archs already converted to NO_BOOTMEM now directly use memblock
interfaces instead of bootmem wrappers build on top of memblock.  And
the archs which still uses bootmem, these new apis just fallback to
exiting bootmem APIs.

Signed-off-by: Santosh Shilimkar <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Grygorii Strashko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Russell King <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Yinghai Lu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/arm/kernel/devtree.c
arch/arm/kernel/setup.c

index 34d5fd585bbb1d472015838c2665dea5aad376f7..f751714d52c1f7dd5d4e87542bfadb012fcf1ca0 100644 (file)
@@ -33,7 +33,7 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 
 void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
 {
-       return alloc_bootmem_align(size, align);
+       return memblock_virt_alloc(size, align);
 }
 
 void __init arm_dt_memblock_reserve(void)
index 987a7f5bce5f1759d73c01a80099cea57a94025d..8ce1cbd08dba29369860d756b0a1a373afd607b2 100644 (file)
@@ -717,7 +717,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
        kernel_data.end     = virt_to_phys(_end - 1);
 
        for_each_memblock(memory, region) {
-               res = alloc_bootmem_low(sizeof(*res));
+               res = memblock_virt_alloc(sizeof(*res), 0);
                res->name  = "System RAM";
                res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
                res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
This page took 0.056071 seconds and 4 git commands to generate.