diff options
Diffstat (limited to 'include/linux/vmalloc.h')
| -rw-r--r-- | include/linux/vmalloc.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index b87696fdf06a..7d7acb35603d 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
| @@ -16,6 +16,7 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */ | |||
| 16 | #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ | 16 | #define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */ |
| 17 | #define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ | 17 | #define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ |
| 18 | #define VM_UNINITIALIZED 0x00000020 /* vm_struct is not fully initialized */ | 18 | #define VM_UNINITIALIZED 0x00000020 /* vm_struct is not fully initialized */ |
| 19 | #define VM_NO_GUARD 0x00000040 /* don't add guard page */ | ||
| 19 | /* bits [20..32] reserved for arch specific ioremap internals */ | 20 | /* bits [20..32] reserved for arch specific ioremap internals */ |
| 20 | 21 | ||
| 21 | /* | 22 | /* |
| @@ -75,7 +76,9 @@ extern void *vmalloc_32_user(unsigned long size); | |||
| 75 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); | 76 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); |
| 76 | extern void *__vmalloc_node_range(unsigned long size, unsigned long align, | 77 | extern void *__vmalloc_node_range(unsigned long size, unsigned long align, |
| 77 | unsigned long start, unsigned long end, gfp_t gfp_mask, | 78 | unsigned long start, unsigned long end, gfp_t gfp_mask, |
| 78 | pgprot_t prot, int node, const void *caller); | 79 | pgprot_t prot, unsigned long vm_flags, int node, |
| 80 | const void *caller); | ||
| 81 | |||
| 79 | extern void vfree(const void *addr); | 82 | extern void vfree(const void *addr); |
| 80 | 83 | ||
| 81 | extern void *vmap(struct page **pages, unsigned int count, | 84 | extern void *vmap(struct page **pages, unsigned int count, |
| @@ -96,8 +99,12 @@ void vmalloc_sync_all(void); | |||
| 96 | 99 | ||
| 97 | static inline size_t get_vm_area_size(const struct vm_struct *area) | 100 | static inline size_t get_vm_area_size(const struct vm_struct *area) |
| 98 | { | 101 | { |
| 99 | /* return actual size without guard page */ | 102 | if (!(area->flags & VM_NO_GUARD)) |
| 100 | return area->size - PAGE_SIZE; | 103 | /* return actual size without guard page */ |
| 104 | return area->size - PAGE_SIZE; | ||
| 105 | else | ||
| 106 | return area->size; | ||
| 107 | |||
| 101 | } | 108 | } |
| 102 | 109 | ||
| 103 | extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); | 110 | extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); |
