diff options
Diffstat (limited to 'libc/kernel/common/linux/gfp.h')
-rw-r--r-- | libc/kernel/common/linux/gfp.h | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/libc/kernel/common/linux/gfp.h b/libc/kernel/common/linux/gfp.h index 258ec08c4..0a59fe918 100644 --- a/libc/kernel/common/linux/gfp.h +++ b/libc/kernel/common/linux/gfp.h @@ -7,73 +7,70 @@ *** structures, and macros generated from the original header, and thus, *** contains no copyrightable information. *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** **************************************************************************** ****************************************************************************/ #ifndef __LINUX_GFP_H #define __LINUX_GFP_H + #include <linux/mmzone.h> #include <linux/stddef.h> -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #include <linux/linkage.h> + struct vm_area_struct; + #define __GFP_DMA ((__force gfp_t)0x01u) #define __GFP_HIGHMEM ((__force gfp_t)0x02u) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #if BITS_PER_LONG < 64 #define __GFP_DMA32 ((__force gfp_t)0x00) #else #define __GFP_DMA32 ((__force gfp_t)0x04) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif + #define __GFP_WAIT ((__force gfp_t)0x10u) #define __GFP_HIGH ((__force gfp_t)0x20u) #define __GFP_IO ((__force gfp_t)0x40u) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define __GFP_FS ((__force gfp_t)0x80u) #define __GFP_COLD ((__force gfp_t)0x100u) #define __GFP_NOWARN ((__force gfp_t)0x200u) #define __GFP_REPEAT ((__force gfp_t)0x400u) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define __GFP_NOFAIL ((__force gfp_t)0x800u) #define __GFP_NORETRY ((__force gfp_t)0x1000u) #define __GFP_NO_GROW ((__force gfp_t)0x2000u) #define __GFP_COMP ((__force gfp_t)0x4000u) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define __GFP_ZERO ((__force gfp_t)0x8000u) #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) #define __GFP_HARDWALL ((__force gfp_t)0x20000u) + #define __GFP_BITS_SHIFT 20 -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) + #define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| __GFP_NOMEMALLOC|__GFP_HARDWALL) + #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) + #define GFP_ATOMIC (__GFP_HIGH) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define GFP_NOIO (__GFP_WAIT) #define GFP_NOFS (__GFP_WAIT | __GFP_IO) #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) #define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM) + #define GFP_DMA __GFP_DMA + #define GFP_DMA32 __GFP_DMA32 + #ifndef HAVE_ARCH_FREE_PAGE -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #endif + #define alloc_pages(gfp_mask, order) alloc_pages_node(numa_node_id(), gfp_mask, order) #define alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0) #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + #define __get_free_page(gfp_mask) __get_free_pages((gfp_mask),0) + #define __get_dma_pages(gfp_mask, order) __get_free_pages((gfp_mask) | GFP_DMA,(order)) + #define __free_page(page) __free_pages((page), 0) #define free_page(addr) free_pages((addr),0) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + #endif |