Home
last modified time | relevance | path

Searched +full:fifo +full:- +full:size (Results 1 – 25 of 1040) sorted by relevance

12345678910>>...42

/kernel/linux/linux-5.10/lib/
Dkfifo.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * A generic kernel FIFO implementation
17 * internal helper to calculate the unused elements in a fifo
19 static inline unsigned int kfifo_unused(struct __kfifo *fifo) in kfifo_unused() argument
21 return (fifo->mask + 1) - (fifo->in - fifo->out); in kfifo_unused()
24 int __kfifo_alloc(struct __kfifo *fifo, unsigned int size, in __kfifo_alloc() argument
31 size = roundup_pow_of_two(size); in __kfifo_alloc()
33 fifo->in = 0; in __kfifo_alloc()
34 fifo->out = 0; in __kfifo_alloc()
35 fifo->esize = esize; in __kfifo_alloc()
[all …]
/kernel/linux/linux-6.6/lib/
Dkfifo.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * A generic kernel FIFO implementation
17 * internal helper to calculate the unused elements in a fifo
19 static inline unsigned int kfifo_unused(struct __kfifo *fifo) in kfifo_unused() argument
21 return (fifo->mask + 1) - (fifo->in - fifo->out); in kfifo_unused()
24 int __kfifo_alloc(struct __kfifo *fifo, unsigned int size, in __kfifo_alloc() argument
31 size = roundup_pow_of_two(size); in __kfifo_alloc()
33 fifo->in = 0; in __kfifo_alloc()
34 fifo->out = 0; in __kfifo_alloc()
35 fifo->esize = esize; in __kfifo_alloc()
[all …]
/kernel/linux/linux-5.10/drivers/staging/fwserial/
Ddma_fifo.c1 // SPDX-License-Identifier: GPL-2.0+
3 * DMA-able FIFO implementation
21 #define FAIL(fifo, condition, format...) ({ \ argument
22 fifo->corrupt = !!(condition); \
23 WARN(fifo->corrupt, format); \
31 return check - (lo + 1) < (hi - 1) - lo; in addr_check()
35 * dma_fifo_init: initialize the fifo to a valid but inoperative state
36 * @fifo: address of in-place "struct dma_fifo" object
38 void dma_fifo_init(struct dma_fifo *fifo) in dma_fifo_init() argument
40 memset(fifo, 0, sizeof(*fifo)); in dma_fifo_init()
[all …]
Ddma_fifo.h1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * DMA-able FIFO interface
12 * The design basis for the DMA FIFO is to provide an output side that
15 * logically consistent 'apparent' size (ie, bytes in + bytes avail is static
16 * for the lifetime of the FIFO).
19 * variably-sized. DMA output transactions can be retired out-of-order but
20 * the FIFO will only advance the output in the original input sequence.
21 * This means the FIFO will eventually stall if a transaction is never retired.
23 * Chunking the output side into cache line multiples means that some FIFO
25 * then the in and out markers are re-aligned to the next cache line.
[all …]
/kernel/linux/linux-5.10/include/linux/
Dkfifo.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * A generic kernel FIFO implementation
12 * How to porting drivers to the new generic FIFO API:
14 * - Modify the declaration of the "struct kfifo *" object into a
15 * in-place "struct kfifo" object
16 * - Init the in-place object with kfifo_alloc() or kfifo_init()
17 * Note: The address of the in-place "struct kfifo" object must be
19 * - Replace the use of __kfifo_put into kfifo_in and __kfifo_get
21 * - Replace the use of kfifo_put into kfifo_in_spinlocked and kfifo_get
26 * - The formerly __kfifo_* functions are renamed into kfifo_*
[all …]
/kernel/linux/linux-6.6/include/linux/
Dkfifo.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * A generic kernel FIFO implementation
12 * How to porting drivers to the new generic FIFO API:
14 * - Modify the declaration of the "struct kfifo *" object into a
15 * in-place "struct kfifo" object
16 * - Init the in-place object with kfifo_alloc() or kfifo_init()
17 * Note: The address of the in-place "struct kfifo" object must be
19 * - Replace the use of __kfifo_put into kfifo_in and __kfifo_get
21 * - Replace the use of kfifo_put into kfifo_in_spinlocked and kfifo_get
26 * - The formerly __kfifo_* functions are renamed into kfifo_*
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
Dbase.c37 nvkm_fifo_recover_chan(struct nvkm_fifo *fifo, int chid) in nvkm_fifo_recover_chan() argument
40 if (WARN_ON(!fifo->func->recover_chan)) in nvkm_fifo_recover_chan()
42 spin_lock_irqsave(&fifo->lock, flags); in nvkm_fifo_recover_chan()
43 fifo->func->recover_chan(fifo, chid); in nvkm_fifo_recover_chan()
44 spin_unlock_irqrestore(&fifo->lock, flags); in nvkm_fifo_recover_chan()
48 nvkm_fifo_pause(struct nvkm_fifo *fifo, unsigned long *flags) in nvkm_fifo_pause() argument
50 return fifo->func->pause(fifo, flags); in nvkm_fifo_pause()
54 nvkm_fifo_start(struct nvkm_fifo *fifo, unsigned long *flags) in nvkm_fifo_start() argument
56 return fifo->func->start(fifo, flags); in nvkm_fifo_start()
60 nvkm_fifo_fault(struct nvkm_fifo *fifo, struct nvkm_fault_data *info) in nvkm_fifo_fault() argument
[all …]
/kernel/linux/linux-6.6/drivers/platform/mellanox/
Dmlxbf-tmfifo.c1 // SPDX-License-Identifier: GPL-2.0+
24 #include "mlxbf-tmfifo-regs.h"
26 /* Vring size. */
29 /* Console Tx buffer size. */
35 /* House-keeping timer interval. */
38 /* Virtual devices sharing the TM FIFO. */
53 /* ACPI UID for BlueField-3. */
59 * struct mlxbf_tmfifo_vring - Structure of the TmFifo virtual ring
71 * @num: vring size (number of descriptors)
72 * @align: vring alignment size
[all …]
/kernel/linux/linux-5.10/drivers/md/bcache/
Dutil.h1 /* SPDX-License-Identifier: GPL-2.0 */
38 size_t size, used; \
45 (heap)->used = 0; \
46 (heap)->size = (_size); \
47 _bytes = (heap)->size * sizeof(*(heap)->data); \
48 (heap)->data = kvmalloc(_bytes, (gfp) & GFP_KERNEL); \
49 (heap)->data; \
54 kvfree((heap)->data); \
55 (heap)->data = NULL; \
58 #define heap_swap(h, i, j) swap((h)->data[i], (h)->data[j])
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/powerpc/fsl/
Dmpc5121-psc.txt4 ----------------
7 are specified by fsl,mpc5121-psc-uart nodes in the
8 fsl,mpc5121-immr SoC node. Additionally the PSC FIFO
9 Controller node fsl,mpc5121-psc-fifo is required there:
11 fsl,mpc512x-psc-uart nodes
12 --------------------------
15 - compatible : Should contain "fsl,<soc>-psc-uart" and "fsl,<soc>-psc"
17 - reg : Offset and length of the register set for the PSC device
18 - interrupts : <a b> where a is the interrupt number of the
19 PSC FIFO Controller and b is a field that represents an
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/powerpc/fsl/
Dmpc5121-psc.txt4 ----------------
7 are specified by fsl,mpc5121-psc-uart nodes in the
8 fsl,mpc5121-immr SoC node. Additionally the PSC FIFO
9 Controller node fsl,mpc5121-psc-fifo is required there:
11 fsl,mpc512x-psc-uart nodes
12 --------------------------
15 - compatible : Should contain "fsl,<soc>-psc-uart" and "fsl,<soc>-psc"
17 - reg : Offset and length of the register set for the PSC device
18 - interrupts : <a b> where a is the interrupt number of the
19 PSC FIFO Controller and b is a field that represents an
[all …]
/kernel/linux/linux-5.10/drivers/platform/mellanox/
Dmlxbf-tmfifo.c1 // SPDX-License-Identifier: GPL-2.0+
24 #include "mlxbf-tmfifo-regs.h"
26 /* Vring size. */
29 /* Console Tx buffer size. */
35 /* House-keeping timer interval. */
38 /* Virtual devices sharing the TM FIFO. */
53 * mlxbf_tmfifo_vring - Structure of the TmFifo virtual ring
64 * @num: vring size (number of descriptors)
65 * @align: vring alignment size
68 * @fifo: pointer to the tmfifo structure
[all …]
/kernel/linux/linux-6.6/drivers/md/bcache/
Dutil.h1 /* SPDX-License-Identifier: GPL-2.0 */
36 size_t size, used; \
43 (heap)->used = 0; \
44 (heap)->size = (_size); \
45 _bytes = (heap)->size * sizeof(*(heap)->data); \
46 (heap)->data = kvmalloc(_bytes, (gfp) & GFP_KERNEL); \
47 (heap)->data; \
52 kvfree((heap)->data); \
53 (heap)->data = NULL; \
56 #define heap_swap(h, i, j) swap((h)->data[i], (h)->data[j])
[all …]
/kernel/linux/linux-6.6/sound/soc/meson/
Daiu-fifo.c1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/dma-mapping.h>
11 #include <sound/soc-dai.h>
13 #include "aiu-fifo.h"
28 struct snd_soc_pcm_runtime *rtd = ss->private_data; in aiu_fifo_dai()
37 struct aiu_fifo *fifo = snd_soc_dai_dma_data_get_playback(dai); in aiu_fifo_pointer() local
38 struct snd_pcm_runtime *runtime = substream->runtime; in aiu_fifo_pointer()
41 addr = snd_soc_component_read(component, fifo->mem_offset + AIU_MEM_RD); in aiu_fifo_pointer()
43 return bytes_to_frames(runtime, addr - (unsigned int)runtime->dma_addr); in aiu_fifo_pointer()
48 struct snd_soc_component *component = dai->component; in aiu_fifo_enable()
[all …]
Daxg-fifo.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
15 #include <sound/soc-dai.h>
17 #include "axg-fifo.h"
21 * capture frontend DAI. The logic behind this two types of fifo is very
49 struct snd_soc_pcm_runtime *rtd = ss->private_data; in axg_fifo_dai()
65 return dai->dev; in axg_fifo_dev()
68 static void __dma_enable(struct axg_fifo *fifo, bool enable) in __dma_enable() argument
70 regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_DMA_EN, in __dma_enable()
77 struct axg_fifo *fifo = axg_fifo_data(ss); in axg_fifo_pcm_trigger() local
83 __dma_enable(fifo, true); in axg_fifo_pcm_trigger()
[all …]
/kernel/linux/linux-5.10/sound/soc/meson/
Daiu-fifo.c1 // SPDX-License-Identifier: GPL-2.0
8 #include <linux/dma-mapping.h>
11 #include <sound/soc-dai.h>
13 #include "aiu-fifo.h"
28 struct snd_soc_pcm_runtime *rtd = ss->private_data; in aiu_fifo_dai()
37 struct aiu_fifo *fifo = dai->playback_dma_data; in aiu_fifo_pointer() local
38 struct snd_pcm_runtime *runtime = substream->runtime; in aiu_fifo_pointer()
41 addr = snd_soc_component_read(component, fifo->mem_offset + AIU_MEM_RD); in aiu_fifo_pointer()
43 return bytes_to_frames(runtime, addr - (unsigned int)runtime->dma_addr); in aiu_fifo_pointer()
48 struct snd_soc_component *component = dai->component; in aiu_fifo_enable()
[all …]
Daxg-fifo.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
14 #include <sound/soc-dai.h>
16 #include "axg-fifo.h"
20 * capture frontend DAI. The logic behind this two types of fifo is very
48 struct snd_soc_pcm_runtime *rtd = ss->private_data; in axg_fifo_dai()
64 return dai->dev; in axg_fifo_dev()
67 static void __dma_enable(struct axg_fifo *fifo, bool enable) in __dma_enable() argument
69 regmap_update_bits(fifo->map, FIFO_CTRL0, CTRL0_DMA_EN, in __dma_enable()
76 struct axg_fifo *fifo = axg_fifo_data(ss); in axg_fifo_pcm_trigger() local
82 __dma_enable(fifo, true); in axg_fifo_pcm_trigger()
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/net/
Dibm,emac.txt8 correct clock-frequency property.
13 - device_type : "network"
15 - compatible : compatible list, contains 2 entries, first is
16 "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,
18 "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon",
20 - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ>
21 - reg : <registers mapping>
22 - local-mac-address : 6 bytes, MAC address
23 - mal-device : phandle of the associated McMAL node
24 - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/net/
Dibm,emac.txt8 correct clock-frequency property.
13 - device_type : "network"
15 - compatible : compatible list, contains 2 entries, first is
16 "ibm,emac-CHIP" where CHIP is the host ASIC (440gx,
18 "ibm,emac4". For Axon, thus, we have: "ibm,emac-axon",
20 - interrupts : <interrupt mapping for EMAC IRQ and WOL IRQ>
21 - reg : <registers mapping>
22 - local-mac-address : 6 bytes, MAC address
23 - mal-device : phandle of the associated McMAL node
24 - mal-tx-channel : 1 cell, index of the tx channel on McMAL associated
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/fm10k/
Dfm10k_mbx.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2013 - 2019 Intel Corporation. */
7 * fm10k_fifo_init - Initialize a message FIFO
8 * @fifo: pointer to FIFO
9 * @buffer: pointer to memory to be used to store FIFO
10 * @size: maximum message size to store in FIFO, must be 2^n - 1
12 static void fm10k_fifo_init(struct fm10k_mbx_fifo *fifo, u32 *buffer, u16 size) in fm10k_fifo_init() argument
14 fifo->buffer = buffer; in fm10k_fifo_init()
15 fifo->size = size; in fm10k_fifo_init()
16 fifo->head = 0; in fm10k_fifo_init()
[all …]
/kernel/linux/linux-6.6/drivers/net/ethernet/intel/fm10k/
Dfm10k_mbx.c1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2013 - 2019 Intel Corporation. */
7 * fm10k_fifo_init - Initialize a message FIFO
8 * @fifo: pointer to FIFO
9 * @buffer: pointer to memory to be used to store FIFO
10 * @size: maximum message size to store in FIFO, must be 2^n - 1
12 static void fm10k_fifo_init(struct fm10k_mbx_fifo *fifo, u32 *buffer, u16 size) in fm10k_fifo_init() argument
14 fifo->buffer = buffer; in fm10k_fifo_init()
15 fifo->size = size; in fm10k_fifo_init()
16 fifo->head = 0; in fm10k_fifo_init()
[all …]
/kernel/linux/linux-5.10/arch/powerpc/boot/dts/
Dmpc5121.dtsi1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2007-2008 Freescale Semiconductor Inc.
8 #include <dt-bindings/clock/mpc512x-clock.h>
10 /dts-v1/;
15 #address-cells = <1>;
16 #size-cells = <1>;
17 interrupt-parent = <&ipic>;
25 #address-cells = <1>;
26 #size-cells = <0>;
31 d-cache-line-size = <0x20>; /* 32 bytes */
[all …]
/kernel/linux/linux-6.6/arch/powerpc/boot/dts/
Dmpc5121.dtsi1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2007-2008 Freescale Semiconductor Inc.
8 #include <dt-bindings/clock/mpc512x-clock.h>
10 /dts-v1/;
15 #address-cells = <1>;
16 #size-cells = <1>;
17 interrupt-parent = <&ipic>;
25 #address-cells = <1>;
26 #size-cells = <0>;
31 d-cache-line-size = <0x20>; /* 32 bytes */
[all …]
/kernel/liteos_a/lib/libscrew/src/
Dlos_cir_buf.c2 * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
3 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
38 UINT32 size; in LOS_CirBufUsedSize() local
41 LOS_SpinLockSave(&cirbufCB->lock, &intSave); in LOS_CirBufUsedSize()
42 size = cirbufCB->size - cirbufCB->remain; in LOS_CirBufUsedSize()
43 LOS_SpinUnlockRestore(&cirbufCB->lock, intSave); in LOS_CirBufUsedSize()
45 return size; in LOS_CirBufUsedSize()
55 STATIC UINT32 OsCirBufWriteLinear(CirBuf *cirbufCB, const CHAR *buf, UINT32 size) in OsCirBufWriteLinear() argument
60 cpSize = (cirbufCB->remain < size) ? cirbufCB->remain : size; in OsCirBufWriteLinear()
66 err = memcpy_s(cirbufCB->fifo + cirbufCB->endIdx, cirbufCB->remain, buf, cpSize); in OsCirBufWriteLinear()
[all …]
/kernel/linux/linux-5.10/drivers/net/wimax/i2400m/
Dtx.c3 * Generic (non-bus specific) TX handling
6 * Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
35 * Intel Corporation <linux-wimax@intel.com>
37 * - Initial implementation
39 * Intel Corporation <linux-wimax@intel.com>
40 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
41 * - Rewritten to use a single FIFO to lower the memory allocation
43 * well as splitting out bus-specific code.
47 * software FIFO, as data/control frames can be coalesced (while the
50 * A FIFO is used because at the end it is resource-cheaper that trying
[all …]

12345678910>>...42