aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/android/binder_alloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/android/binder_alloc.h')
-rw-r--r--drivers/android/binder_alloc.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/android/binder_alloc.h b/drivers/android/binder_alloc.h
index 9d682b9d6c24..1026e9fb20db 100644
--- a/drivers/android/binder_alloc.h
+++ b/drivers/android/binder_alloc.h
@@ -82,7 +82,6 @@ struct binder_lru_page {
82 * (invariant after init) 82 * (invariant after init)
83 * @vma_vm_mm: copy of vma->vm_mm (invarient after mmap) 83 * @vma_vm_mm: copy of vma->vm_mm (invarient after mmap)
84 * @buffer: base of per-proc address space mapped via mmap 84 * @buffer: base of per-proc address space mapped via mmap
85 * @user_buffer_offset: offset between user and kernel VAs for buffer
86 * @buffers: list of all buffers for this proc 85 * @buffers: list of all buffers for this proc
87 * @free_buffers: rb tree of buffers available for allocation 86 * @free_buffers: rb tree of buffers available for allocation
88 * sorted by size 87 * sorted by size
@@ -104,7 +103,6 @@ struct binder_alloc {
104 struct vm_area_struct *vma; 103 struct vm_area_struct *vma;
105 struct mm_struct *vma_vm_mm; 104 struct mm_struct *vma_vm_mm;
106 void *buffer; 105 void *buffer;
107 ptrdiff_t user_buffer_offset;
108 struct list_head buffers; 106 struct list_head buffers;
109 struct rb_root free_buffers; 107 struct rb_root free_buffers;
110 struct rb_root allocated_buffers; 108 struct rb_root allocated_buffers;
@@ -163,27 +161,6 @@ binder_alloc_get_free_async_space(struct binder_alloc *alloc)
163 return free_async_space; 161 return free_async_space;
164} 162}
165 163
166/**
167 * binder_alloc_get_user_buffer_offset() - get offset between kernel/user addrs
168 * @alloc: binder_alloc for this proc
169 *
170 * Return: the offset between kernel and user-space addresses to use for
171 * virtual address conversion
172 */
173static inline ptrdiff_t
174binder_alloc_get_user_buffer_offset(struct binder_alloc *alloc)
175{
176 /*
177 * user_buffer_offset is constant if vma is set and
178 * undefined if vma is not set. It is possible to
179 * get here with !alloc->vma if the target process
180 * is dying while a transaction is being initiated.
181 * Returning the old value is ok in this case and
182 * the transaction will fail.
183 */
184 return alloc->user_buffer_offset;
185}
186
187unsigned long 164unsigned long
188binder_alloc_copy_user_to_buffer(struct binder_alloc *alloc, 165binder_alloc_copy_user_to_buffer(struct binder_alloc *alloc,
189 struct binder_buffer *buffer, 166 struct binder_buffer *buffer,