*参照元 [#d4d921dd]
#backlinks

*説明 [#kbd8e0ff]
-パス: [[linux-4.4.1/drivers/staging/android/ion/ion_priv.h]]

-FIXME: これは何?
--説明


**参考 [#a437773a]

実装の一覧。
-実装の一覧。
--[[linux-4.4.1/carveout_heap_ops(global)]] : drivers/staging/android/ion/ion_carveout_heap.c
--[[linux-4.4.1/chunk_heap_ops(global)]] : drivers/staging/android/ion/ion_chunk_heap.c
--[[linux-4.4.1/ion_cma_ops(global)]] : drivers/staging/android/ion/ion_cma_heap.c
--[[linux-4.4.1/system_heap_ops(global)]] : drivers/staging/android/ion/ion_system_heap.c
--[[linux-4.4.1/kmalloc_ops(global)]] : drivers/staging/android/ion/ion_system_heap.c

 static struct ion_heap_ops carveout_heap_ops = {
 static struct ion_heap_ops chunk_heap_ops = {
 static struct ion_heap_ops ion_cma_ops = {
 static struct ion_heap_ops system_heap_ops = {
 static struct ion_heap_ops kmalloc_ops = {

-[[linux-4.4.1/carveout_heap_ops(global)]] : drivers/staging/android/ion/ion_carveout_heap.c
-[[linux-4.4.1/chunk_heap_ops(global)]] : drivers/staging/android/ion/ion_chunk_heap.c
-[[linux-4.4.1/ion_cma_ops(global)]] : drivers/staging/android/ion/ion_cma_heap.c
-[[linux-4.4.1/system_heap_ops(global)]] : drivers/staging/android/ion/ion_system_heap.c
-[[linux-4.4.1/kmalloc_ops(global)]] : drivers/staging/android/ion/ion_system_heap.c


*実装 [#u4edeeaa]
 /**
  * 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
  * @unmap_kernel        unmap memory to the kernel
  * @map_user            map memory to userspace
  *
  * allocate, phys, and map_user return 0 on success, -errno on error.
  * map_dma and map_kernel return pointer on success, ERR_PTR on
  * error. @free will be called with ION_PRIV_FLAG_SHRINKER_FREE set in
  * the buffer's private_flags when called from a shrinker. In that
  * case, the pages being free'd must be truly free'd back to the
  * system, not put in a page pool or otherwise cached.
  */
 struct ion_heap_ops {
         int (*allocate)(struct ion_heap *heap,
                         struct ion_buffer *buffer, unsigned long len,
                         unsigned long align, unsigned long flags);
         void (*free)(struct ion_buffer *buffer);
-
--[[linux-4.4.1/ion_heap]]
--[[linux-4.4.1/ion_buffer]]

         int (*phys)(struct ion_heap *heap, struct ion_buffer *buffer,
                     ion_phys_addr_t *addr, size_t *len);
-
--[[linux-4.4.1/ion_phys_addr_t]]

         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,
                         struct vm_area_struct *vma);
-
--[[linux-4.4.1/vm_area_struct]]

         int (*shrink)(struct ion_heap *heap, gfp_t gfp_mask, int nr_to_scan);
-
--[[linux-4.4.1/gfp_t]]

 };


*コメント [#f7629d26]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS