diff options
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r-- | include/linux/gfp.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index b414be387180..e8003afeffba 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -173,11 +173,24 @@ static inline void arch_free_page(struct page *page, int order) { } | |||
173 | static inline void arch_alloc_page(struct page *page, int order) { } | 173 | static inline void arch_alloc_page(struct page *page, int order) { } |
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | extern struct page *__alloc_pages(gfp_t, unsigned int, struct zonelist *); | 176 | struct page * |
177 | __alloc_pages_internal(gfp_t gfp_mask, unsigned int order, | ||
178 | struct zonelist *zonelist, nodemask_t *nodemask); | ||
179 | |||
180 | static inline struct page * | ||
181 | __alloc_pages(gfp_t gfp_mask, unsigned int order, | ||
182 | struct zonelist *zonelist) | ||
183 | { | ||
184 | return __alloc_pages_internal(gfp_mask, order, zonelist, NULL); | ||
185 | } | ||
186 | |||
187 | static inline struct page * | ||
188 | __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, | ||
189 | struct zonelist *zonelist, nodemask_t *nodemask) | ||
190 | { | ||
191 | return __alloc_pages_internal(gfp_mask, order, zonelist, nodemask); | ||
192 | } | ||
177 | 193 | ||
178 | extern struct page * | ||
179 | __alloc_pages_nodemask(gfp_t, unsigned int, | ||
180 | struct zonelist *, nodemask_t *nodemask); | ||
181 | 194 | ||
182 | static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, | 195 | static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask, |
183 | unsigned int order) | 196 | unsigned int order) |
@@ -215,6 +228,9 @@ extern struct page *alloc_page_vma(gfp_t gfp_mask, | |||
215 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); | 228 | extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); |
216 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); | 229 | extern unsigned long get_zeroed_page(gfp_t gfp_mask); |
217 | 230 | ||
231 | void *alloc_pages_exact(size_t size, gfp_t gfp_mask); | ||
232 | void free_pages_exact(void *virt, size_t size); | ||
233 | |||
218 | #define __get_free_page(gfp_mask) \ | 234 | #define __get_free_page(gfp_mask) \ |
219 | __get_free_pages((gfp_mask),0) | 235 | __get_free_pages((gfp_mask),0) |
220 | 236 | ||