Loading drivers/staging/android/ion/ion.c +0 −54 Original line number Diff line number Diff line Loading @@ -1787,33 +1787,6 @@ void ion_device_add_heap(struct ion_device *dev, struct ion_heap *heap) up_write(&dev->lock); } int ion_secure_heap(struct ion_device *dev, int heap_id, int version, void *data) { int ret_val = 0; struct ion_heap *heap; /* * traverse the list of heaps available in this system * and find the heap that is specified. */ down_write(&dev->lock); plist_for_each_entry(heap, &dev->heaps, node) { if (!ion_heap_allow_heap_secure(heap->type)) continue; if (ION_HEAP(heap->id) != heap_id) continue; if (heap->ops->secure_heap) ret_val = heap->ops->secure_heap(heap, version, data); else ret_val = -EINVAL; break; } up_write(&dev->lock); return ret_val; } EXPORT_SYMBOL(ion_secure_heap); int ion_walk_heaps(struct ion_client *client, int heap_id, void *data, int (*f)(struct ion_heap *heap, void *data)) { Loading @@ -1836,33 +1809,6 @@ int ion_walk_heaps(struct ion_client *client, int heap_id, void *data, } EXPORT_SYMBOL(ion_walk_heaps); int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, void *data) { int ret_val = 0; struct ion_heap *heap; /* * traverse the list of heaps available in this system * and find the heap that is specified. */ down_write(&dev->lock); plist_for_each_entry(heap, &dev->heaps, node) { if (!ion_heap_allow_heap_secure(heap->type)) continue; if (ION_HEAP(heap->id) != heap_id) continue; if (heap->ops->secure_heap) ret_val = heap->ops->unsecure_heap(heap, version, data); else ret_val = -EINVAL; break; } up_write(&dev->lock); return ret_val; } EXPORT_SYMBOL(ion_unsecure_heap); struct ion_device *ion_device_create(long (*custom_ioctl) (struct ion_client *client, unsigned int cmd, Loading drivers/staging/android/ion/ion_priv.h +0 −2 Original line number Diff line number Diff line Loading @@ -125,8 +125,6 @@ struct ion_heap_ops { void (*unmap_user) (struct ion_heap *mapper, struct ion_buffer *buffer); int (*print_debug)(struct ion_heap *heap, struct seq_file *s, const struct list_head *mem_map); int (*secure_heap)(struct ion_heap *heap, int version, void *data); int (*unsecure_heap)(struct ion_heap *heap, int version, void *data); }; /** Loading drivers/staging/android/ion/msm/msm_ion.c +0 −24 Original line number Diff line number Diff line Loading @@ -123,30 +123,6 @@ struct ion_client *msm_ion_client_create(unsigned int heap_mask, } EXPORT_SYMBOL(msm_ion_client_create); int msm_ion_secure_heap(int heap_id) { return ion_secure_heap(idev, heap_id, ION_CP_V1, NULL); } EXPORT_SYMBOL(msm_ion_secure_heap); int msm_ion_unsecure_heap(int heap_id) { return ion_unsecure_heap(idev, heap_id, ION_CP_V1, NULL); } EXPORT_SYMBOL(msm_ion_unsecure_heap); int msm_ion_secure_heap_2_0(int heap_id, enum cp_mem_usage usage) { return ion_secure_heap(idev, heap_id, ION_CP_V2, (void *)usage); } EXPORT_SYMBOL(msm_ion_secure_heap_2_0); int msm_ion_unsecure_heap_2_0(int heap_id, enum cp_mem_usage usage) { return ion_unsecure_heap(idev, heap_id, ION_CP_V2, (void *)usage); } EXPORT_SYMBOL(msm_ion_unsecure_heap_2_0); int msm_ion_do_cache_op(struct ion_client *client, struct ion_handle *handle, void *vaddr, unsigned long len, unsigned int cmd) { Loading drivers/staging/android/ion/msm/msm_ion.h +0 −108 Original line number Diff line number Diff line Loading @@ -175,35 +175,6 @@ int ion_handle_get_size(struct ion_client *client, struct ion_handle *handle, void ion_unmap_iommu(struct ion_client *client, struct ion_handle *handle, int domain_num, int partition_num); /** * ion_secure_heap - secure a heap * * @client - a client that has allocated from the heap heap_id * @heap_id - heap id to secure. * @version - version of content protection * @data - extra data needed for protection * * Secure a heap * Returns 0 on success */ int ion_secure_heap(struct ion_device *dev, int heap_id, int version, void *data); /** * ion_unsecure_heap - un-secure a heap * * @client - a client that has allocated from the heap heap_id * @heap_id - heap id to un-secure. * @version - version of content protection * @data - extra data needed for protection * * Un-secure a heap * Returns 0 on success */ int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, void *data); /** * msm_ion_do_cache_op - do cache operations. * Loading @@ -221,50 +192,6 @@ int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, int msm_ion_do_cache_op(struct ion_client *client, struct ion_handle *handle, void *vaddr, unsigned long len, unsigned int cmd); /** * msm_ion_secure_heap - secure a heap. Wrapper around ion_secure_heap. * * @heap_id - heap id to secure. * * Secure a heap * Returns 0 on success */ int msm_ion_secure_heap(int heap_id); /** * msm_ion_unsecure_heap - unsecure a heap. Wrapper around ion_unsecure_heap. * * @heap_id - heap id to secure. * * Un-secure a heap * Returns 0 on success */ int msm_ion_unsecure_heap(int heap_id); /** * msm_ion_secure_heap_2_0 - secure a heap using 2.0 APIs * Wrapper around ion_secure_heap. * * @heap_id - heap id to secure. * @usage - usage hint to TZ * * Secure a heap * Returns 0 on success */ int msm_ion_secure_heap_2_0(int heap_id, enum cp_mem_usage usage); /** * msm_ion_unsecure_heap - unsecure a heap secured with 3.0 APIs. * Wrapper around ion_unsecure_heap. * * @heap_id - heap id to secure. * @usage - usage hint to TZ * * Un-secure a heap * Returns 0 on success */ int msm_ion_unsecure_heap_2_0(int heap_id, enum cp_mem_usage usage); /** * msm_ion_secure_buffer - secure an individual buffer * Loading Loading @@ -315,19 +242,6 @@ static inline void ion_unmap_iommu(struct ion_client *client, return; } static inline int ion_secure_heap(struct ion_device *dev, int heap_id, int version, void *data) { return -ENODEV; } static inline int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, void *data) { return -ENODEV; } static inline void ion_mark_dangling_buffers_locked(struct ion_device *dev) { } Loading @@ -339,28 +253,6 @@ static inline int msm_ion_do_cache_op(struct ion_client *client, return -ENODEV; } static inline int msm_ion_secure_heap(int heap_id) { return -ENODEV; } static inline int msm_ion_unsecure_heap(int heap_id) { return -ENODEV; } static inline int msm_ion_secure_heap_2_0(int heap_id, enum cp_mem_usage usage) { return -ENODEV; } static inline int msm_ion_unsecure_heap_2_0(int heap_id, enum cp_mem_usage usage) { return -ENODEV; } static inline int msm_ion_secure_buffer(struct ion_client *client, struct ion_handle *handle, enum cp_mem_usage usage, Loading Loading
drivers/staging/android/ion/ion.c +0 −54 Original line number Diff line number Diff line Loading @@ -1787,33 +1787,6 @@ void ion_device_add_heap(struct ion_device *dev, struct ion_heap *heap) up_write(&dev->lock); } int ion_secure_heap(struct ion_device *dev, int heap_id, int version, void *data) { int ret_val = 0; struct ion_heap *heap; /* * traverse the list of heaps available in this system * and find the heap that is specified. */ down_write(&dev->lock); plist_for_each_entry(heap, &dev->heaps, node) { if (!ion_heap_allow_heap_secure(heap->type)) continue; if (ION_HEAP(heap->id) != heap_id) continue; if (heap->ops->secure_heap) ret_val = heap->ops->secure_heap(heap, version, data); else ret_val = -EINVAL; break; } up_write(&dev->lock); return ret_val; } EXPORT_SYMBOL(ion_secure_heap); int ion_walk_heaps(struct ion_client *client, int heap_id, void *data, int (*f)(struct ion_heap *heap, void *data)) { Loading @@ -1836,33 +1809,6 @@ int ion_walk_heaps(struct ion_client *client, int heap_id, void *data, } EXPORT_SYMBOL(ion_walk_heaps); int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, void *data) { int ret_val = 0; struct ion_heap *heap; /* * traverse the list of heaps available in this system * and find the heap that is specified. */ down_write(&dev->lock); plist_for_each_entry(heap, &dev->heaps, node) { if (!ion_heap_allow_heap_secure(heap->type)) continue; if (ION_HEAP(heap->id) != heap_id) continue; if (heap->ops->secure_heap) ret_val = heap->ops->unsecure_heap(heap, version, data); else ret_val = -EINVAL; break; } up_write(&dev->lock); return ret_val; } EXPORT_SYMBOL(ion_unsecure_heap); struct ion_device *ion_device_create(long (*custom_ioctl) (struct ion_client *client, unsigned int cmd, Loading
drivers/staging/android/ion/ion_priv.h +0 −2 Original line number Diff line number Diff line Loading @@ -125,8 +125,6 @@ struct ion_heap_ops { void (*unmap_user) (struct ion_heap *mapper, struct ion_buffer *buffer); int (*print_debug)(struct ion_heap *heap, struct seq_file *s, const struct list_head *mem_map); int (*secure_heap)(struct ion_heap *heap, int version, void *data); int (*unsecure_heap)(struct ion_heap *heap, int version, void *data); }; /** Loading
drivers/staging/android/ion/msm/msm_ion.c +0 −24 Original line number Diff line number Diff line Loading @@ -123,30 +123,6 @@ struct ion_client *msm_ion_client_create(unsigned int heap_mask, } EXPORT_SYMBOL(msm_ion_client_create); int msm_ion_secure_heap(int heap_id) { return ion_secure_heap(idev, heap_id, ION_CP_V1, NULL); } EXPORT_SYMBOL(msm_ion_secure_heap); int msm_ion_unsecure_heap(int heap_id) { return ion_unsecure_heap(idev, heap_id, ION_CP_V1, NULL); } EXPORT_SYMBOL(msm_ion_unsecure_heap); int msm_ion_secure_heap_2_0(int heap_id, enum cp_mem_usage usage) { return ion_secure_heap(idev, heap_id, ION_CP_V2, (void *)usage); } EXPORT_SYMBOL(msm_ion_secure_heap_2_0); int msm_ion_unsecure_heap_2_0(int heap_id, enum cp_mem_usage usage) { return ion_unsecure_heap(idev, heap_id, ION_CP_V2, (void *)usage); } EXPORT_SYMBOL(msm_ion_unsecure_heap_2_0); int msm_ion_do_cache_op(struct ion_client *client, struct ion_handle *handle, void *vaddr, unsigned long len, unsigned int cmd) { Loading
drivers/staging/android/ion/msm/msm_ion.h +0 −108 Original line number Diff line number Diff line Loading @@ -175,35 +175,6 @@ int ion_handle_get_size(struct ion_client *client, struct ion_handle *handle, void ion_unmap_iommu(struct ion_client *client, struct ion_handle *handle, int domain_num, int partition_num); /** * ion_secure_heap - secure a heap * * @client - a client that has allocated from the heap heap_id * @heap_id - heap id to secure. * @version - version of content protection * @data - extra data needed for protection * * Secure a heap * Returns 0 on success */ int ion_secure_heap(struct ion_device *dev, int heap_id, int version, void *data); /** * ion_unsecure_heap - un-secure a heap * * @client - a client that has allocated from the heap heap_id * @heap_id - heap id to un-secure. * @version - version of content protection * @data - extra data needed for protection * * Un-secure a heap * Returns 0 on success */ int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, void *data); /** * msm_ion_do_cache_op - do cache operations. * Loading @@ -221,50 +192,6 @@ int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, int msm_ion_do_cache_op(struct ion_client *client, struct ion_handle *handle, void *vaddr, unsigned long len, unsigned int cmd); /** * msm_ion_secure_heap - secure a heap. Wrapper around ion_secure_heap. * * @heap_id - heap id to secure. * * Secure a heap * Returns 0 on success */ int msm_ion_secure_heap(int heap_id); /** * msm_ion_unsecure_heap - unsecure a heap. Wrapper around ion_unsecure_heap. * * @heap_id - heap id to secure. * * Un-secure a heap * Returns 0 on success */ int msm_ion_unsecure_heap(int heap_id); /** * msm_ion_secure_heap_2_0 - secure a heap using 2.0 APIs * Wrapper around ion_secure_heap. * * @heap_id - heap id to secure. * @usage - usage hint to TZ * * Secure a heap * Returns 0 on success */ int msm_ion_secure_heap_2_0(int heap_id, enum cp_mem_usage usage); /** * msm_ion_unsecure_heap - unsecure a heap secured with 3.0 APIs. * Wrapper around ion_unsecure_heap. * * @heap_id - heap id to secure. * @usage - usage hint to TZ * * Un-secure a heap * Returns 0 on success */ int msm_ion_unsecure_heap_2_0(int heap_id, enum cp_mem_usage usage); /** * msm_ion_secure_buffer - secure an individual buffer * Loading Loading @@ -315,19 +242,6 @@ static inline void ion_unmap_iommu(struct ion_client *client, return; } static inline int ion_secure_heap(struct ion_device *dev, int heap_id, int version, void *data) { return -ENODEV; } static inline int ion_unsecure_heap(struct ion_device *dev, int heap_id, int version, void *data) { return -ENODEV; } static inline void ion_mark_dangling_buffers_locked(struct ion_device *dev) { } Loading @@ -339,28 +253,6 @@ static inline int msm_ion_do_cache_op(struct ion_client *client, return -ENODEV; } static inline int msm_ion_secure_heap(int heap_id) { return -ENODEV; } static inline int msm_ion_unsecure_heap(int heap_id) { return -ENODEV; } static inline int msm_ion_secure_heap_2_0(int heap_id, enum cp_mem_usage usage) { return -ENODEV; } static inline int msm_ion_unsecure_heap_2_0(int heap_id, enum cp_mem_usage usage) { return -ENODEV; } static inline int msm_ion_secure_buffer(struct ion_client *client, struct ion_handle *handle, enum cp_mem_usage usage, Loading