summaryrefslogtreecommitdiffstats
path: root/include/linux/vmalloc.h
diff options
context:
space:
mode:
authorJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2019-10-15 11:18:26 +0300
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2019-10-15 11:18:26 +0300
commitfa41d6ee904266fa8739cafa6ec038c3a8e435b7 (patch)
tree4d5439bafd38dc730838bb15e6a49e747793d4a7 /include/linux/vmalloc.h
parent9cd20ef7803cc53a00c6eb7198b3d870ac7b3766 (diff)
parent7ed093602e0e1b60a0fc074a9692687e7d2b723d (diff)
downloadcachepc-linux-fa41d6ee904266fa8739cafa6ec038c3a8e435b7.tar.gz
cachepc-linux-fa41d6ee904266fa8739cafa6ec038c3a8e435b7.zip
Merge drm/drm-next into drm-intel-next-queued
Backmerging to pull in HDR DP code: https://lists.freedesktop.org/archives/dri-devel/2019-September/236453.html Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'include/linux/vmalloc.h')
-rw-r--r--include/linux/vmalloc.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 9b21d0047710..4e7809408073 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -18,6 +18,7 @@ struct notifier_block; /* in notifier.h */
#define VM_ALLOC 0x00000002 /* vmalloc() */
#define VM_MAP 0x00000004 /* vmap()ed pages */
#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
+#define VM_DMA_COHERENT 0x00000010 /* dma_alloc_coherent */
#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 */
@@ -26,6 +27,7 @@ struct notifier_block; /* in notifier.h */
* 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 */
/*
@@ -51,15 +53,21 @@ 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;
+
+ /*
+ * The following three variables can be packed, because
+ * a vmap_area object is always one of the three states:
+ * 1) in "free" tree (root is vmap_area_root)
+ * 2) in "busy" tree (root is free_vmap_area_root)
+ * 3) in purge list (head is vmap_purge_list)
+ */
+ union {
+ unsigned long subtree_max_size; /* in "free" tree */
+ struct vm_struct *vm; /* in "busy" tree */
+ struct llist_node purge_list; /* in purge list */
+ };
};
/*