|
XenevaOS
|
#include <linux/err.h>#include <linux/wait.h>#include <linux/list.h>#include <linux/bitops.h>#include <linux/kref.h>#include <linux/sched.h>#include <linux/printk.h>#include <linux/rcupdate.h>#include <linux/timekeeping.h>

Go to the source code of this file.
Classes | |
| struct | dma_fence |
| struct | dma_fence_cb |
| struct | dma_fence_ops |
Macros | |
| #define | dma_fence_lock_irqsave(fence, flags) spin_lock_irqsave(dma_fence_spinlock(fence), flags) |
| #define | dma_fence_unlock_irqrestore(fence, flags) spin_unlock_irqrestore(dma_fence_spinlock(fence), flags) |
| #define | dma_fence_assert_held(fence) lockdep_assert_held(dma_fence_spinlock(fence)); |
Typedefs | |
| typedef void(* | dma_fence_func_t) (struct dma_fence *fence, struct dma_fence_cb *cb) |
Variables | |
| const struct dma_fence_ops | dma_fence_array_ops |
| const struct dma_fence_ops | dma_fence_chain_ops |
| #define dma_fence_assert_held | ( | fence | ) | lockdep_assert_held(dma_fence_spinlock(fence)); |
dma_fence_assert_held - lockdep assertion that fence is locked @fence: the fence which should be locked
| #define dma_fence_lock_irqsave | ( | fence, | |
| flags | |||
| ) | spin_lock_irqsave(dma_fence_spinlock(fence), flags) |
dma_fence_lock_irqsave - irqsave lock the fence @fence: the fence to lock @flags: where to store the CPU flags.
Lock the fence, preventing it from changing to the signaled state.
| #define dma_fence_unlock_irqrestore | ( | fence, | |
| flags | |||
| ) | spin_unlock_irqrestore(dma_fence_spinlock(fence), flags) |
dma_fence_unlock_irqrestore - unlock the fence and irqrestore @fence: the fence to unlock @flags: the CPU flags to restore
Unlock the fence, allowing it to change its state to signaled again.
| typedef void(* dma_fence_func_t) (struct dma_fence *fence, struct dma_fence_cb *cb) |
| enum dma_fence_flag_bits |
| int dma_fence_add_callback | ( | struct dma_fence * | fence, |
| struct dma_fence_cb * | cb, | ||
| dma_fence_func_t | func | ||
| ) |
| u64 dma_fence_context_alloc | ( | unsigned | num | ) |
DOC: Safe external access to driver provided object members
All data not stored directly in the dma-fence object, such as the &dma_fence.lock and memory potentially accessed by functions in the &dma_fence.ops table, MUST NOT be accessed after the fence has been signalled because after that point drivers are allowed to free it.
All code accessing that data via the dma-fence API (or directly, which is discouraged), MUST make sure to contain the complete access within a &rcu_read_lock and &rcu_read_unlock pair.
Some dma-fence API handles this automatically, while other, as for example &dma_fence_driver_name and &dma_fence_timeline_name, leave that responsibility to the caller.
To enable this scheme to work drivers MUST ensure a RCU grace period elapses between signalling the fence and freeing the said data.
| void dma_fence_enable_sw_signaling | ( | struct dma_fence * | fence | ) |
| void dma_fence_free | ( | struct dma_fence * | fence | ) |
| int dma_fence_get_status | ( | struct dma_fence * | fence | ) |
| struct dma_fence * dma_fence_get_stub | ( | void | ) |
| void dma_fence_init | ( | struct dma_fence * | fence, |
| const struct dma_fence_ops * | ops, | ||
| spinlock_t * | lock, | ||
| u64 | context, | ||
| u64 | seqno | ||
| ) |
| void dma_fence_init64 | ( | struct dma_fence * | fence, |
| const struct dma_fence_ops * | ops, | ||
| spinlock_t * | lock, | ||
| u64 | context, | ||
| u64 | seqno | ||
| ) |
| void dma_fence_release | ( | struct kref * | kref | ) |
| bool dma_fence_remove_callback | ( | struct dma_fence * | fence, |
| struct dma_fence_cb * | cb | ||
| ) |
| void dma_fence_signal | ( | struct dma_fence * | fence | ) |
| void dma_fence_signal_locked | ( | struct dma_fence * | fence | ) |
| signed long dma_fence_wait_any_timeout | ( | struct dma_fence ** | fences, |
| uint32_t | count, | ||
| bool | intr, | ||
| signed long | timeout, | ||
| uint32_t * | idx | ||
| ) |
|
extern |
|
extern |