- 追加された行はこの色です。
- 削除された行はこの色です。
*参照元 [#qa94e060]
#backlinks
*説明 [#za6344aa]
-パス: [[linux-4.4.1/drivers/staging/android/ion/ion.c]]
-パス: [[linux-4.4.1/drivers/staging/android/ion/ion_priv.h]]
-FIXME: これは何?
--説明
**参考 [#ve604c82]
*実装 [#jf8505ab]
/**
* struct ion_device - the metadata of the ion device node
* @dev: the actual misc device
* @buffers: an rb tree of all the existing buffers
* @buffer_lock: lock protecting the tree of buffers
* @lock: rwsem protecting the tree of heaps and clients
* @heaps: list of all the heaps in the system
* @user_clients: list of all the clients created from userspace
* struct ion_heap - represents a heap in the system
* @node: rb node to put the heap on the device's tree of heaps
* @dev: back pointer to the ion_device
* @type: type of heap
* @ops: ops struct as above
* @flags: flags
* @id: id of heap, also indicates priority of this heap when
* allocating. These are specified by platform data and
* MUST be unique
* @name: used for debugging
* @shrinker: a shrinker for the heap
* @free_list: free list head if deferred free is used
* @free_list_size size of the deferred free list in bytes
* @lock: protects the free list
* @waitqueue: queue to wait on from deferred free thread
* @task: task struct of deferred free thread
* @debug_show: called when heap debug file is read to add any
* heap specific debug info to output
*
* Represents a pool of memory from which buffers can be made. In some
* systems the only heap is regular system memory allocated via vmalloc.
* On others, some blocks might require large physically contiguous buffers
* that are allocated from a specially reserved heap.
*/
struct ion_device {
struct miscdevice dev;
struct ion_heap {
struct plist_node node;
-
--[[linux-4.4.1/miscdevice]]
--[[linux-4.4.1/plist_node]]
struct rb_root buffers;
struct ion_device *dev;
-
--[[linux-4.4.1/rb_root]]
--[[linux-4.4.1/ion_device]]
struct mutex buffer_lock;
struct rw_semaphore lock;
enum ion_heap_type type;
-
--[[linux-4.4.1/mutex]]
--[[linux-4.4.1/rw_semaphore]]
--[[linux-4.4.1/ion_heap_type]]
struct plist_head heaps;
struct ion_heap_ops *ops;
-
--[[linux-4.4.1/plist_head]]
--[[linux-4.4.1/ion_heap_ops]]
long (*custom_ioctl)(struct ion_client *client, unsigned int cmd,
unsigned long arg);
unsigned long flags;
unsigned int id;
const char *name;
struct shrinker shrinker;
-
--[[linux-4.4.1/ion_client]]
--[[linux-4.4.1/shrinker]]
struct rb_root clients;
struct dentry *debug_root;
struct dentry *heaps_debug_root;
struct dentry *clients_debug_root;
struct list_head free_list;
size_t free_list_size;
-
--[[linux-4.4.1/dentry]]
--[[linux-4.4.1/list_head]]
spinlock_t free_lock;
wait_queue_head_t waitqueue;
struct task_struct *task;
-
--[[linux-4.4.1/spinlock_t]]
--[[linux-4.4.1/wait_queue_head_t]]
--[[linux-4.4.1/task_struct]]
int (*debug_show)(struct ion_heap *heap, struct seq_file *, void *);
-
--[[linux-4.4.1/seq_file]]
};
*コメント [#q1544472]