bus_dma.9 (82d227dc2a61b530cad8fcc93877e62b075f7046) bus_dma.9 (c7d3a65d43af3c6b31cd9e99d450ce4e47145f2f)
1.\" Copyright (c) 2002, 2003 Hiten M. Pandya.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions, and the following disclaimer,

--- 248 unchanged lines hidden (view full) ---

257.It Dv BUS_DMASYNC_POSTWRITE
258Perform any synchronization required after DMA write operations, but prior
259to CPU access of the memory.
260.It Dv BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE
261Perform any synchronization required after a combination of DMA read
262and write operations.
263.El
264.It Vt bus_dma_lock_t
1.\" Copyright (c) 2002, 2003 Hiten M. Pandya.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions, and the following disclaimer,

--- 248 unchanged lines hidden (view full) ---

257.It Dv BUS_DMASYNC_POSTWRITE
258Perform any synchronization required after DMA write operations, but prior
259to CPU access of the memory.
260.It Dv BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE
261Perform any synchronization required after a combination of DMA read
262and write operations.
263.El
264.It Vt bus_dma_lock_t
265Client specified lock/mutex manipulation method. This will be called from
265Client specified lock/mutex manipulation method.
266This will be called from
266within busdma whenever a client lock needs to be manipulated.
267This method is of the format:
268.Bl -tag -width compact
269.It Ft void
270.Fn "lockfunc" "void *lockfunc_arg" "bus_dma_lock_op_t op"
271.El
272.sp
273Two
274.Vt lockfunc
275implementations are provided for convenience.
276.Fn busdma_lock_mutex
277performs standard mutex operations on the sleep mutex provided via the
278.Fa lockfuncarg .
279passed into
280.Fn bus_dma_tag_create .
281.Fn dflt_lock
267within busdma whenever a client lock needs to be manipulated.
268This method is of the format:
269.Bl -tag -width compact
270.It Ft void
271.Fn "lockfunc" "void *lockfunc_arg" "bus_dma_lock_op_t op"
272.El
273.sp
274Two
275.Vt lockfunc
276implementations are provided for convenience.
277.Fn busdma_lock_mutex
278performs standard mutex operations on the sleep mutex provided via the
279.Fa lockfuncarg .
280passed into
281.Fn bus_dma_tag_create .
282.Fn dflt_lock
282will generate a system panic if it is called. It is substituted into
283the tag when
283will generate a system panic if it is called.
284It is substituted into the tag when
284.Fa lockfunc
285is passed as NULL to
286.Fn bus_dma_tag_create .
287.It Vt bus_dma_lock_op_t
288Operations to be performed by the client-specified
289.Fn lockfunc .
290.Bl -tag -width BUS_DMA_UNLOCK
291.It Dv BUS_DMA_LOCK

--- 93 unchanged lines hidden (view full) ---

385Allocate the resources necessary to guarantee that all map load
386operations associated with this tag will not block.
387If sufficient resources are not available,
388.Er ENOMEM
389is returned.
390.El
391.It Fa lockfunc
392Optional lock manipulation function (may be NULL) to be called when busdma
285.Fa lockfunc
286is passed as NULL to
287.Fn bus_dma_tag_create .
288.It Vt bus_dma_lock_op_t
289Operations to be performed by the client-specified
290.Fn lockfunc .
291.Bl -tag -width BUS_DMA_UNLOCK
292.It Dv BUS_DMA_LOCK

--- 93 unchanged lines hidden (view full) ---

386Allocate the resources necessary to guarantee that all map load
387operations associated with this tag will not block.
388If sufficient resources are not available,
389.Er ENOMEM
390is returned.
391.El
392.It Fa lockfunc
393Optional lock manipulation function (may be NULL) to be called when busdma
393needs to manipulate a lock on behalf of the client. If NULL is specified,
394needs to manipulate a lock on behalf of the client.
395If NULL is specified,
394.Fn dflt_lock
395is used.
396.It Fa lockfuncarg
397Optional argument to be passed to the function specified by
398.Fa lockfunc .
399.It Fa dmat
400Pointer to a bus_dma_tag_t where the resulting DMA tag will
401be stored.

--- 381 unchanged lines hidden ---
396.Fn dflt_lock
397is used.
398.It Fa lockfuncarg
399Optional argument to be passed to the function specified by
400.Fa lockfunc .
401.It Fa dmat
402Pointer to a bus_dma_tag_t where the resulting DMA tag will
403be stored.

--- 381 unchanged lines hidden ---