|
@@ -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 */
|
|
|
|
|
|
/*
|
|
@@ -96,8 +97,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);
|