init.c (a0afd4f7c1ff8cb7a9747150500f8ce081fbcfc9) | init.c (716a3dc20084da9b3ab17bd125005a5345e23e3b) |
---|---|
1/* 2 * linux/arch/arm/mm/init.c 3 * 4 * Copyright (C) 1995-2005 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 8 unchanged lines hidden (view full) --- 17#include <linux/nodemask.h> 18#include <linux/initrd.h> 19#include <linux/of_fdt.h> 20#include <linux/highmem.h> 21#include <linux/gfp.h> 22#include <linux/memblock.h> 23 24#include <asm/mach-types.h> | 1/* 2 * linux/arch/arm/mm/init.c 3 * 4 * Copyright (C) 1995-2005 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 8 unchanged lines hidden (view full) --- 17#include <linux/nodemask.h> 18#include <linux/initrd.h> 19#include <linux/of_fdt.h> 20#include <linux/highmem.h> 21#include <linux/gfp.h> 22#include <linux/memblock.h> 23 24#include <asm/mach-types.h> |
25#include <asm/memblock.h> |
|
25#include <asm/prom.h> 26#include <asm/sections.h> 27#include <asm/setup.h> 28#include <asm/sizes.h> 29#include <asm/tlb.h> 30#include <asm/fixmap.h> 31 32#include <asm/mach/arch.h> --- 269 unchanged lines hidden (view full) --- 302 struct memblock_region *reg; 303 304 for_each_memblock(memory, reg) 305 memory_present(0, memblock_region_memory_base_pfn(reg), 306 memblock_region_memory_end_pfn(reg)); 307} 308#endif 309 | 26#include <asm/prom.h> 27#include <asm/sections.h> 28#include <asm/setup.h> 29#include <asm/sizes.h> 30#include <asm/tlb.h> 31#include <asm/fixmap.h> 32 33#include <asm/mach/arch.h> --- 269 unchanged lines hidden (view full) --- 303 struct memblock_region *reg; 304 305 for_each_memblock(memory, reg) 306 memory_present(0, memblock_region_memory_base_pfn(reg), 307 memblock_region_memory_end_pfn(reg)); 308} 309#endif 310 |
311static bool arm_memblock_steal_permitted = true; 312 313phys_addr_t arm_memblock_steal(phys_addr_t size, phys_addr_t align) 314{ 315 phys_addr_t phys; 316 317 BUG_ON(!arm_memblock_steal_permitted); 318 319 phys = memblock_alloc(size, align); 320 memblock_free(phys, size); 321 memblock_remove(phys, size); 322 323 return phys; 324} 325 |
|
310void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) 311{ 312 int i; 313 314 for (i = 0; i < mi->nr_banks; i++) 315 memblock_add(mi->bank[i].start, mi->bank[i].size); 316 317 /* Register the kernel text, kernel data and initrd with memblock. */ --- 26 unchanged lines hidden (view full) --- 344 345 arm_mm_memblock_reserve(); 346 arm_dt_memblock_reserve(); 347 348 /* reserve any platform specific memblock areas */ 349 if (mdesc->reserve) 350 mdesc->reserve(); 351 | 326void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc) 327{ 328 int i; 329 330 for (i = 0; i < mi->nr_banks; i++) 331 memblock_add(mi->bank[i].start, mi->bank[i].size); 332 333 /* Register the kernel text, kernel data and initrd with memblock. */ --- 26 unchanged lines hidden (view full) --- 360 361 arm_mm_memblock_reserve(); 362 arm_dt_memblock_reserve(); 363 364 /* reserve any platform specific memblock areas */ 365 if (mdesc->reserve) 366 mdesc->reserve(); 367 |
368 arm_memblock_steal_permitted = false; |
|
352 memblock_allow_resize(); 353 memblock_dump_all(); 354} 355 356void __init bootmem_init(void) 357{ 358 unsigned long min, max_low, max_high; 359 --- 380 unchanged lines hidden --- | 369 memblock_allow_resize(); 370 memblock_dump_all(); 371} 372 373void __init bootmem_init(void) 374{ 375 unsigned long min, max_low, max_high; 376 --- 380 unchanged lines hidden --- |