- 追加された行はこの色です。
- 削除された行はこの色です。
*参照元 [#d4d921dd]
#backlinks
*説明 [#kbd8e0ff]
-パス: [[linux-4.4.1/drivers/staging/android/ion/ion_priv.h]]
-FIXME: これは何?
--説明
**参考 [#a437773a]
*実装 [#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]