Ion cleanup
cover Ion cleanup
I never saw any feedback or action on these patches so this is a resend. Probably hit the window when everyone was busy/traveling.
---
Hi,
This is some clean up of old Ion interfaces and APIs. These are interfaces that mostly existed before dma_buf was well integrated into the kernel along with reservations for board files.
If there are objections to deletion I expect it to turn into a discussion about what other APIs need to be extended.
Thanks,
Laura
Laura Abbott (5):
staging: android: ion: Get rid of ion_sg_table
staging: android: ion: Drop ion_phys interface
staging: android: ion: Get rid of map_dma/unmap_dma
staging: android: ion: Drop ion_carveout_allocate definitions
staging: android: ion: Get rid of ion_reserve
drivers/staging/android/ion/ion.c | 103 ++---------------------- drivers/staging/android/ion/ion.h | 41 ---------- drivers/staging/android/ion/ion_carveout_heap.c | 33 +------- drivers/staging/android/ion/ion_chunk_heap.c | 17 +--- drivers/staging/android/ion/ion_cma_heap.c | 34 +------- drivers/staging/android/ion/ion_priv.h | 30 +------ drivers/staging/android/ion/ion_system_heap.c | 44 +--------- 7 files changed, 19 insertions(+), 283 deletions(-)
Signature · 1 line
2.5.5
PATCH RESEND 1/5 staging: android: ion: Get rid of ion_sg_table
The ion_sg_table interface is mostly a reimplementation of what dma_buf is doing. Clients should be using dma_buf APIs instead.
--- drivers/staging/android/ion/ion.c | 20 -------------------- drivers/staging/android/ion/ion.h | 11 ----------- 2 files changed, 31 deletions(-)
drivers/staging/android/ion/ion.c +0 -20
@@ -917,26 +917,6 @@ void ion_client_destroy(struct ion_client *client) }EXPORT_SYMBOL (ion_client_destroy); -struct sg_table *ion_sg_table (struct ion_client *client, -struct ion_handle *handle) -{ -struct ion_buffer *buffer; -struct sg_table *table; - -mutex_lock (&client->lock); -if (!ion_handle_validate (client, handle)) { -pr_err ("%s: invalid handle passed to map_dma.\n" , - __func__); -mutex_unlock (&client->lock); -return ERR_PTR (-EINVAL ); - } - buffer = handle->buffer; - table = buffer->sg_table; -mutex_unlock (&client->lock); -return table; -} -EXPORT_SYMBOL (ion_sg_table); -static void ion_buffer_sync_for_device (struct ion_buffer *buffer,struct device *dev,enum dma_data_direction direction);
drivers/staging/android/ion/ion.h +0 -11
@@ -149,17 +149,6 @@ int ion_phys(struct ion_client *client, struct ion_handle *handle, ion_phys_addr_t *addr, size_t *len);/** -* ion_map_dma - return an sg_table describing a handle -* @client: the client -* @handle: the handle -* -* This function returns the sg_table describing -* a particular ion handle. -*/ -struct sg_table *ion_sg_table (struct ion_client *client, -struct ion_handle *handle); - -/** * ion_map_kernel - create mapping for the given handle * @client: the client * @handle: handle to map
Signature · 1 line
2.5.5
PATCH RESEND 2/5 staging: android: ion: Drop ion_phys interface
In reply to Laura Abbottion_phys was an interface used for older legacy behavior. sg_tables are the standard now. Get rid of it.
--- drivers/staging/android/ion/ion.c | 26 ------------------------- drivers/staging/android/ion/ion.h | 19 ------------------ drivers/staging/android/ion/ion_carveout_heap.c | 14 ------------- drivers/staging/android/ion/ion_cma_heap.c | 18 ----------------- drivers/staging/android/ion/ion_priv.h | 11 +---------- drivers/staging/android/ion/ion_system_heap.c | 12 ------------ 6 files changed, 1 insertion(+), 99 deletions(-)
drivers/staging/android/ion/ion.c +0 -26
@@ -576,32 +576,6 @@ void ion_free(struct ion_client *client, struct ion_handle *handle) }EXPORT_SYMBOL (ion_free); -int ion_phys (struct ion_client *client,struct ion_handle *handle, -ion_phys_addr_t *addr,size_t *len) -{ -struct ion_buffer *buffer; -int ret; - -mutex_lock (&client->lock); -if (!ion_handle_validate (client, handle)) { -mutex_unlock (&client->lock); -return -EINVAL ; - } - - buffer = handle->buffer; - -if (!buffer->heap->ops->phys) { -pr_err ("%s: ion_phys is not implemented by this heap (name=%s, type=%d).\n" , - __func__, buffer->heap->name, buffer->heap->type); -mutex_unlock (&client->lock); -return -ENODEV ; - } -mutex_unlock (&client->lock); - ret = buffer->heap->ops->phys (buffer->heap, buffer, addr, len); -return ret; -} -EXPORT_SYMBOL (ion_phys); -static void *ion_buffer_kmap_get (struct ion_buffer *buffer) {void *vaddr;
drivers/staging/android/ion/ion.h +0 -19
@@ -130,25 +130,6 @@ struct ion_handle *ion_alloc(struct ion_client *client, size_t len,void ion_free (struct ion_client *client,struct ion_handle *handle);/** -* ion_phys - returns the physical address and len of a handle -* @client: the client -* @handle: the handle -* @addr: a pointer to put the address in -* @len: a pointer to put the length in -* -* This function queries the heap for a particular handle to get the -* handle's physical address. It't output is only correct if -* a heap returns physically contiguous memory -- in other cases -* this api should not be implemented -- ion_sg_table should be used -* instead. Returns -EINVAL if the handle is invalid. This has -* no implications on the reference counting of the handle -- -* the returned value may not be valid if the caller is not -* holding a reference. -*/ -int ion_phys (struct ion_client *client,struct ion_handle *handle, -ion_phys_addr_t *addr,size_t *len); - -/** * ion_map_kernel - create mapping for the given handle * @client: the client * @handle: handle to map
drivers/staging/android/ion/ion_carveout_heap.c +0 -14
@@ -56,19 +56,6 @@ void ion_carveout_free(struct ion_heap *heap, ion_phys_addr_t addr,gen_pool_free (carveout_heap->pool, addr, size); } -static int ion_carveout_heap_phys (struct ion_heap *heap, -struct ion_buffer *buffer, -ion_phys_addr_t *addr,size_t *len) -{ -struct sg_table *table = buffer->priv_virt; -struct page *page =sg_page (table->sgl); -ion_phys_addr_t paddr =PFN_PHYS (page_to_pfn (page)); - - *addr = paddr; - *len = buffer->size; -return 0 ; -} - static int ion_carveout_heap_allocate(struct ion_heap *heap, struct ion_buffer *buffer, unsigned long size, unsigned long align,
@@ -138,7 +125,6 @@ static void ion_carveout_heap_unmap_dma(struct ion_heap *heap,static struct ion_heap_ops carveout_heap_ops = { .allocate = ion_carveout_heap_allocate, .free = ion_carveout_heap_free, - .phys = ion_carveout_heap_phys, .map_dma = ion_carveout_heap_map_dma, .unmap_dma = ion_carveout_heap_unmap_dma, .map_user = ion_heap_map_user,
drivers/staging/android/ion/ion_cma_heap.c +0 -18
@@ -105,23 +105,6 @@ static void ion_cma_free(struct ion_buffer *buffer)kfree (info); } -/* return physical address in addr */ -static int ion_cma_phys (struct ion_heap *heap,struct ion_buffer *buffer, -ion_phys_addr_t *addr,size_t *len) -{ -struct ion_cma_heap *cma_heap =to_cma_heap (buffer->heap); -struct device *dev = cma_heap->dev; -struct ion_cma_buffer_info *info = buffer->priv_virt; - -dev_dbg (dev,"Return buffer %p physical address %pa\n" , buffer, - &info->handle); - - *addr = info->handle; - *len = buffer->size; - -return 0 ; -} -static struct sg_table *ion_cma_heap_map_dma (struct ion_heap *heap,struct ion_buffer *buffer) {
@@ -164,7 +147,6 @@ static struct ion_heap_ops ion_cma_ops = { .free = ion_cma_free, .map_dma = ion_cma_heap_map_dma, .unmap_dma = ion_cma_heap_unmap_dma, - .phys = ion_cma_phys, .map_user = ion_cma_mmap, .map_kernel = ion_cma_map_kernel, .unmap_kernel = ion_cma_unmap_kernel,
drivers/staging/android/ion/ion_priv.h +1 -10
@@ -42,8 +42,6 @@ struct ion_buffer *ion_handle_buffer(struct ion_handle *handle);* @size: size of the buffer * @priv_virt: private data to the buffer representable as * a void * -* @priv_phys: private data to the buffer representable as -* an ion_phys_addr_t (and someday a phys_addr_t) * @lock: protects the buffers cnt fields * @kmap_cnt: number of times the buffer is mapped to the kernel * @vaddr: the kernel mapping if kmap_cnt is not zero
@@ -69,10 +67,7 @@ struct ion_buffer {unsigned long flags;unsigned long private_flags;size_t size; -union { -void *priv_virt; -ion_phys_addr_t priv_phys; - }; +void *priv_virt;struct mutex lock;int kmap_cnt;void *vaddr;
@@ -91,8 +86,6 @@ void ion_buffer_destroy(struct ion_buffer *buffer);* struct ion_heap_ops - ops to operate on a given heap * @allocate: allocate memory * @free: free memory -* @phys get physical address of a buffer (only define on -* physically contiguous heaps) * @map_dma map the memory for dma to a scatterlist * @unmap_dma unmap the memory for dma * @map_kernel map memory to the kernel
@@ -111,8 +104,6 @@ struct ion_heap_ops { struct ion_buffer *buffer, unsigned long len, unsigned long align, unsigned long flags);void (*free)(struct ion_buffer *buffer); -int (*phys)(struct ion_heap *heap,struct ion_buffer *buffer, -ion_phys_addr_t *addr,size_t *len);struct sg_table * (*map_dma)(struct ion_heap *heap,struct ion_buffer *buffer);void (*unmap_dma)(struct ion_heap *heap,struct ion_buffer *buffer);
drivers/staging/android/ion/ion_system_heap.c +0 -12
@@ -386,17 +386,6 @@ static void ion_system_contig_heap_free(struct ion_buffer *buffer)kfree (table); } -static int ion_system_contig_heap_phys (struct ion_heap *heap, -struct ion_buffer *buffer, -ion_phys_addr_t *addr,size_t *len) -{ -struct sg_table *table = buffer->priv_virt; -struct page *page =sg_page (table->sgl); - *addr =page_to_phys (page); - *len = buffer->size; -return 0 ; -} -static struct sg_table *ion_system_contig_heap_map_dma (struct ion_heap *heap,struct ion_buffer *buffer) {
@@ -411,7 +400,6 @@ static void ion_system_contig_heap_unmap_dma(struct ion_heap *heap,static struct ion_heap_ops kmalloc_ops = { .allocate = ion_system_contig_heap_allocate, .free = ion_system_contig_heap_free, - .phys = ion_system_contig_heap_phys, .map_dma = ion_system_contig_heap_map_dma, .unmap_dma = ion_system_contig_heap_unmap_dma, .map_kernel = ion_heap_map_kernel,
Signature · 1 line
2.5.5
PATCH RESEND 3/5 staging: android: ion: Get rid of map_dma/unmap_dma
In reply to Laura AbbottThe map_dma API interface was designed to generate an sg_table. Currently, every client just creates the table at allocation time and then returns the one table. Nothing happens on unmap_dma either. Just get rid of the API and assign the sg_table directly.
--- drivers/staging/android/ion/ion.c | 23 +++++++----------- drivers/staging/android/ion/ion_carveout_heap.c | 17 ++----------- drivers/staging/android/ion/ion_chunk_heap.c | 17 ++----------- drivers/staging/android/ion/ion_cma_heap.c | 16 +------------ drivers/staging/android/ion/ion_priv.h | 5 ---- drivers/staging/android/ion/ion_system_heap.c | 32 +++---------------------- 6 files changed, 16 insertions(+), 94 deletions(-)
drivers/staging/android/ion/ion.c +8 -15
@@ -205,19 +205,16 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, goto err2; } - buffer->dev = dev; - buffer->size = len; - - table = heap->ops->map_dma (heap, buffer); -if (WARN_ONCE (table ==NULL , -"heap->ops->map_dma should return ERR_PTR on error" )) - table =ERR_PTR (-EINVAL ); -if (IS_ERR (table)) { +if (buffer->sg_table ==NULL ) { +WARN_ONCE (1 ,"This heap needs to set the sgtable" ); ret = -EINVAL ; goto err1; } - buffer->sg_table = table; + table = buffer->sg_table; + buffer->dev = dev; + buffer->size = len; +if (ion_buffer_fault_user_mappings (buffer)) {int num_pages =PAGE_ALIGN (buffer->size) /PAGE_SIZE ;struct scatterlist *sg;
@@ -226,7 +223,7 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap, buffer->pages =vmalloc (sizeof (struct page *) * num_pages);if (!buffer->pages) { ret = -ENOMEM ; - goto err; + goto err1; }for_each_sg (table->sgl, sg, table->nents, i) {
@@ -260,8 +257,6 @@ static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,mutex_unlock (&dev->buffer_lock);return buffer; -err: - heap->ops->unmap_dma (heap, buffer); err1: heap->ops->free (buffer); err2:
@@ -273,7 +268,6 @@ void ion_buffer_destroy(struct ion_buffer *buffer) {if (WARN_ON (buffer->kmap_cnt >0 )) buffer->heap->ops->unmap_kernel (buffer->heap, buffer); - buffer->heap->ops->unmap_dma (buffer->heap, buffer); buffer->heap->ops->free (buffer);vfree (buffer->pages);kfree (buffer);
@@ -1542,8 +1536,7 @@ void ion_device_add_heap(struct ion_device *dev, struct ion_heap *heap) {struct dentry *debug_file; -if (!heap->ops->allocate || !heap->ops->free || !heap->ops->map_dma || - !heap->ops->unmap_dma) +if (!heap->ops->allocate || !heap->ops->free)pr_err ("%s: can not add heap with invalid ops struct.\n" , __func__);
drivers/staging/android/ion/ion_carveout_heap.c +2 -15
@@ -82,7 +82,7 @@ static int ion_carveout_heap_allocate(struct ion_heap *heap, }sg_set_page (table->sgl,pfn_to_page (PFN_DOWN (paddr)), size,0 ); - buffer->priv_virt = table; + buffer->sg_table = table;return 0 ;
@@ -96,7 +96,7 @@ err_free:static void ion_carveout_heap_free (struct ion_buffer *buffer) {struct ion_heap *heap = buffer->heap; -struct sg_table *table = buffer->priv_virt; +struct sg_table *table = buffer->sg_table;struct page *page =sg_page (table->sgl);ion_phys_addr_t paddr =PFN_PHYS (page_to_pfn (page));
@@ -111,22 +111,9 @@ static void ion_carveout_heap_free(struct ion_buffer *buffer)kfree (table); } -static struct sg_table *ion_carveout_heap_map_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -return buffer->priv_virt; -} - -static void ion_carveout_heap_unmap_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -} -static struct ion_heap_ops carveout_heap_ops = { .allocate = ion_carveout_heap_allocate, .free = ion_carveout_heap_free, - .map_dma = ion_carveout_heap_map_dma, - .unmap_dma = ion_carveout_heap_unmap_dma, .map_user = ion_heap_map_user, .map_kernel = ion_heap_map_kernel, .unmap_kernel = ion_heap_unmap_kernel,
drivers/staging/android/ion/ion_chunk_heap.c +2 -15
@@ -75,7 +75,7 @@ static int ion_chunk_heap_allocate(struct ion_heap *heap, sg =sg_next (sg); } - buffer->priv_virt = table; + buffer->sg_table = table; chunk_heap->allocated += allocated_size;return 0 ; err:
@@ -95,7 +95,7 @@ static void ion_chunk_heap_free(struct ion_buffer *buffer)struct ion_heap *heap = buffer->heap;struct ion_chunk_heap *chunk_heap = container_of(heap, struct ion_chunk_heap, heap); -struct sg_table *table = buffer->priv_virt; +struct sg_table *table = buffer->sg_table;struct scatterlist *sg;int i;unsigned long allocated_size;
@@ -117,22 +117,9 @@ static void ion_chunk_heap_free(struct ion_buffer *buffer)kfree (table); } -static struct sg_table *ion_chunk_heap_map_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -return buffer->priv_virt; -} - -static void ion_chunk_heap_unmap_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -} -static struct ion_heap_ops chunk_heap_ops = { .allocate = ion_chunk_heap_allocate, .free = ion_chunk_heap_free, - .map_dma = ion_chunk_heap_map_dma, - .unmap_dma = ion_chunk_heap_unmap_dma, .map_user = ion_heap_map_user, .map_kernel = ion_heap_map_kernel, .unmap_kernel = ion_heap_unmap_kernel,
drivers/staging/android/ion/ion_cma_heap.c +1 -15
@@ -78,6 +78,7 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, goto free_table;/* keep this for memory release */ buffer->priv_virt = info; + buffer->sg_table = info->table;dev_dbg (dev,"Allocate buffer %p\n" , buffer);return 0 ;
@@ -105,19 +106,6 @@ static void ion_cma_free(struct ion_buffer *buffer)kfree (info); } -static struct sg_table *ion_cma_heap_map_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -struct ion_cma_buffer_info *info = buffer->priv_virt; - -return info->table; -} - -static void ion_cma_heap_unmap_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -} -static int ion_cma_mmap (struct ion_heap *mapper,struct ion_buffer *buffer,struct vm_area_struct *vma) {
@@ -145,8 +133,6 @@ static void ion_cma_unmap_kernel(struct ion_heap *heap,static struct ion_heap_ops ion_cma_ops = { .allocate = ion_cma_allocate, .free = ion_cma_free, - .map_dma = ion_cma_heap_map_dma, - .unmap_dma = ion_cma_heap_unmap_dma, .map_user = ion_cma_mmap, .map_kernel = ion_cma_map_kernel, .unmap_kernel = ion_cma_unmap_kernel,
drivers/staging/android/ion/ion_priv.h +0 -5
@@ -86,8 +86,6 @@ void ion_buffer_destroy(struct ion_buffer *buffer);* struct ion_heap_ops - ops to operate on a given heap * @allocate: allocate memory * @free: free memory -* @map_dma map the memory for dma to a scatterlist -* @unmap_dma unmap the memory for dma * @map_kernel map memory to the kernel * @unmap_kernel unmap memory to the kernel * @map_user map memory to userspace
@@ -104,9 +102,6 @@ struct ion_heap_ops { struct ion_buffer *buffer, unsigned long len, unsigned long align, unsigned long flags);void (*free)(struct ion_buffer *buffer); -struct sg_table * (*map_dma)(struct ion_heap *heap, -struct ion_buffer *buffer); -void (*unmap_dma)(struct ion_heap *heap,struct ion_buffer *buffer);void * (*map_kernel)(struct ion_heap *heap,struct ion_buffer *buffer);void (*unmap_kernel)(struct ion_heap *heap,struct ion_buffer *buffer); int (*map_user)(struct ion_heap *mapper, struct ion_buffer *buffer,
drivers/staging/android/ion/ion_system_heap.c +3 -29
@@ -164,7 +164,7 @@ static int ion_system_heap_allocate(struct ion_heap *heap,list_del (&page->lru); } - buffer->priv_virt = table; + buffer->sg_table = table;return 0 ; free_table:
@@ -199,17 +199,6 @@ static void ion_system_heap_free(struct ion_buffer *buffer)kfree (table); } -static struct sg_table *ion_system_heap_map_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -return buffer->priv_virt; -} - -static void ion_system_heap_unmap_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -} -static int ion_system_heap_shrink (struct ion_heap *heap,gfp_t gfp_mask,int nr_to_scan) {
@@ -243,8 +232,6 @@ static int ion_system_heap_shrink(struct ion_heap *heap, gfp_t gfp_mask,static struct ion_heap_ops system_heap_ops = { .allocate = ion_system_heap_allocate, .free = ion_system_heap_free, - .map_dma = ion_system_heap_map_dma, - .unmap_dma = ion_system_heap_unmap_dma, .map_kernel = ion_heap_map_kernel, .unmap_kernel = ion_heap_unmap_kernel, .map_user = ion_heap_map_user,
@@ -358,7 +345,7 @@ static int ion_system_contig_heap_allocate(struct ion_heap *heap,sg_set_page (table->sgl, page, len,0 ); - buffer->priv_virt = table; + buffer->sg_table = table;ion_pages_sync_for_device (NULL , page, len,DMA_BIDIRECTIONAL );
@@ -375,7 +362,7 @@ free_pages:static void ion_system_contig_heap_free (struct ion_buffer *buffer) { -struct sg_table *table = buffer->priv_virt; +struct sg_table *table = buffer->sg_table;struct page *page =sg_page (table->sgl);unsigned long pages =PAGE_ALIGN (buffer->size) >>PAGE_SHIFT ;unsigned long i;
@@ -386,22 +373,9 @@ static void ion_system_contig_heap_free(struct ion_buffer *buffer)kfree (table); } -static struct sg_table *ion_system_contig_heap_map_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -return buffer->priv_virt; -} - -static void ion_system_contig_heap_unmap_dma (struct ion_heap *heap, -struct ion_buffer *buffer) -{ -} -static struct ion_heap_ops kmalloc_ops = { .allocate = ion_system_contig_heap_allocate, .free = ion_system_contig_heap_free, - .map_dma = ion_system_contig_heap_map_dma, - .unmap_dma = ion_system_contig_heap_unmap_dma, .map_kernel = ion_heap_map_kernel, .unmap_kernel = ion_heap_unmap_kernel, .map_user = ion_heap_map_user,
Signature · 1 line
2.5.5
PATCH RESEND 4/5 staging: android: ion: Drop ion_carveout_allocate definitions
In reply to Laura Abbottion_carveout_allocate and ion_carveout_free aren't used outside of the carveout heap. Get rid of the definitions.
--- drivers/staging/android/ion/ion_carveout_heap.c | 2 ++ drivers/staging/android/ion/ion_priv.h | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-)
drivers/staging/android/ion/ion_carveout_heap.c +2 -0
@@ -25,6 +25,8 @@#include "ion.h" #include "ion_priv.h" +#define ION_CARVEOUT_ALLOCATE_FAIL -1 +struct ion_carveout_heap {struct ion_heap heap;struct gen_pool *pool;
drivers/staging/android/ion/ion_priv.h +0 -14
@@ -314,20 +314,6 @@ struct ion_heap *ion_cma_heap_create(struct ion_platform_heap *);void ion_cma_heap_destroy (struct ion_heap *);/** -* kernel api to allocate/free from carveout -- used when carveout is -* used to back an architecture specific custom heap -*/ -ion_phys_addr_t ion_carveout_allocate (struct ion_heap *heap,unsigned long size, -unsigned long align); -void ion_carveout_free (struct ion_heap *heap,ion_phys_addr_t addr, -unsigned long size); -/** -* The carveout heap returns physical addresses, since 0 may be a valid -* physical address, this is used to indicate allocation failed -*/ -#define ION_CARVEOUT_ALLOCATE_FAIL -1 - -/** * functions for creating and destroying a heap pool -- allows you * to keep a pool of pre allocated memory to use from your heap. Keeping * a pool of memory that is ready for dma, ie any cached mapping have been
Signature · 1 line
2.5.5
PATCH RESEND 5/5 staging: android: ion: Get rid of ion_reserve
In reply to Laura Abbottion_reserve was supposed to be used to reserve memory in board files. These days, board files are no more and there are other more controlled mechanisms for reserving memory. Get rid of this function.
--- drivers/staging/android/ion/ion.c | 34 ---------------------------------- drivers/staging/android/ion/ion.h | 11 ----------- 2 files changed, 45 deletions(-)
drivers/staging/android/ion/ion.c +0 -34
@@ -1650,37 +1650,3 @@ void ion_device_destroy(struct ion_device *dev) }EXPORT_SYMBOL (ion_device_destroy); -void __init ion_reserve (struct ion_platform_data *data) -{ -int i; - -for (i =0 ; i < data->nr; i++) { -if (data->heaps[i].size ==0 ) -continue ; - -if (data->heaps[i].base ==0 ) { -phys_addr_t paddr; - - paddr =memblock_alloc_base (data->heaps[i].size, - data->heaps[i].align, -MEMBLOCK_ALLOC_ANYWHERE ); -if (!paddr) { -pr_err ("%s: error allocating memblock for heap %d\n" , - __func__, i); -continue ; - } - data->heaps[i].base = paddr; - }else { -int ret =memblock_reserve (data->heaps[i].base, - data->heaps[i].size); -if (ret) -pr_err ("memblock reserve of %zx@%lx failed\n" , - data->heaps[i].size, - data->heaps[i].base); - } -pr_info ("%s: %s reserved base %lx size %zu\n" , __func__, - data->heaps[i].name, - data->heaps[i].base, - data->heaps[i].size); - } -}
drivers/staging/android/ion/ion.h +0 -11
@@ -73,17 +73,6 @@ struct ion_platform_data { };/** -* ion_reserve() - reserve memory for ion heaps if applicable -* @data: platform data specifying starting physical address and -* size -* -* Calls memblock reserve to set aside memory for heaps that are -* located at specific memory addresses or of specific sizes not -* managed by the kernel -*/ -void ion_reserve (struct ion_platform_data *data); - -/** * ion_client_create() - allocate a client and returns it * @dev: the global ion device * @name: used for debugging
Signature · 1 line
2.5.5
This series of patches look good for me, thanks for the clean up
2016-08-08 18:52 GMT+02:00 Laura Abbott <[email protected]>:
Quoted 40 lines
I never saw any feedback or action on these patches so this is a resend. Probably hit the window when everyone was busy/traveling.
---
Hi,
This is some clean up of old Ion interfaces and APIs. These are interfaces that mostly existed before
dma_bufwas well integrated into the kernel along with reservations for board files.If there are objections to deletion I expect it to turn into a discussion about what other APIs need to be extended.
Thanks,
LauraLaura Abbott (5):
staging: android: ion: Get rid ofion_sg_table
staging: android: ion: Dropion_physinterface
staging: android: ion: Get rid of map_dma/unmap_dma
staging: android: ion: Dropion_carveout_allocatedefinitions
staging: android: ion: Get rid ofion_reservedrivers/staging/android/ion/ion.c | 103 ++---------------------- drivers/staging/android/ion/ion.h | 41 ---------- drivers/staging/android/ion/ion_carveout_heap.c | 33 +------- drivers/staging/android/ion/ion_chunk_heap.c | 17 +--- drivers/staging/android/ion/ion_cma_heap.c | 34 +------- drivers/staging/android/ion/ion_priv.h | 30 +------ drivers/staging/android/ion/ion_system_heap.c | 44 +--------- 7 files changed, 19 insertions(+), 283 deletions(-)--
2.5.5_______________________________________________
Linaro-mm-sig mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/linaro-mm-sig
Signature · 7 lines
Benjamin Gaignard Graphic Study Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Sumit Semwal
Reviewed-byHi Laura,
Quoted 8 lines · Benjamin Gaignard
This series of patches look good for me, thanks for the clean up
Reviewed-by Benjamin Gaignard <[email protected]>2016-08-08 18:52 GMT+02:00 Laura Abbott <[email protected]>:
Quoted 3 lines
I never saw any feedback or action on these patches so this is a resend. Probably hit the window when everyone was busy/traveling.
Looks good to me; please feel free to apply my
Quoted 8 lines
Quoted 8 lines
---
Hi,
This is some clean up of old Ion interfaces and APIs. These are interfaces that mostly existed before
dma_bufwas well integrated into the kernel along with reservations for board files.
Quoted 6 lines
Quoted 6 lines
If there are objections to deletion I expect it to turn into a discussion about what other APIs need to be extended.
Thanks,
Laura
Best,
Sumit.
Quoted 34 lines
Quoted 16 lines
Laura Abbott (5):
staging: android: ion: Get rid ofion_sg_table
staging: android: ion: Dropion_physinterface
staging: android: ion: Get rid of map_dma/unmap_dma
staging: android: ion: Dropion_carveout_allocatedefinitions
staging: android: ion: Get rid ofion_reservedrivers/staging/android/ion/ion.c | 103 ++---------------------- drivers/staging/android/ion/ion.h | 41 ---------- drivers/staging/android/ion/ion_carveout_heap.c | 33 +------- drivers/staging/android/ion/ion_chunk_heap.c | 17 +--- drivers/staging/android/ion/ion_cma_heap.c | 34 +------- drivers/staging/android/ion/ion_priv.h | 30 +------ drivers/staging/android/ion/ion_system_heap.c | 44 +--------- 7 files changed, 19 insertions(+), 283 deletions(-)Quoted 7 lines
--
2.5.5_______________________________________________
Linaro-mm-sig mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/linaro-mm-sig--
Benjamin GaignardGraphic Study Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Signature · 5 lines
Thanks and regards, Sumit Semwal Linaro Mobile Group - Kernel Team Lead Linaro.org │ Open source software for ARM SoCs
Greg Kroah-Hartman
maintainerQuoted 2 lines · Laura Abbott
I never saw any feedback or action on these patches so this is a resend. Probably hit the window when everyone was busy/traveling.
Yes, sorry about that, the old ones are still in my queue, but I'll take these now!
greg k-h