diff options
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r-- | include/linux/gfp.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 4c6d41333f98..975609cb8548 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -15,7 +15,7 @@ struct vm_area_struct; | |||
15 | * Zone modifiers (see linux/mmzone.h - low three bits) | 15 | * Zone modifiers (see linux/mmzone.h - low three bits) |
16 | * | 16 | * |
17 | * Do not put any conditional on these. If necessary modify the definitions | 17 | * Do not put any conditional on these. If necessary modify the definitions |
18 | * without the underscores and use the consistently. The definitions here may | 18 | * without the underscores and use them consistently. The definitions here may |
19 | * be used in bit comparisons. | 19 | * be used in bit comparisons. |
20 | */ | 20 | */ |
21 | #define __GFP_DMA ((__force gfp_t)0x01u) | 21 | #define __GFP_DMA ((__force gfp_t)0x01u) |
@@ -101,7 +101,7 @@ struct vm_area_struct; | |||
101 | __GFP_NORETRY|__GFP_NOMEMALLOC) | 101 | __GFP_NORETRY|__GFP_NOMEMALLOC) |
102 | 102 | ||
103 | /* Control slab gfp mask during early boot */ | 103 | /* Control slab gfp mask during early boot */ |
104 | #define GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS) | 104 | #define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS)) |
105 | 105 | ||
106 | /* Control allocation constraints */ | 106 | /* Control allocation constraints */ |
107 | #define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE) | 107 | #define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE) |
@@ -152,12 +152,12 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags) | |||
152 | * GFP_ZONE_TABLE is a word size bitstring that is used for looking up the | 152 | * GFP_ZONE_TABLE is a word size bitstring that is used for looking up the |
153 | * zone to use given the lowest 4 bits of gfp_t. Entries are ZONE_SHIFT long | 153 | * zone to use given the lowest 4 bits of gfp_t. Entries are ZONE_SHIFT long |
154 | * and there are 16 of them to cover all possible combinations of | 154 | * and there are 16 of them to cover all possible combinations of |
155 | * __GFP_DMA, __GFP_DMA32, __GFP_MOVABLE and __GFP_HIGHMEM | 155 | * __GFP_DMA, __GFP_DMA32, __GFP_MOVABLE and __GFP_HIGHMEM. |
156 | * | 156 | * |
157 | * The zone fallback order is MOVABLE=>HIGHMEM=>NORMAL=>DMA32=>DMA. | 157 | * The zone fallback order is MOVABLE=>HIGHMEM=>NORMAL=>DMA32=>DMA. |
158 | * But GFP_MOVABLE is not only a zone specifier but also an allocation | 158 | * But GFP_MOVABLE is not only a zone specifier but also an allocation |
159 | * policy. Therefore __GFP_MOVABLE plus another zone selector is valid. | 159 | * policy. Therefore __GFP_MOVABLE plus another zone selector is valid. |
160 | * Only 1bit of the lowest 3 bit (DMA,DMA32,HIGHMEM) can be set to "1". | 160 | * Only 1 bit of the lowest 3 bits (DMA,DMA32,HIGHMEM) can be set to "1". |
161 | * | 161 | * |
162 | * bit result | 162 | * bit result |
163 | * ================= | 163 | * ================= |
@@ -187,7 +187,7 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags) | |||
187 | 187 | ||
188 | #define GFP_ZONE_TABLE ( \ | 188 | #define GFP_ZONE_TABLE ( \ |
189 | (ZONE_NORMAL << 0 * ZONES_SHIFT) \ | 189 | (ZONE_NORMAL << 0 * ZONES_SHIFT) \ |
190 | | (OPT_ZONE_DMA << __GFP_DMA * ZONES_SHIFT) \ | 190 | | (OPT_ZONE_DMA << __GFP_DMA * ZONES_SHIFT) \ |
191 | | (OPT_ZONE_HIGHMEM << __GFP_HIGHMEM * ZONES_SHIFT) \ | 191 | | (OPT_ZONE_HIGHMEM << __GFP_HIGHMEM * ZONES_SHIFT) \ |
192 | | (OPT_ZONE_DMA32 << __GFP_DMA32 * ZONES_SHIFT) \ | 192 | | (OPT_ZONE_DMA32 << __GFP_DMA32 * ZONES_SHIFT) \ |
193 | | (ZONE_NORMAL << __GFP_MOVABLE * ZONES_SHIFT) \ | 193 | | (ZONE_NORMAL << __GFP_MOVABLE * ZONES_SHIFT) \ |
@@ -197,7 +197,7 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags) | |||
197 | ) | 197 | ) |
198 | 198 | ||
199 | /* | 199 | /* |
200 | * GFP_ZONE_BAD is a bitmap for all combination of __GFP_DMA, __GFP_DMA32 | 200 | * GFP_ZONE_BAD is a bitmap for all combinations of __GFP_DMA, __GFP_DMA32 |
201 | * __GFP_HIGHMEM and __GFP_MOVABLE that are not permitted. One flag per | 201 | * __GFP_HIGHMEM and __GFP_MOVABLE that are not permitted. One flag per |
202 | * entry starting with bit 0. Bit is set if the combination is not | 202 | * entry starting with bit 0. Bit is set if the combination is not |
203 | * allowed. | 203 | * allowed. |
@@ -320,17 +320,17 @@ void *alloc_pages_exact(size_t size, gfp_t gfp_mask); | |||
320 | void free_pages_exact(void *virt, size_t size); | 320 | void free_pages_exact(void *virt, size_t size); |
321 | 321 | ||
322 | #define __get_free_page(gfp_mask) \ | 322 | #define __get_free_page(gfp_mask) \ |
323 | __get_free_pages((gfp_mask),0) | 323 | __get_free_pages((gfp_mask), 0) |
324 | 324 | ||
325 | #define __get_dma_pages(gfp_mask, order) \ | 325 | #define __get_dma_pages(gfp_mask, order) \ |
326 | __get_free_pages((gfp_mask) | GFP_DMA,(order)) | 326 | __get_free_pages((gfp_mask) | GFP_DMA, (order)) |
327 | 327 | ||
328 | extern void __free_pages(struct page *page, unsigned int order); | 328 | extern void __free_pages(struct page *page, unsigned int order); |
329 | extern void free_pages(unsigned long addr, unsigned int order); | 329 | extern void free_pages(unsigned long addr, unsigned int order); |
330 | extern void free_hot_cold_page(struct page *page, int cold); | 330 | extern void free_hot_cold_page(struct page *page, int cold); |
331 | 331 | ||
332 | #define __free_page(page) __free_pages((page), 0) | 332 | #define __free_page(page) __free_pages((page), 0) |
333 | #define free_page(addr) free_pages((addr),0) | 333 | #define free_page(addr) free_pages((addr), 0) |
334 | 334 | ||
335 | void page_alloc_init(void); | 335 | void page_alloc_init(void); |
336 | void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); | 336 | void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); |