diff options
Diffstat (limited to 'mm/bootmem.c')
-rw-r--r-- | mm/bootmem.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c index 70f1528a3c8a..9083f5029673 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
@@ -102,7 +102,8 @@ static unsigned long __init init_bootmem_core (pg_data_t *pgdat, | |||
102 | * might be used for boot-time allocations - or it might get added | 102 | * might be used for boot-time allocations - or it might get added |
103 | * to the free page pool later on. | 103 | * to the free page pool later on. |
104 | */ | 104 | */ |
105 | static void __init reserve_bootmem_core(bootmem_data_t *bdata, unsigned long addr, unsigned long size) | 105 | static void __init reserve_bootmem_core(bootmem_data_t *bdata, unsigned long addr, |
106 | unsigned long size) | ||
106 | { | 107 | { |
107 | unsigned long i; | 108 | unsigned long i; |
108 | /* | 109 | /* |
@@ -127,7 +128,8 @@ static void __init reserve_bootmem_core(bootmem_data_t *bdata, unsigned long add | |||
127 | } | 128 | } |
128 | } | 129 | } |
129 | 130 | ||
130 | static void __init free_bootmem_core(bootmem_data_t *bdata, unsigned long addr, unsigned long size) | 131 | static void __init free_bootmem_core(bootmem_data_t *bdata, unsigned long addr, |
132 | unsigned long size) | ||
131 | { | 133 | { |
132 | unsigned long i; | 134 | unsigned long i; |
133 | unsigned long start; | 135 | unsigned long start; |
@@ -355,17 +357,20 @@ static unsigned long __init free_all_bootmem_core(pg_data_t *pgdat) | |||
355 | return total; | 357 | return total; |
356 | } | 358 | } |
357 | 359 | ||
358 | unsigned long __init init_bootmem_node (pg_data_t *pgdat, unsigned long freepfn, unsigned long startpfn, unsigned long endpfn) | 360 | unsigned long __init init_bootmem_node (pg_data_t *pgdat, unsigned long freepfn, |
361 | unsigned long startpfn, unsigned long endpfn) | ||
359 | { | 362 | { |
360 | return(init_bootmem_core(pgdat, freepfn, startpfn, endpfn)); | 363 | return(init_bootmem_core(pgdat, freepfn, startpfn, endpfn)); |
361 | } | 364 | } |
362 | 365 | ||
363 | void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size) | 366 | void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, |
367 | unsigned long size) | ||
364 | { | 368 | { |
365 | reserve_bootmem_core(pgdat->bdata, physaddr, size); | 369 | reserve_bootmem_core(pgdat->bdata, physaddr, size); |
366 | } | 370 | } |
367 | 371 | ||
368 | void __init free_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size) | 372 | void __init free_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, |
373 | unsigned long size) | ||
369 | { | 374 | { |
370 | free_bootmem_core(pgdat->bdata, physaddr, size); | 375 | free_bootmem_core(pgdat->bdata, physaddr, size); |
371 | } | 376 | } |
@@ -399,7 +404,8 @@ unsigned long __init free_all_bootmem (void) | |||
399 | return(free_all_bootmem_core(NODE_DATA(0))); | 404 | return(free_all_bootmem_core(NODE_DATA(0))); |
400 | } | 405 | } |
401 | 406 | ||
402 | void * __init __alloc_bootmem_nopanic(unsigned long size, unsigned long align, unsigned long goal) | 407 | void * __init __alloc_bootmem_nopanic(unsigned long size, unsigned long align, |
408 | unsigned long goal) | ||
403 | { | 409 | { |
404 | bootmem_data_t *bdata; | 410 | bootmem_data_t *bdata; |
405 | void *ptr; | 411 | void *ptr; |
@@ -410,7 +416,8 @@ void * __init __alloc_bootmem_nopanic(unsigned long size, unsigned long align, u | |||
410 | return NULL; | 416 | return NULL; |
411 | } | 417 | } |
412 | 418 | ||
413 | void * __init __alloc_bootmem(unsigned long size, unsigned long align, unsigned long goal) | 419 | void * __init __alloc_bootmem(unsigned long size, unsigned long align, |
420 | unsigned long goal) | ||
414 | { | 421 | { |
415 | void *mem = __alloc_bootmem_nopanic(size,align,goal); | 422 | void *mem = __alloc_bootmem_nopanic(size,align,goal); |
416 | if (mem) | 423 | if (mem) |
@@ -424,8 +431,8 @@ void * __init __alloc_bootmem(unsigned long size, unsigned long align, unsigned | |||
424 | } | 431 | } |
425 | 432 | ||
426 | 433 | ||
427 | void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size, unsigned long align, | 434 | void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size, |
428 | unsigned long goal) | 435 | unsigned long align, unsigned long goal) |
429 | { | 436 | { |
430 | void *ptr; | 437 | void *ptr; |
431 | 438 | ||
@@ -438,7 +445,8 @@ void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size, unsigne | |||
438 | 445 | ||
439 | #define LOW32LIMIT 0xffffffff | 446 | #define LOW32LIMIT 0xffffffff |
440 | 447 | ||
441 | void * __init __alloc_bootmem_low(unsigned long size, unsigned long align, unsigned long goal) | 448 | void * __init __alloc_bootmem_low(unsigned long size, unsigned long align, |
449 | unsigned long goal) | ||
442 | { | 450 | { |
443 | bootmem_data_t *bdata; | 451 | bootmem_data_t *bdata; |
444 | void *ptr; | 452 | void *ptr; |