Go to the documentation of this file.
4 #ifndef _LINUX_BOOTMEM_H
5 #define _LINUX_BOOTMEM_H
22 #ifndef CONFIG_NO_BOOTMEM
42 unsigned long freepfn,
43 unsigned long startpfn,
44 unsigned long endpfn);
65 #define BOOTMEM_DEFAULT 0
66 #define BOOTMEM_EXCLUSIVE (1<<0)
72 unsigned long physaddr,
107 #ifdef CONFIG_NO_BOOTMEM
109 #define BOOTMEM_LOW_LIMIT 0
111 #define BOOTMEM_LOW_LIMIT __pa(MAX_DMA_ADDRESS)
114 #define alloc_bootmem(x) \
115 __alloc_bootmem(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
116 #define alloc_bootmem_align(x, align) \
117 __alloc_bootmem(x, align, BOOTMEM_LOW_LIMIT)
118 #define alloc_bootmem_nopanic(x) \
119 __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
120 #define alloc_bootmem_pages(x) \
121 __alloc_bootmem(x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
122 #define alloc_bootmem_pages_nopanic(x) \
123 __alloc_bootmem_nopanic(x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
124 #define alloc_bootmem_node(pgdat, x) \
125 __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
126 #define alloc_bootmem_node_nopanic(pgdat, x) \
127 __alloc_bootmem_node_nopanic(pgdat, x, SMP_CACHE_BYTES, BOOTMEM_LOW_LIMIT)
128 #define alloc_bootmem_pages_node(pgdat, x) \
129 __alloc_bootmem_node(pgdat, x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
130 #define alloc_bootmem_pages_node_nopanic(pgdat, x) \
131 __alloc_bootmem_node_nopanic(pgdat, x, PAGE_SIZE, BOOTMEM_LOW_LIMIT)
133 #define alloc_bootmem_low(x) \
134 __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0)
135 #define alloc_bootmem_low_pages(x) \
136 __alloc_bootmem_low(x, PAGE_SIZE, 0)
137 #define alloc_bootmem_low_pages_node(pgdat, x) \
138 __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0)
143 #ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP
153 unsigned long bucketsize,
154 unsigned long numentries,
157 unsigned int *_hash_shift,
158 unsigned int *_hash_mask,
159 unsigned long low_limit,
160 unsigned long high_limit);
162 #define HASH_EARLY 0x00000001
163 #define HASH_SMALL 0x00000002
169 #if defined(CONFIG_NUMA) && defined(CONFIG_64BIT)
170 #define HASHDIST_DEFAULT 1
172 #define HASHDIST_DEFAULT 0