aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShangbing Hu <shangbing.hu@mediatek.com>2016-07-13 05:16:42 +0800
committerMister Oyster <oysterized@gmail.com>2017-09-25 18:37:00 +0200
commit644bd11ec1705cd21f2ae340db33d5300b82790b (patch)
tree47aabc88fb3f2d70a48c582295d41192d4910481 /drivers
parent4c0d3f21f1a06ca7e88d96cc3d9b8631591e3623 (diff)
ION : delete ION heap op page_pool_total
[Detail] we dont want to add things universally to ion_heap_ops. [Solution] page_pool_total is not used now, it can be deleted. [Feature] Others BUG = 25122710 MTK-Commit-Id: acfde06e3d1482b038803871426788753afd1007 Change-Id: Ieb4609a7cfa73cd00e2b3aed367868fe9d89c377 Signed-off-by: Shangbing Hu <shangbing.hu@mediatek.com> CR-Id: ALPS02367897
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/android/ion/ion.c45
-rw-r--r--drivers/staging/android/ion/mtk/ion_mm_heap.c18
2 files changed, 0 insertions, 63 deletions
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index d30408651..26007d40f 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -1855,38 +1855,6 @@ static const struct file_operations debug_heap_fops = {
.release = single_release,
};
-static int ion_debug_heap_pool_show(struct seq_file *s, void *unused)
-{
- struct ion_heap *heap = s->private;
- struct ion_device *dev = heap->dev;
- struct rb_node *n;
- size_t total_size;
-
- if (!heap->ops->page_pool_total) {
- pr_err("%s: ion page pool total is not implemented by heap(%s).\n",
- __func__, heap->name);
- return -ENODEV;
- }
-
- total_size = heap->ops->page_pool_total(heap);
-
- seq_printf(s, "%16.s %16zu\n", "total_in_pool ", total_size);
-
- return 0;
-}
-
-static int ion_debug_heap_pool_open(struct inode *inode, struct file *file)
-{
- return single_open(file, ion_debug_heap_pool_show, inode->i_private);
-}
-
-static const struct file_operations debug_heap_pool_fops = {
- .open = ion_debug_heap_pool_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
#ifdef DEBUG_HEAP_SHRINKER
static int debug_shrink_set(void *data, u64 val)
{
@@ -1975,19 +1943,6 @@ void ion_device_add_heap(struct ion_device *dev, struct ion_heap *heap)
}
}
#endif
-
- char tmp_name[64];
-
- snprintf(tmp_name, 64, "%s_total_in_pool", heap->name);
- debug_file = debugfs_create_file(
- tmp_name, 0644, dev->heaps_debug_root, heap,
- &debug_heap_pool_fops);
- if (!debug_file) {
- char buf[256], *path;
- path = dentry_path(dev->heaps_debug_root, buf, 256);
- pr_err("Failed to create heap page pool debugfs at %s/%s\n", path, tmp_name);
- }
-
up_write(&dev->lock);
}
diff --git a/drivers/staging/android/ion/mtk/ion_mm_heap.c b/drivers/staging/android/ion/mtk/ion_mm_heap.c
index 997c9a77d..06de2ca57 100644
--- a/drivers/staging/android/ion/mtk/ion_mm_heap.c
+++ b/drivers/staging/android/ion/mtk/ion_mm_heap.c
@@ -403,23 +403,6 @@ void ion_mm_heap_add_freelist(struct ion_buffer *buffer)
ion_mm_heap_free_bufferInfo(buffer);
}
-int ion_mm_heap_pool_total(struct ion_heap *heap) {
- struct ion_system_heap *sys_heap;
- int total = 0;
- int i;
-
- sys_heap = container_of(heap, struct ion_system_heap, heap);
-
- for (i = 0; i < num_orders; i++) {
- struct ion_page_pool *pool = sys_heap->pools[i];
- total += (pool->high_count + pool->low_count) * (1 << pool->order);
- pool = sys_heap->cached_pools[i];
- total += (pool->high_count + pool->low_count) * (1 << pool->order);
- }
-
- return total;
-}
-
static struct ion_heap_ops system_heap_ops = {
.allocate = ion_mm_heap_allocate,
.free = ion_mm_heap_free,
@@ -431,7 +414,6 @@ static struct ion_heap_ops system_heap_ops = {
.phys = ion_mm_heap_phys,
.shrink = ion_mm_heap_shrink,
.add_freelist = ion_mm_heap_add_freelist,
- .page_pool_total = ion_mm_heap_pool_total,
};
static int ion_mm_heap_debug_show(struct ion_heap *heap, struct seq_file *s,