Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
nobootmem.c File Reference
#include <linux/init.h>
#include <linux/pfn.h>
#include <linux/slab.h>
#include <linux/bootmem.h>
#include <linux/export.h>
#include <linux/kmemleak.h>
#include <linux/range.h>
#include <linux/memblock.h>
#include <asm/bug.h>
#include <asm/io.h>
#include <asm/processor.h>
#include "internal.h"

Go to the source code of this file.

Macros

#define ARCH_LOW_ADDRESS_LIMIT   0xffffffffUL
 

Functions

 EXPORT_SYMBOL (contig_page_data)
 
void __init free_bootmem_late (unsigned long addr, unsigned long size)
 
unsigned long __init free_low_memory_core_early (int nodeid)
 
unsigned long __init free_all_bootmem_node (pg_data_t *pgdat)
 
unsigned long __init free_all_bootmem (void)
 
void __init free_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size)
 
void __init free_bootmem (unsigned long addr, unsigned long size)
 
void *__init __alloc_bootmem_nopanic (unsigned long size, unsigned long align, unsigned long goal)
 
void *__init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal)
 
void *__init ___alloc_bootmem_node_nopanic (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal, unsigned long limit)
 
void *__init __alloc_bootmem_node_nopanic (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal)
 
void *__init ___alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal, unsigned long limit)
 
void *__init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal)
 
void *__init __alloc_bootmem_node_high (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal)
 
void *__init __alloc_bootmem_low (unsigned long size, unsigned long align, unsigned long goal)
 
void *__init __alloc_bootmem_low_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal)
 

Variables

struct pglist_data __refdata contig_page_data
 
unsigned long max_low_pfn
 
unsigned long min_low_pfn
 
unsigned long max_pfn
 

Macro Definition Documentation

#define ARCH_LOW_ADDRESS_LIMIT   0xffffffffUL

Definition at line 365 of file nobootmem.c.

Function Documentation

void* __init ___alloc_bootmem_node ( pg_data_t pgdat,
unsigned long  size,
unsigned long  align,
unsigned long  goal,
unsigned long  limit 
)

Definition at line 319 of file nobootmem.c.

void* __init ___alloc_bootmem_node_nopanic ( pg_data_t pgdat,
unsigned long  size,
unsigned long  align,
unsigned long  goal,
unsigned long  limit 
)

Definition at line 283 of file nobootmem.c.

void* __init __alloc_bootmem ( unsigned long  size,
unsigned long  align,
unsigned long  goal 
)

__alloc_bootmem - allocate boot memory : size of the request in bytes : alignment of the region : preferred starting address of the region

The goal is dropped if it can not be satisfied and the allocation will fall back to memory below .

Allocation may happen on any node in the system.

The function panics if the request can not be satisfied.

Definition at line 275 of file nobootmem.c.

void* __init __alloc_bootmem_low ( unsigned long  size,
unsigned long  align,
unsigned long  goal 
)

__alloc_bootmem_low - allocate low boot memory : size of the request in bytes : alignment of the region : preferred starting address of the region

The goal is dropped if it can not be satisfied and the allocation will fall back to memory below .

Allocation may happen on any node in the system.

The function panics if the request can not be satisfied.

Definition at line 381 of file nobootmem.c.

void* __init __alloc_bootmem_low_node ( pg_data_t pgdat,
unsigned long  size,
unsigned long  align,
unsigned long  goal 
)

__alloc_bootmem_low_node - allocate low boot memory from a specific node : node to allocate from : size of the request in bytes : alignment of the region : preferred starting address of the region

The goal is dropped if it can not be satisfied and the allocation will fall back to memory below .

Allocation may fall back to any node in the system if the specified node can not hold the requested memory.

The function panics if the request can not be satisfied.

Definition at line 402 of file nobootmem.c.

void* __init __alloc_bootmem_node ( pg_data_t pgdat,
unsigned long  size,
unsigned long  align,
unsigned long  goal 
)

__alloc_bootmem_node - allocate boot memory from a specific node : node to allocate from : size of the request in bytes : alignment of the region : preferred starting address of the region

The goal is dropped if it can not be satisfied and the allocation will fall back to memory below .

Allocation may fall back to any node in the system if the specified node can not hold the requested memory.

The function panics if the request can not be satisfied.

Definition at line 349 of file nobootmem.c.

void* __init __alloc_bootmem_node_high ( pg_data_t pgdat,
unsigned long  size,
unsigned long  align,
unsigned long  goal 
)

Definition at line 358 of file nobootmem.c.

void* __init __alloc_bootmem_node_nopanic ( pg_data_t pgdat,
unsigned long  size,
unsigned long  align,
unsigned long  goal 
)

Definition at line 310 of file nobootmem.c.

void* __init __alloc_bootmem_nopanic ( unsigned long  size,
unsigned long  align,
unsigned long  goal 
)

__alloc_bootmem_nopanic - allocate boot memory without panicking : size of the request in bytes : alignment of the region : preferred starting address of the region

The goal is dropped if it can not be satisfied and the allocation will fall back to memory below .

Allocation may happen on any node in the system.

Returns NULL on failure.

Definition at line 239 of file nobootmem.c.

EXPORT_SYMBOL ( contig_page_data  )
unsigned long __init free_all_bootmem ( void  )

free_all_bootmem - release free pages to the buddy allocator

Returns the number of pages actually released.

Definition at line 159 of file nobootmem.c.

unsigned long __init free_all_bootmem_node ( pg_data_t pgdat)

free_all_bootmem_node - release a node's free pages to the buddy allocator : node to be released

Returns the number of pages actually released.

Definition at line 146 of file nobootmem.c.

void __init free_bootmem ( unsigned long  addr,
unsigned long  size 
)

free_bootmem - mark a page range as usable : starting address of the range : size of the range in bytes

Partial pages will be considered reserved and left as they are.

The range must be contiguous but may span node boundaries.

Definition at line 195 of file nobootmem.c.

void __init free_bootmem_late ( unsigned long  addr,
unsigned long  size 
)

Definition at line 68 of file nobootmem.c.

void __init free_bootmem_node ( pg_data_t pgdat,
unsigned long  physaddr,
unsigned long  size 
)

free_bootmem_node - mark a page range as usable : node the range resides on : starting address of the range : size of the range in bytes

Partial pages will be considered reserved and left as they are.

The range must reside completely on the specified node.

Definition at line 179 of file nobootmem.c.

unsigned long __init free_low_memory_core_early ( int  nodeid)

Definition at line 123 of file nobootmem.c.

Variable Documentation

struct pglist_data __refdata contig_page_data

Definition at line 27 of file nobootmem.c.

unsigned long max_low_pfn

Definition at line 31 of file nobootmem.c.

unsigned long max_pfn

Definition at line 33 of file nobootmem.c.

unsigned long min_low_pfn

Definition at line 32 of file nobootmem.c.