Home
last modified time | relevance | path

Searched refs:fifo (Results 1 – 25 of 758) sorted by relevance

12345678910>>...31

/openbmc/qemu/util/
H A Dfifo8.c39 assert(fifo->num < fifo->capacity); in fifo8_push()
40 fifo->data[(fifo->head + fifo->num) % fifo->capacity] = data; in fifo8_push()
48 assert(fifo->num + num <= fifo->capacity); in fifo8_push_all()
50 start = (fifo->head + fifo->num) % fifo->capacity; in fifo8_push_all()
68 ret = fifo->data[fifo->head++]; in fifo8_pop()
69 fifo->head %= fifo->capacity; in fifo8_pop()
81 num = MIN(fifo->capacity - fifo->head, max); in fifo8_peekpop_buf()
82 ret = &fifo->data[fifo->head]; in fifo8_peekpop_buf()
86 fifo->head %= fifo->capacity; in fifo8_peekpop_buf()
147 return (fifo->num == fifo->capacity); in fifo8_is_full()
[all …]
/openbmc/linux/lib/
H A Dkfifo.c21 return (fifo->mask + 1) - (fifo->in - fifo->out); in kfifo_unused()
33 fifo->in = 0; in __kfifo_alloc()
122 kfifo_copy_in(fifo, buf, len, fifo->in); in __kfifo_in()
157 l = fifo->in - fifo->out; in __kfifo_out_peek()
161 kfifo_copy_out(fifo, buf, len, fifo->out); in __kfifo_out_peek()
281 l = fifo->in - fifo->out; in __kfifo_to_user()
374 l = fifo->in - fifo->out; in __kfifo_dma_out_prepare()
469 if (fifo->in == fifo->out) in __kfifo_out_peek_r()
481 if (fifo->in == fifo->out) in __kfifo_out_r()
529 if (fifo->in == fifo->out) { in __kfifo_to_user_r()
[all …]
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
H A Dbase.c57 return fifo->func->pause(fifo, flags); in nvkm_fifo_pause()
63 return fifo->func->start(fifo, flags); in nvkm_fifo_start()
69 return fifo->func->mmu_fault->recover(fifo, info); in nvkm_fifo_fault()
150 fifo->func->init_pbdmas(fifo, mask); in nvkm_fifo_init()
162 fifo->func->init(fifo); in nvkm_fifo_init()
250 ret = fifo->func->chid_ctor(fifo, fifo->func->chid_nr(fifo)); in nvkm_fifo_oneinit()
257 for (nr = fifo->func->runq_nr(fifo), i = 0; i < nr; i++) { in nvkm_fifo_oneinit()
264 ret = fifo->func->runl_ctor(fifo); in nvkm_fifo_oneinit()
288 ret = fifo->func->nonstall_ctor(fifo); in nvkm_fifo_oneinit()
352 return fifo; in nvkm_fifo_dtor()
[all …]
H A DKbuild2 nvkm-y += nvkm/engine/fifo/base.o
3 nvkm-y += nvkm/engine/fifo/cgrp.o
4 nvkm-y += nvkm/engine/fifo/chan.o
5 nvkm-y += nvkm/engine/fifo/chid.o
6 nvkm-y += nvkm/engine/fifo/runl.o
7 nvkm-y += nvkm/engine/fifo/runq.o
9 nvkm-y += nvkm/engine/fifo/nv04.o
10 nvkm-y += nvkm/engine/fifo/nv10.o
11 nvkm-y += nvkm/engine/fifo/nv17.o
14 nvkm-y += nvkm/engine/fifo/g84.o
[all …]
H A Dgf100.c67 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in gf100_chan_unbind() local
205 struct nvkm_fifo *fifo = runl->fifo; in gf100_engn_mmu_fault_triggered() local
213 spin_lock(&fifo->lock); in gf100_engn_mmu_fault_triggered()
217 spin_unlock(&fifo->lock); in gf100_engn_mmu_fault_triggered()
225 struct nvkm_fifo *fifo = runl->fifo; in gf100_engn_mmu_fault_trigger() local
229 spin_lock(&fifo->lock); in gf100_engn_mmu_fault_trigger()
234 spin_unlock(&fifo->lock); in gf100_engn_mmu_fault_trigger()
442 struct nvkm_fifo *fifo = container_of(event, typeof(*fifo), nonstall.event); in gf100_fifo_nonstall_allow() local
453 struct nvkm_fifo *fifo = container_of(event, typeof(*fifo), nonstall.event); in gf100_fifo_nonstall_block() local
664 fifo->func->intr_ctxsw_timeout(fifo, engm); in gf100_fifo_intr_sched_ctxsw()
[all …]
H A Dnv04.c43 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv04_chan_stop() local
94 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv04_chan_start() local
183 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv04_eobj_ramht_del() local
186 mutex_lock(&fifo->mutex); in nv04_eobj_ramht_del()
188 mutex_unlock(&fifo->mutex); in nv04_eobj_ramht_del()
194 struct nvkm_fifo *fifo = chan->cgrp->runl->fifo; in nv04_eobj_ramht_add() local
199 mutex_lock(&fifo->mutex); in nv04_eobj_ramht_add()
201 mutex_unlock(&fifo->mutex); in nv04_eobj_ramht_add()
213 __acquires(fifo->lock) in nv04_fifo_pause()
248 __releases(fifo->lock) in nv04_fifo_start()
[all …]
H A Dgk104.c432 struct nvkm_fifo *fifo = runl->fifo; in gk104_runl_commit() local
445 spin_lock_irq(&fifo->lock); in gk104_runl_commit()
448 spin_unlock_irq(&fifo->lock); in gk104_runl_commit()
654 struct nvkm_fifo *fifo = container_of(inth, typeof(*fifo), engine.subdev.inth); in gk104_fifo_intr() local
661 gk104_fifo_intr_bind(fifo); in gk104_fifo_intr()
673 gf100_fifo_intr_sched(fifo); in gk104_fifo_intr()
679 gk104_fifo_intr_chsw(fifo); in gk104_fifo_intr()
725 spin_lock(&fifo->lock); in gk104_fifo_intr()
727 spin_unlock(&fifo->lock); in gk104_fifo_intr()
785 func = fifo->func->engn_ce; in gk104_fifo_runl_ctor()
[all …]
H A Dtu102.c176 nvkm_runl_foreach(runl, fifo) { in tu102_fifo_intr_ctxsw_timeout()
187 tu102_fifo_intr_sched(struct nvkm_fifo *fifo) in tu102_fifo_intr_sched() argument
199 struct nvkm_fifo *fifo = container_of(inth, typeof(*fifo), engine.subdev.inth); in tu102_fifo_intr() local
206 gk104_fifo_intr_bind(fifo); in tu102_fifo_intr()
212 tu102_fifo_intr_ctxsw_timeout(fifo); in tu102_fifo_intr()
217 tu102_fifo_intr_sched(fifo); in tu102_fifo_intr()
223 gk104_fifo_intr_chsw(fifo); in tu102_fifo_intr()
229 if (gf100_fifo_intr_pbdma(fifo)) in tu102_fifo_intr()
234 gk104_fifo_intr_runlist(fifo); in tu102_fifo_intr()
246 spin_lock(&fifo->lock); in tu102_fifo_intr()
[all …]
H A Dg84.c164 struct nvkm_fifo *fifo = container_of(event, typeof(*fifo), nonstall.event); in g84_fifo_nonstall_block() local
167 spin_lock_irqsave(&fifo->lock, flags); in g84_fifo_nonstall_block()
169 spin_unlock_irqrestore(&fifo->lock, flags); in g84_fifo_nonstall_block()
175 struct nvkm_fifo *fifo = container_of(event, typeof(*fifo), nonstall.event); in g84_fifo_nonstall_allow() local
178 spin_lock_irqsave(&fifo->lock, flags); in g84_fifo_nonstall_allow()
180 spin_unlock_irqrestore(&fifo->lock, flags); in g84_fifo_nonstall_allow()
190 g84_fifo_runl_ctor(struct nvkm_fifo *fifo) in g84_fifo_runl_ctor() argument
194 runl = nvkm_runl_new(fifo, 0, 0, 0); in g84_fifo_runl_ctor()
200 nvkm_runl_add(runl, 1, fifo->func->engn, NVKM_ENGINE_GR, 0); in g84_fifo_runl_ctor()
202 nvkm_runl_add(runl, 3, fifo->func->engn, NVKM_ENGINE_ME, 0); in g84_fifo_runl_ctor()
[all …]
/openbmc/linux/include/linux/
H A Dkfifo.h126 typeof(&(fifo)) __tmp = &(fifo); \
211 typeof((fifo) + 1) __tmp = (fifo); \
225 typeof((fifo) + 1) __tmp = (fifo); \
235 typeof((fifo) + 1) __tmpl = (fifo); \
245 typeof((fifo) + 1) __tmpq = (fifo); \
286 typeof((fifo) + 1) __tmpq = (fifo); \
312 typeof((fifo) + 1) __tmp = (fifo); \
330 typeof((fifo) + 1) __tmp = (fifo); \
353 typeof((fifo) + 1) __tmp = (fifo); \
367 typeof((fifo) + 1) __tmp = (fifo); \
[all …]
/openbmc/qemu/include/qemu/
H A Dfifo32.h21 Fifo8 fifo; member
35 fifo8_create(&fifo->fifo, capacity * sizeof(uint32_t)); in fifo32_create()
48 fifo8_destroy(&fifo->fifo); in fifo32_destroy()
62 return DIV_ROUND_UP(fifo8_num_free(&fifo->fifo), sizeof(uint32_t)); in fifo32_num_free()
76 return DIV_ROUND_UP(fifo8_num_used(&fifo->fifo), sizeof(uint32_t)); in fifo32_num_used()
94 fifo8_push(&fifo->fifo, data & 0xff); in fifo32_push()
116 fifo32_push(fifo, data[i]); in fifo32_push_all()
137 ret |= (fifo8_pop(&fifo->fifo) << (i * 8)); in fifo32_pop()
157 fifo8_reset(&fifo->fifo); in fifo32_reset()
171 return fifo8_is_empty(&fifo->fifo); in fifo32_is_empty()
[all …]
H A Dfifo8.h21 void fifo8_create(Fifo8 *fifo, uint32_t capacity);
30 void fifo8_destroy(Fifo8 *fifo);
40 void fifo8_push(Fifo8 *fifo, uint8_t data);
52 void fifo8_push_all(Fifo8 *fifo, const uint8_t *data, uint32_t num);
63 uint8_t fifo8_pop(Fifo8 *fifo);
141 void fifo8_drop(Fifo8 *fifo, uint32_t len);
149 void fifo8_reset(Fifo8 *fifo);
159 bool fifo8_is_empty(Fifo8 *fifo);
169 bool fifo8_is_full(Fifo8 *fifo);
179 uint32_t fifo8_num_free(Fifo8 *fifo);
[all …]
/openbmc/linux/drivers/staging/axis-fifo/
H A Daxis-fifo.c402 reset_ip_core(fifo); in axis_fifo_read()
410 reset_ip_core(fifo); in axis_fifo_read()
786 ret = get_dts_property(fifo, "xlnx,use-rx-data", &fifo->has_rx_fifo); in axis_fifo_parse_dt()
793 ret = get_dts_property(fifo, "xlnx,use-tx-data", &fifo->has_tx_fifo); in axis_fifo_parse_dt()
822 fifo = devm_kzalloc(dev, sizeof(*fifo), GFP_KERNEL); in axis_fifo_probe()
823 if (!fifo) in axis_fifo_probe()
847 dev_dbg(fifo->dt_device, "remapped memory to 0x%p\n", fifo->base_addr); in axis_fifo_probe()
862 reset_ip_core(fifo); in axis_fifo_probe()
875 fifo->irq = rc; in axis_fifo_probe()
876 rc = devm_request_irq(fifo->dt_device, fifo->irq, &axis_fifo_irq, 0, in axis_fifo_probe()
[all …]
/openbmc/linux/sound/soc/meson/
H A Daxg-fifo.c331 struct axg_fifo *fifo; in axg_fifo_probe() local
341 fifo = devm_kzalloc(dev, sizeof(*fifo), GFP_KERNEL); in axg_fifo_probe()
342 if (!fifo) in axg_fifo_probe()
353 PTR_ERR(fifo->map)); in axg_fifo_probe()
358 if (IS_ERR(fifo->pclk)) in axg_fifo_probe()
362 if (IS_ERR(fifo->arb)) in axg_fifo_probe()
366 if (fifo->irq <= 0) { in axg_fifo_probe()
368 return fifo->irq; in axg_fifo_probe()
377 &fifo->depth); in axg_fifo_probe()
386 fifo->depth = 256; in axg_fifo_probe()
[all …]
H A Daiu-fifo.c115 fifo->mem_offset + AIU_MEM_MASKS, in aiu_fifo_hw_params()
146 fifo->fifo_block); in aiu_fifo_startup()
152 fifo->fifo_block); in aiu_fifo_startup()
156 ret = clk_prepare_enable(fifo->pclk); in aiu_fifo_startup()
163 clk_disable_unprepare(fifo->pclk); in aiu_fifo_startup()
173 free_irq(fifo->irq, substream); in aiu_fifo_shutdown()
174 clk_disable_unprepare(fifo->pclk); in aiu_fifo_shutdown()
197 struct aiu_fifo *fifo; in aiu_fifo_dai_probe() local
199 fifo = kzalloc(sizeof(*fifo), GFP_KERNEL); in aiu_fifo_dai_probe()
200 if (!fifo) in aiu_fifo_dai_probe()
[all …]
/openbmc/linux/drivers/usb/fotg210/
H A Dfotg210-udc.h49 #define DCFESR_FIFO_EMPTY(fifo) (1 << 8 << (fifo)) argument
78 #define DMISGR1_MF_IN_INT(fifo) (1 << (16 + (fifo))) argument
87 #define DMISGR1_MF_OUTSPK_INT(fifo) (0x3 << (fifo) * 2) argument
111 #define DISGR1_OUT_INT(fifo) (1 << ((fifo) * 2)) argument
112 #define DISGR1_SPK_INT(fifo) (1 << 1 << ((fifo) * 2)) argument
113 #define DISGR1_IN_INT(fifo) (1 << 16 << (fifo)) argument
168 #define FIFOMAP_DIRIN(fifo) (0x1 << 4 << (fifo) * 8) argument
169 #define FIFOMAP_BIDIR(fifo) (0x2 << 4 << (fifo) * 8) argument
170 #define FIFOMAP_NA(fifo) (0x3 << 4 << (fifo) * 8) argument
185 #define FOTG210_FIBCR(fifo) (0x1B0 + (fifo) * 4) argument
[all …]
/openbmc/linux/drivers/platform/mellanox/
H A Dmlxbf-tmfifo.c279 vring->fifo = fifo; in mlxbf_tmfifo_alloc_vrings()
606 struct mlxbf_tmfifo *fifo = vring->fifo; in mlxbf_tmfifo_rxtx_word() local
658 struct mlxbf_tmfifo *fifo = vring->fifo; in mlxbf_tmfifo_rxtx_header() local
737 struct mlxbf_tmfifo *fifo = vring->fifo; in mlxbf_tmfifo_rxtx_one_desc() local
880 fifo = vring->fifo; in mlxbf_tmfifo_rxtx()
883 if (!fifo || !fifo->vdev[devid]) in mlxbf_tmfifo_rxtx()
984 fifo = vring->fifo; in mlxbf_tmfifo_virtio_notify()
1372 fifo->rx.ctl = fifo->res0 + MLXBF_TMFIFO_RX_CTL; in mlxbf_tmfifo_probe()
1373 fifo->rx.sts = fifo->res0 + MLXBF_TMFIFO_RX_STS; in mlxbf_tmfifo_probe()
1375 fifo->tx.ctl = fifo->res1 + MLXBF_TMFIFO_TX_CTL; in mlxbf_tmfifo_probe()
[all …]
/openbmc/linux/drivers/usb/renesas_usbhs/
H A Dfifo.c123 if (fifo) in usbhs_pkt_pop()
141 if (fifo) in usbhs_pkt_pop()
788 return fifo; in usbhsf_get_dma_fifo()
830 if (!fifo) in usbhsf_dma_xfer_preparing()
909 if (!fifo) in usbhsf_dma_prepare_push()
1004 if (!fifo) in usbhsf_dma_prepare_pop_with_usb_dmac()
1076 if (!fifo) in usbhsf_dma_try_pop_with_rx_irq()
1250 if (fifo->tx_chan) in usbhsf_dma_quit()
1252 if (fifo->rx_chan) in usbhsf_dma_quit()
1306 if (fifo->tx_chan || fifo->rx_chan) in usbhsf_dma_init()
[all …]
/openbmc/linux/drivers/md/bcache/
H A Dutil.h134 (fifo)->front = (fifo)->back = 0; \
160 #define fifo_used(fifo) (((fifo)->back - (fifo)->front) & (fifo)->mask) argument
161 #define fifo_free(fifo) ((fifo)->size - fifo_used(fifo)) argument
166 #define fifo_front(fifo) ((fifo)->data[(fifo)->front]) argument
168 ((fifo)->data[((fifo)->back - 1) & (fifo)->mask])
170 #define fifo_idx(fifo, p) (((p) - &fifo_front(fifo)) & (fifo)->mask) argument
177 (fifo)->back &= (fifo)->mask; \
187 (fifo)->front &= (fifo)->mask; \
197 (fifo)->front &= (fifo)->mask; \
208 (fifo)->back &= (fifo)->mask; \
[all …]
/openbmc/linux/drivers/iio/imu/inv_icm42600/
H A Dinv_icm42600_buffer.c147 st->fifo.en = fifo_en; in inv_icm42600_buffer_set_fifo_en()
302 if (st->fifo.on) { in inv_icm42600_buffer_postenable()
333 st->fifo.on++; in inv_icm42600_buffer_postenable()
372 st->fifo.on--; in inv_icm42600_buffer_predisable()
420 if (!st->fifo.on) in inv_icm42600_buffer_postdisable()
459 st->fifo.count = 0; in inv_icm42600_buffer_fifo_read()
486 st->fifo.data, st->fifo.count); in inv_icm42600_buffer_fifo_read()
516 inv_sensors_timestamp_interrupt(ts, st->fifo.period, st->fifo.nb.total, in inv_icm42600_buffer_fifo_parse()
526 inv_sensors_timestamp_interrupt(ts, st->fifo.period, st->fifo.nb.total, in inv_icm42600_buffer_fifo_parse()
557 st->fifo.nb.total, st->fifo.nb.gyro, in inv_icm42600_buffer_hwfifo_flush()
[all …]
/openbmc/linux/samples/kfifo/
H A Ddma-example.c19 static struct kfifo fifo; variable
30 if (kfifo_alloc(&fifo, FIFO_SIZE, GFP_KERNEL)) { in example_init()
35 printk(KERN_INFO "queue size: %u\n", kfifo_size(&fifo)); in example_init()
37 kfifo_in(&fifo, "test", 4); in example_init()
40 kfifo_put(&fifo, i); in example_init()
43 kfifo_skip(&fifo); in example_init()
45 printk(KERN_INFO "queue len: %u\n", kfifo_len(&fifo)); in example_init()
90 kfifo_dma_in_finish(&fifo, ret); in example_init()
119 kfifo_dma_out_finish(&fifo, ret); in example_init()
121 ret = kfifo_len(&fifo); in example_init()
[all …]
/openbmc/qemu/hw/block/
H A Dfdc.c1471 kt = fdctrl->fifo[2]; in fdctrl_start_transfer()
1531 fdctrl->data_len = 128 << (fdctrl->fifo[5] > 7 ? 7 : fdctrl->fifo[5]); in fdctrl_start_transfer()
1858 fdctrl->fifo[2] = 0; in fdctrl_handle_dumpreg()
1859 fdctrl->fifo[3] = 0; in fdctrl_handle_dumpreg()
1912 fdctrl->fifo[0] = 0; in fdctrl_handle_save()
1913 fdctrl->fifo[1] = 0; in fdctrl_handle_save()
1921 fdctrl->fifo[4] = 0; in fdctrl_handle_save()
1922 fdctrl->fifo[5] = 0; in fdctrl_handle_save()
1959 fdctrl->fifo[2] > 7 ? 16384 : 128 << fdctrl->fifo[2]; in fdctrl_handle_format_track()
2077 fdctrl->fifo[0] = fdctrl->fifo[1]; in fdctrl_handle_powerdown_mode()
[all …]
/openbmc/linux/drivers/isdn/hardware/mISDN/
H A Dhfcsusb.c818 fifo->dch, fifo->bch, fifo->ech); in hfcsusb_rx_frame()
823 if ((!!fifo->dch + !!fifo->bch + !!fifo->ech) != 1) { in hfcsusb_rx_frame()
860 if (fifo->dch || fifo->ech) { in hfcsusb_rx_frame()
1063 fill_isoc_urb(urb, fifo->hw->dev, fifo->pipe, in rx_iso_complete()
1065 fifo->usb_packet_maxlen, fifo->intervall, in rx_iso_complete()
1225 fill_isoc_urb(urb, fifo->hw->dev, fifo->pipe, in tx_iso_complete()
1227 fifo->usb_packet_maxlen, fifo->intervall, in tx_iso_complete()
1339 if (fifo->dch && get_next_dframe(fifo->dch)) in tx_iso_complete()
1409 fifo->hw->dev, fifo->pipe, in start_isoc_chain()
1510 usb_fill_int_urb(fifo->urb, fifo->hw->dev, fifo->pipe, in start_int_fifo()
[all …]
/openbmc/sdeventplus/example/
H A Dfollow.cpp19 void reader(const char* fifo, sdeventplus::source::IO& source, int fd, uint32_t) in reader() argument
25 int newfd = open(fifo, O_NONBLOCK | O_RDONLY); in reader()
28 fprintf(stderr, "Failed to open %s: %s\n", fifo, strerror(errno)); in reader()
50 void remover(const char* fifo, sdeventplus::source::EventBase& source) in remover() argument
52 int r = unlink(fifo); in remover()
55 fprintf(stderr, "Failed to remove fifo %s: %s\n", fifo, in remover()
74 const char* fifo = argv[1]; in main() local
90 if (mkfifo(fifo, 0622)) in main()
96 int fd = open(fifo, O_NONBLOCK | O_RDONLY); in main()
107 event, std::bind(remover, fifo, std::placeholders::_1)); in main()
[all …]
/openbmc/linux/drivers/spi/
H A Dspi-mpc512x-psc.c147 struct mpc512x_psc_fifo __iomem *fifo = mps->fifo; in mpc512x_psc_spi_transfer_rxtx() local
178 setbits32(&fifo->txcmd, in mpc512x_psc_spi_transfer_rxtx()
276 in_8(&fifo->rxdata_8); in mpc512x_psc_spi_transfer_rxtx()
346 struct mpc512x_psc_fifo __iomem *fifo = mps->fifo; in mpc512x_psc_spi_unprep_xfer_hw() local
352 out_be32(&fifo->tximr, 0); in mpc512x_psc_spi_unprep_xfer_hw()
386 struct mpc512x_psc_fifo __iomem *fifo = mps->fifo; in mpc512x_psc_spi_port_config() local
401 out_be32(&fifo->tximr, 0); in mpc512x_psc_spi_port_config()
432 out_be32(&fifo->rxcmd, in mpc512x_psc_spi_port_config()
434 out_be32(&fifo->txcmd, in mpc512x_psc_spi_port_config()
445 struct mpc512x_psc_fifo __iomem *fifo = mps->fifo; in mpc512x_psc_spi_isr() local
[all …]

12345678910>>...31