diff options
Diffstat (limited to 'include/linux/bootmem.h')
-rw-r--r-- | include/linux/bootmem.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 95837bfb5256..455d83219fae 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -65,23 +65,20 @@ extern void free_bootmem(unsigned long addr, unsigned long size); | |||
65 | #define BOOTMEM_DEFAULT 0 | 65 | #define BOOTMEM_DEFAULT 0 |
66 | #define BOOTMEM_EXCLUSIVE (1<<0) | 66 | #define BOOTMEM_EXCLUSIVE (1<<0) |
67 | 67 | ||
68 | extern int reserve_bootmem(unsigned long addr, | ||
69 | unsigned long size, | ||
70 | int flags); | ||
68 | extern int reserve_bootmem_node(pg_data_t *pgdat, | 71 | extern int reserve_bootmem_node(pg_data_t *pgdat, |
69 | unsigned long physaddr, | 72 | unsigned long physaddr, |
70 | unsigned long size, | 73 | unsigned long size, |
71 | int flags); | 74 | int flags); |
72 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | ||
73 | extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags); | ||
74 | #endif | ||
75 | 75 | ||
76 | extern void *__alloc_bootmem_nopanic(unsigned long size, | 76 | extern void *__alloc_bootmem(unsigned long size, |
77 | unsigned long align, | 77 | unsigned long align, |
78 | unsigned long goal); | 78 | unsigned long goal); |
79 | extern void *__alloc_bootmem(unsigned long size, | 79 | extern void *__alloc_bootmem_nopanic(unsigned long size, |
80 | unsigned long align, | 80 | unsigned long align, |
81 | unsigned long goal); | 81 | unsigned long goal); |
82 | extern void *__alloc_bootmem_low(unsigned long size, | ||
83 | unsigned long align, | ||
84 | unsigned long goal); | ||
85 | extern void *__alloc_bootmem_node(pg_data_t *pgdat, | 82 | extern void *__alloc_bootmem_node(pg_data_t *pgdat, |
86 | unsigned long size, | 83 | unsigned long size, |
87 | unsigned long align, | 84 | unsigned long align, |
@@ -90,30 +87,35 @@ extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat, | |||
90 | unsigned long size, | 87 | unsigned long size, |
91 | unsigned long align, | 88 | unsigned long align, |
92 | unsigned long goal); | 89 | unsigned long goal); |
90 | extern void *__alloc_bootmem_low(unsigned long size, | ||
91 | unsigned long align, | ||
92 | unsigned long goal); | ||
93 | extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | 93 | extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, |
94 | unsigned long size, | 94 | unsigned long size, |
95 | unsigned long align, | 95 | unsigned long align, |
96 | unsigned long goal); | 96 | unsigned long goal); |
97 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 97 | |
98 | #define alloc_bootmem(x) \ | 98 | #define alloc_bootmem(x) \ |
99 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 99 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
100 | #define alloc_bootmem_nopanic(x) \ | 100 | #define alloc_bootmem_nopanic(x) \ |
101 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 101 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
102 | #define alloc_bootmem_low(x) \ | ||
103 | __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) | ||
104 | #define alloc_bootmem_pages(x) \ | 102 | #define alloc_bootmem_pages(x) \ |
105 | __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 103 | __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
106 | #define alloc_bootmem_pages_nopanic(x) \ | 104 | #define alloc_bootmem_pages_nopanic(x) \ |
107 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 105 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
108 | #define alloc_bootmem_low_pages(x) \ | ||
109 | __alloc_bootmem_low(x, PAGE_SIZE, 0) | ||
110 | #define alloc_bootmem_node(pgdat, x) \ | 106 | #define alloc_bootmem_node(pgdat, x) \ |
111 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 107 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
112 | #define alloc_bootmem_pages_node(pgdat, x) \ | 108 | #define alloc_bootmem_pages_node(pgdat, x) \ |
113 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 109 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
110 | #define alloc_bootmem_pages_node_nopanic(pgdat, x) \ | ||
111 | __alloc_bootmem_node_nopanic(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | ||
112 | |||
113 | #define alloc_bootmem_low(x) \ | ||
114 | __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) | ||
115 | #define alloc_bootmem_low_pages(x) \ | ||
116 | __alloc_bootmem_low(x, PAGE_SIZE, 0) | ||
114 | #define alloc_bootmem_low_pages_node(pgdat, x) \ | 117 | #define alloc_bootmem_low_pages_node(pgdat, x) \ |
115 | __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) | 118 | __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) |
116 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | ||
117 | 119 | ||
118 | extern int reserve_bootmem_generic(unsigned long addr, unsigned long size, | 120 | extern int reserve_bootmem_generic(unsigned long addr, unsigned long size, |
119 | int flags); | 121 | int flags); |