]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/vmalloc.h
serial: core: Fix iotype userspace breakage
[mirror_ubuntu-artful-kernel.git] / include / linux / vmalloc.h
index b87696fdf06ab14d14ff01f5cfd7b2650f1e6c96..7d7acb35603d6d6e4bb8a468fcb635d666fea001 100644 (file)
@@ -16,6 +16,7 @@ struct vm_area_struct;                /* vma defining user mapping in mm_types.h */
 #define VM_USERMAP             0x00000008      /* suitable for remap_vmalloc_range */
 #define VM_VPAGES              0x00000010      /* buffer for pages was vmalloc'ed */
 #define VM_UNINITIALIZED       0x00000020      /* vm_struct is not fully initialized */
+#define VM_NO_GUARD            0x00000040      /* don't add guard page */
 /* bits [20..32] reserved for arch specific ioremap internals */
 
 /*
@@ -75,7 +76,9 @@ extern void *vmalloc_32_user(unsigned long size);
 extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot);
 extern void *__vmalloc_node_range(unsigned long size, unsigned long align,
                        unsigned long start, unsigned long end, gfp_t gfp_mask,
-                       pgprot_t prot, int node, const void *caller);
+                       pgprot_t prot, unsigned long vm_flags, int node,
+                       const void *caller);
+
 extern void vfree(const void *addr);
 
 extern void *vmap(struct page **pages, unsigned int count,
@@ -96,8 +99,12 @@ void vmalloc_sync_all(void);
 
 static inline size_t get_vm_area_size(const struct vm_struct *area)
 {
-       /* return actual size without guard page */
-       return area->size - PAGE_SIZE;
+       if (!(area->flags & VM_NO_GUARD))
+               /* return actual size without guard page */
+               return area->size - PAGE_SIZE;
+       else
+               return area->size;
+
 }
 
 extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);