1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef __LINUX_GFP_H 20 #define __LINUX_GFP_H 21 #include <linux/mmzone.h> 22 #include <linux/stddef.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #include <linux/linkage.h> 25 struct vm_area_struct; 26 #define __GFP_DMA ((__force gfp_t)0x01u) 27 #define __GFP_HIGHMEM ((__force gfp_t)0x02u) 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #if BITS_PER_LONG < 64 30 #define __GFP_DMA32 ((__force gfp_t)0x00) 31 #else 32 #define __GFP_DMA32 ((__force gfp_t)0x04) 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #endif 35 #define __GFP_WAIT ((__force gfp_t)0x10u) 36 #define __GFP_HIGH ((__force gfp_t)0x20u) 37 #define __GFP_IO ((__force gfp_t)0x40u) 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 #define __GFP_FS ((__force gfp_t)0x80u) 40 #define __GFP_COLD ((__force gfp_t)0x100u) 41 #define __GFP_NOWARN ((__force gfp_t)0x200u) 42 #define __GFP_REPEAT ((__force gfp_t)0x400u) 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define __GFP_NOFAIL ((__force gfp_t)0x800u) 45 #define __GFP_NORETRY ((__force gfp_t)0x1000u) 46 #define __GFP_NO_GROW ((__force gfp_t)0x2000u) 47 #define __GFP_COMP ((__force gfp_t)0x4000u) 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #define __GFP_ZERO ((__force gfp_t)0x8000u) 50 #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) 51 #define __GFP_HARDWALL ((__force gfp_t)0x20000u) 52 #define __GFP_BITS_SHIFT 20 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) 55 #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) 56 #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) 57 #define GFP_ATOMIC (__GFP_HIGH) 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define GFP_NOIO (__GFP_WAIT) 60 #define GFP_NOFS (__GFP_WAIT | __GFP_IO) 61 #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) 62 #define GFP_USER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL) 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 #define GFP_HIGHUSER (__GFP_WAIT | __GFP_IO | __GFP_FS | __GFP_HARDWALL | __GFP_HIGHMEM) 65 #define GFP_DMA __GFP_DMA 66 #define GFP_DMA32 __GFP_DMA32 67 #ifndef HAVE_ARCH_FREE_PAGE 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 #endif 70 #define alloc_pages(gfp_mask, order) alloc_pages_node(numa_node_id(), gfp_mask, order) 71 #define alloc_page_vma(gfp_mask, vma, addr) alloc_pages(gfp_mask, 0) 72 #define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 #define __get_free_page(gfp_mask) __get_free_pages((gfp_mask),0) 75 #define __get_dma_pages(gfp_mask, order) __get_free_pages((gfp_mask) | GFP_DMA,(order)) 76 #define __free_page(page) __free_pages((page), 0) 77 #define free_page(addr) free_pages((addr),0) 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 #endif 80