diff options
| author | Mark Brown <broonie@kernel.org> | 2019-05-20 11:53:50 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2019-05-20 11:53:50 +0100 |
| commit | 1c7c3237c0cc4ad3c7b0df458290c8e2a652f178 (patch) | |
| tree | d5d027d4dbdae390c736a82e16c57966214e2c0a /include/linux/vmalloc.h | |
| parent | bfa8130f50a63563eae10ef933fe01b50b3e87a0 (diff) | |
| parent | a188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff) | |
Merge tag 'v5.2-rc1' into asoc-5.3
Linux 5.2-rc1
Diffstat (limited to 'include/linux/vmalloc.h')
| -rw-r--r-- | include/linux/vmalloc.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 398e9c95cd61..51e131245379 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -21,6 +21,11 @@ struct notifier_block; /* in notifier.h */ #define VM_UNINITIALIZED 0x00000020 /* vm_struct is not fully initialized */ #define VM_NO_GUARD 0x00000040 /* don't add guard page */ #define VM_KASAN 0x00000080 /* has allocated kasan shadow memory */ +/* + * Memory with VM_FLUSH_RESET_PERMS cannot be freed in an interrupt or with + * vfree_atomic(). + */ +#define VM_FLUSH_RESET_PERMS 0x00000100 /* Reset direct map and flush TLB on unmap */ /* bits [20..32] reserved for arch specific ioremap internals */ /* @@ -45,12 +50,16 @@ struct vm_struct { struct vmap_area { unsigned long va_start; unsigned long va_end; + + /* + * Largest available free size in subtree. + */ + unsigned long subtree_max_size; unsigned long flags; struct rb_node rb_node; /* address sorted rbtree */ struct list_head list; /* address sorted list */ struct llist_node purge_list; /* "lazy purge" list */ struct vm_struct *vm; - struct rcu_head rcu_head; }; /* @@ -142,6 +151,13 @@ extern int map_kernel_range_noflush(unsigned long start, unsigned long size, pgprot_t prot, struct page **pages); extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); extern void unmap_kernel_range(unsigned long addr, unsigned long size); +static inline void set_vm_flush_reset_perms(void *addr) +{ + struct vm_struct *vm = find_vm_area(addr); + + if (vm) + vm->flags |= VM_FLUSH_RESET_PERMS; +} #else static inline int map_kernel_range_noflush(unsigned long start, unsigned long size, @@ -157,6 +173,9 @@ static inline void unmap_kernel_range(unsigned long addr, unsigned long size) { } +static inline void set_vm_flush_reset_perms(void *addr) +{ +} #endif /* Allocate/destroy a 'vmalloc' VM area. */ |
