Home
last modified time | relevance | path

Searched refs:xchan (Results 1 – 18 of 18) sorted by relevance

/freebsd-13-stable/sys/dev/xdma/
HDxdma_sg.c68 xchan_bufs_free_reserved(xdma_channel_t *xchan) in xchan_bufs_free_reserved() argument
74 for (i = 0; i < xchan->xr_num; i++) { in xchan_bufs_free_reserved()
75 xr = &xchan->xr_mem[i]; in xchan_bufs_free_reserved()
83 vmem_free(xchan->vmem, xr->buf.paddr, size); in xchan_bufs_free_reserved()
91 xchan_bufs_alloc_reserved(xdma_channel_t *xchan) in xchan_bufs_alloc_reserved() argument
99 xdma = xchan->xdma; in xchan_bufs_alloc_reserved()
101 if (xchan->vmem == NULL) in xchan_bufs_alloc_reserved()
104 for (i = 0; i < xchan->xr_num; i++) { in xchan_bufs_alloc_reserved()
105 xr = &xchan->xr_mem[i]; in xchan_bufs_alloc_reserved()
106 size = round_page(xchan->maxsegsize); in xchan_bufs_alloc_reserved()
[all …]
HDxdma.h204 #define XCHAN_LOCK(xchan) mtx_lock(&(xchan)->mtx_lock) argument
205 #define XCHAN_UNLOCK(xchan) mtx_unlock(&(xchan)->mtx_lock) argument
206 #define XCHAN_ASSERT_LOCKED(xchan) \ argument
207 mtx_assert(&(xchan)->mtx_lock, MA_OWNED)
209 #define QUEUE_IN_LOCK(xchan) mtx_lock(&(xchan)->mtx_qin_lock) argument
210 #define QUEUE_IN_UNLOCK(xchan) mtx_unlock(&(xchan)->mtx_qin_lock) argument
211 #define QUEUE_IN_ASSERT_LOCKED(xchan) \ argument
212 mtx_assert(&(xchan)->mtx_qin_lock, MA_OWNED)
214 #define QUEUE_OUT_LOCK(xchan) mtx_lock(&(xchan)->mtx_qout_lock) argument
215 #define QUEUE_OUT_UNLOCK(xchan) mtx_unlock(&(xchan)->mtx_qout_lock) argument
[all …]
HDxdma.c74 xdma_get_iommu_fdt(xdma_controller_t *xdma, xdma_channel_t *xchan) in xdma_get_iommu_fdt() argument
92 xio = &xchan->xio; in xdma_get_iommu_fdt()
111 xdma_channel_t *xchan; in xdma_channel_alloc() local
114 xchan = malloc(sizeof(xdma_channel_t), M_XDMA, M_WAITOK | M_ZERO); in xdma_channel_alloc()
115 xchan->xdma = xdma; in xdma_channel_alloc()
119 if (xdma_get_iommu_fdt(xdma, xchan)) in xdma_channel_alloc()
123 xchan->caps = caps; in xdma_channel_alloc()
128 ret = XDMA_CHANNEL_ALLOC(xdma->dma_dev, xchan); in xdma_channel_alloc()
133 free(xchan, M_XDMA); in xdma_channel_alloc()
138 TAILQ_INIT(&xchan->ie_handlers); in xdma_channel_alloc()
[all …]
HDxdma_bank.c46 xchan_bank_init(xdma_channel_t *xchan) in xchan_bank_init() argument
52 xdma = xchan->xdma; in xchan_bank_init()
55 xchan->xr_mem = malloc(sizeof(struct xdma_request) * xchan->xr_num, in xchan_bank_init()
58 for (i = 0; i < xchan->xr_num; i++) { in xchan_bank_init()
59 xr = &xchan->xr_mem[i]; in xchan_bank_init()
60 TAILQ_INSERT_TAIL(&xchan->bank, xr, xr_next); in xchan_bank_init()
65 xchan_bank_free(xdma_channel_t *xchan) in xchan_bank_free() argument
68 free(xchan->xr_mem, M_XDMA); in xchan_bank_free()
74 xchan_bank_get(xdma_channel_t *xchan) in xchan_bank_get() argument
79 QUEUE_BANK_LOCK(xchan); in xchan_bank_get()
[all …]
HDxdma_queue.c46 xdma_dequeue(xdma_channel_t *xchan, void **user, in xdma_dequeue() argument
52 QUEUE_OUT_LOCK(xchan); in xdma_dequeue()
53 TAILQ_FOREACH_SAFE(xr, &xchan->queue_out, xr_next, xr_tmp) { in xdma_dequeue()
54 TAILQ_REMOVE(&xchan->queue_out, xr, xr_next); in xdma_dequeue()
57 QUEUE_OUT_UNLOCK(xchan); in xdma_dequeue()
66 xchan_bank_put(xchan, xr); in xdma_dequeue()
72 xdma_enqueue(xdma_channel_t *xchan, uintptr_t src, uintptr_t dst, in xdma_enqueue() argument
79 xdma = xchan->xdma; in xdma_enqueue()
82 xr = xchan_bank_get(xchan); in xdma_enqueue()
98 QUEUE_IN_LOCK(xchan); in xdma_enqueue()
[all …]
HDxdma_mbuf.c52 xdma_dequeue_mbuf(xdma_channel_t *xchan, struct mbuf **mp, in xdma_dequeue_mbuf() argument
58 QUEUE_OUT_LOCK(xchan); in xdma_dequeue_mbuf()
59 TAILQ_FOREACH_SAFE(xr, &xchan->queue_out, xr_next, xr_tmp) { in xdma_dequeue_mbuf()
60 TAILQ_REMOVE(&xchan->queue_out, xr, xr_next); in xdma_dequeue_mbuf()
63 QUEUE_OUT_UNLOCK(xchan); in xdma_dequeue_mbuf()
72 xchan_bank_put(xchan, xr); in xdma_dequeue_mbuf()
78 xdma_enqueue_mbuf(xdma_channel_t *xchan, struct mbuf **mp, in xdma_enqueue_mbuf() argument
84 xr = xchan_bank_get(xchan); in xdma_enqueue_mbuf()
101 QUEUE_IN_LOCK(xchan); in xdma_enqueue_mbuf()
102 TAILQ_INSERT_TAIL(&xchan->queue_in, xr, xr_next); in xdma_enqueue_mbuf()
[all …]
HDxdma_bio.c46 xdma_dequeue_bio(xdma_channel_t *xchan, struct bio **bp, in xdma_dequeue_bio() argument
52 QUEUE_OUT_LOCK(xchan); in xdma_dequeue_bio()
53 TAILQ_FOREACH_SAFE(xr, &xchan->queue_out, xr_next, xr_tmp) { in xdma_dequeue_bio()
54 TAILQ_REMOVE(&xchan->queue_out, xr, xr_next); in xdma_dequeue_bio()
57 QUEUE_OUT_UNLOCK(xchan); in xdma_dequeue_bio()
67 xchan_bank_put(xchan, xr); in xdma_dequeue_bio()
73 xdma_enqueue_bio(xdma_channel_t *xchan, struct bio **bp, in xdma_enqueue_bio() argument
79 xr = xchan_bank_get(xchan); in xdma_enqueue_bio()
96 QUEUE_IN_LOCK(xchan); in xdma_enqueue_bio()
97 TAILQ_INSERT_TAIL(&xchan->queue_in, xr, xr_next); in xdma_enqueue_bio()
[all …]
HDxdma_sglist.c44 xchan_sglist_alloc(xdma_channel_t *xchan) in xchan_sglist_alloc() argument
48 if (xchan->flags & XCHAN_SGLIST_ALLOCATED) in xchan_sglist_alloc()
52 xchan->sg = malloc(sz, M_XDMA, M_WAITOK | M_ZERO); in xchan_sglist_alloc()
53 xchan->flags |= XCHAN_SGLIST_ALLOCATED; in xchan_sglist_alloc()
59 xchan_sglist_free(xdma_channel_t *xchan) in xchan_sglist_free() argument
62 if (xchan->flags & XCHAN_SGLIST_ALLOCATED) in xchan_sglist_free()
63 free(xchan->sg, M_XDMA); in xchan_sglist_free()
65 xchan->flags &= ~XCHAN_SGLIST_ALLOCATED; in xchan_sglist_free()
HDxdma_if.m49 struct xdma_channel *xchan;
58 struct xdma_channel *xchan;
67 struct xdma_channel *xchan;
76 struct xdma_channel *xchan;
96 struct xdma_channel *xchan;
104 struct xdma_channel *xchan;
112 struct xdma_channel *xchan;
HDxdma_iommu.c62 xdma_iommu_remove_entry(xdma_channel_t *xchan, vm_offset_t va) in xdma_iommu_remove_entry() argument
66 xio = &xchan->xio; in xdma_iommu_remove_entry()
100 xdma_iommu_add_entry(xdma_channel_t *xchan, vm_offset_t *va, in xdma_iommu_add_entry() argument
107 xio = &xchan->xio; in xdma_iommu_add_entry()
HDxdma_fdt_test.c68 xdma_channel_t *xchan; member
211 sc->xchan = xdma_channel_alloc(sc->xdma); in xdmatest_test()
212 if (sc->xchan == NULL) { in xdmatest_test()
218 err = xdma_setup_intr(sc->xchan, 0, xdmatest_intr, sc, &sc->ih); in xdmatest_test()
243 err = xdma_request(sc->xchan, sc->src_phys, sc->dst_phys, sc->len); in xdmatest_test()
250 xdma_begin(sc->xchan); in xdmatest_test()
273 err = xdma_channel_free(sc->xchan); in xdmatest_verify()
/freebsd-13-stable/sys/dev/xilinx/
HDaxidma.c84 xdma_channel_t *xchan; member
145 struct xdma_channel *xchan; in axidma_intr() local
150 xchan = chan->xchan; in axidma_intr()
151 xdma = xchan->xdma; in axidma_intr()
178 xchan_seg_done(xchan, &st); in axidma_intr()
187 xdma_callback(chan->xchan, &status); in axidma_intr()
318 struct xdma_channel *xchan; in axidma_desc_free() local
322 xchan = chan->xchan; in axidma_desc_free()
329 vmem_free(xchan->vmem, chan->mem_paddr, chan->mem_size); in axidma_desc_free()
335 axidma_desc_alloc(struct axidma_softc *sc, struct xdma_channel *xchan, in axidma_desc_alloc() argument
[all …]
/freebsd-13-stable/sys/mips/ingenic/
HDjz4780_pdma.c102 xdma_channel_t *xchan; member
127 xdma_channel_t *xchan; in pdma_intr() local
141 xchan = chan->xchan; in pdma_intr()
157 xdma_callback(chan->xchan, &status); in pdma_intr()
234 struct xdma_channel *xchan; in chan_start() local
236 xchan = chan->xchan; in chan_start()
333 pdma_channel_alloc(device_t dev, struct xdma_channel *xchan) in pdma_channel_alloc() argument
344 chan->xchan = xchan; in pdma_channel_alloc()
345 xchan->chan = (void *)chan; in pdma_channel_alloc()
359 pdma_channel_free(device_t dev, struct xdma_channel *xchan) in pdma_channel_free() argument
[all …]
HDjz4780_aic.c83 struct xdma_channel *xchan; member
296 xdma_channel_t *xchan; in aic_intr() local
306 xchan = sc->xchan; in aic_intr()
345 err = xdma_request(sc->xchan, &sc->req); in setup_xdma()
351 xdma_control(sc->xchan, XDMA_CMD_BEGIN); in setup_xdma()
392 xdma_control(sc->xchan, XDMA_CMD_TERMINATE); in aic_stop()
693 sc->xchan = xdma_channel_alloc(sc->xdma_tx, 0); in aic_attach()
694 if (sc->xchan == NULL) { in aic_attach()
745 err = xdma_setup_intr(sc->xchan, 0, aic_intr, scp, &sc->ih); in aic_attach()
785 xdma_channel_free(sc->xchan); in aic_detach()
/freebsd-13-stable/sys/dev/altera/softdma/
HDsoftdma.c88 xdma_channel_t *xchan; member
489 struct xdma_channel *xchan; in softdma_process_descriptors() local
497 xchan = chan->xchan; in softdma_process_descriptors()
527 xchan_seg_done(xchan, &st); in softdma_process_descriptors()
571 xdma_callback(chan->xchan, &status); in softdma_worker()
603 softdma_channel_alloc(device_t dev, struct xdma_channel *xchan) in softdma_channel_alloc() argument
614 chan->xchan = xchan; in softdma_channel_alloc()
615 xchan->chan = (void *)chan; in softdma_channel_alloc()
616 xchan->caps |= XCHAN_CAP_NOSEG; in softdma_channel_alloc()
638 softdma_channel_free(device_t dev, struct xdma_channel *xchan) in softdma_channel_free() argument
[all …]
/freebsd-13-stable/sys/dev/xdma/controller/
HDpl330.c85 xdma_channel_t *xchan; member
156 struct xdma_channel *xchan; in pl330_intr() local
177 xchan = chan->xchan; in pl330_intr()
181 xchan_seg_done(xchan, &st); in pl330_intr()
190 xdma_callback(chan->xchan, &status); in pl330_intr()
375 pl330_channel_alloc(device_t dev, struct xdma_channel *xchan) in pl330_channel_alloc() argument
386 chan->xchan = xchan; in pl330_channel_alloc()
387 xchan->chan = (void *)chan; in pl330_channel_alloc()
388 xchan->caps |= XCHAN_CAP_BUSDMA; in pl330_channel_alloc()
406 pl330_channel_free(device_t dev, struct xdma_channel *xchan) in pl330_channel_free() argument
[all …]
/freebsd-13-stable/sys/dev/altera/msgdma/
HDmsgdma.c79 xdma_channel_t *xchan; member
142 struct xdma_channel *xchan; in msgdma_intr() local
148 xchan = chan->xchan; in msgdma_intr()
172 xchan_seg_done(xchan, &st); in msgdma_intr()
183 xdma_callback(chan->xchan, &status); in msgdma_intr()
396 msgdma_channel_alloc(device_t dev, struct xdma_channel *xchan) in msgdma_channel_alloc() argument
407 chan->xchan = xchan; in msgdma_channel_alloc()
408 xchan->chan = (void *)chan; in msgdma_channel_alloc()
409 if ((xchan->caps & XCHAN_CAP_IOMMU) == 0) in msgdma_channel_alloc()
410 xchan->caps |= XCHAN_CAP_BUSDMA; in msgdma_channel_alloc()
[all …]
/freebsd-13-stable/sys/dev/hyperv/vmbus/
HDvmbus_chan.c789 vmbus_chan_clrchmap_task(void *xchan, int pending __unused) in vmbus_chan_clrchmap_task() argument
791 struct vmbus_channel *chan = xchan; in vmbus_chan_clrchmap_task()
813 vmbus_chan_poll_cancel_task(void *xchan, int pending __unused) in vmbus_chan_poll_cancel_task() argument
816 vmbus_chan_poll_cancel_intq(xchan); in vmbus_chan_poll_cancel_task()
1363 vmbus_chan_task(void *xchan, int pending __unused) in vmbus_chan_task() argument
1365 struct vmbus_channel *chan = xchan; in vmbus_chan_task()
1399 vmbus_chan_task_nobatch(void *xchan, int pending __unused) in vmbus_chan_task_nobatch() argument
1401 struct vmbus_channel *chan = xchan; in vmbus_chan_task_nobatch()
1409 vmbus_chan_poll_timeout(void *xchan) in vmbus_chan_poll_timeout() argument
1411 struct vmbus_channel *chan = xchan; in vmbus_chan_poll_timeout()
[all …]