|
|
@@ -14,6 +14,7 @@
|
|
|
#include <uapi/linux/sched/types.h>
|
|
|
#include <linux/scatterlist.h>
|
|
|
#include <linux/vmalloc.h>
|
|
|
+
|
|
|
#include "ion.h"
|
|
|
|
|
|
void *ion_heap_map_kernel(struct ion_heap *heap,
|
|
|
@@ -92,6 +93,7 @@ int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer,
|
|
|
if (addr >= vma->vm_end)
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
@@ -254,6 +256,7 @@ int ion_heap_init_deferred_free(struct ion_heap *heap)
|
|
|
return PTR_ERR_OR_ZERO(heap->task);
|
|
|
}
|
|
|
sched_setscheduler(heap->task, SCHED_IDLE, ¶m);
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
@@ -265,8 +268,10 @@ static unsigned long ion_heap_shrink_count(struct shrinker *shrinker,
|
|
|
int total = 0;
|
|
|
|
|
|
total = ion_heap_freelist_size(heap) / PAGE_SIZE;
|
|
|
+
|
|
|
if (heap->ops->shrink)
|
|
|
total += heap->ops->shrink(heap, sc->gfp_mask, 0);
|
|
|
+
|
|
|
return total;
|
|
|
}
|
|
|
|
|
|
@@ -295,6 +300,7 @@ static unsigned long ion_heap_shrink_scan(struct shrinker *shrinker,
|
|
|
|
|
|
if (heap->ops->shrink)
|
|
|
freed += heap->ops->shrink(heap, sc->gfp_mask, to_scan);
|
|
|
+
|
|
|
return freed;
|
|
|
}
|
|
|
|