Home
last modified time | relevance | path

Searched refs:nents (Results 1 – 5 of 5) sorted by relevance

/lib/
Dsg_pool.c40 static inline unsigned int sg_pool_index(unsigned short nents) in sg_pool_index() argument
44 BUG_ON(nents > SG_CHUNK_SIZE); in sg_pool_index()
46 if (nents <= 8) in sg_pool_index()
49 index = get_count_order(nents) - 3; in sg_pool_index()
54 static void sg_pool_free(struct scatterlist *sgl, unsigned int nents) in sg_pool_free() argument
58 sgp = sg_pools + sg_pool_index(nents); in sg_pool_free()
62 static struct scatterlist *sg_pool_alloc(unsigned int nents, gfp_t gfp_mask) in sg_pool_alloc() argument
66 sgp = sg_pools + sg_pool_index(nents); in sg_pool_alloc()
111 int sg_alloc_table_chained(struct sg_table *table, int nents, in sg_alloc_table_chained() argument
116 BUG_ON(!nents); in sg_alloc_table_chained()
[all …]
Dscatterlist.c47 int nents; in sg_nents() local
48 for (nents = 0; sg; sg = sg_next(sg)) in sg_nents()
49 nents++; in sg_nents()
50 return nents; in sg_nents()
70 int nents; in sg_nents_for_len() local
76 for (nents = 0, total = 0; sg; sg = sg_next(sg)) { in sg_nents_for_len()
77 nents++; in sg_nents_for_len()
80 return nents; in sg_nents_for_len()
101 struct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents) in sg_last() argument
106 for_each_sg(sgl, sg, nents, i) in sg_last()
[all …]
Dsg_split.c13 int nents; member
20 static int sg_calculate_split(struct scatterlist *in, int nents, int nb_splits, in sg_calculate_split() argument
32 splitters[i].nents = 0; in sg_calculate_split()
35 for_each_sg(in, sg, nents, i) { in sg_calculate_split()
48 curr->nents++; in sg_calculate_split()
59 curr->nents = 1; in sg_calculate_split()
86 for (j = 0; j < split->nents; j++, out_sg++) { in sg_split_phys()
112 for (j = 0; j < split->nents; j++, out_sg++) { in sg_split_mapped()
168 splitters[i].out_sg = kmalloc_array(splitters[i].nents, in sg_split()
190 out_mapped_nents[i] = splitters[i].nents; in sg_split()
Dkfifo.c296 int nents, unsigned int len) in setup_sgl_buf() argument
303 if (!nents) in setup_sgl_buf()
323 if (++n == nents || sgl == NULL) in setup_sgl_buf()
335 int nents, unsigned int len, unsigned int off) in setup_sgl() argument
350 n = setup_sgl_buf(sgl, fifo->data + off, nents, l); in setup_sgl()
351 n += setup_sgl_buf(sgl + n, fifo->data, nents - n, len - l); in setup_sgl()
357 struct scatterlist *sgl, int nents, unsigned int len) in __kfifo_dma_in_prepare() argument
365 return setup_sgl(fifo, sgl, nents, len, fifo->in); in __kfifo_dma_in_prepare()
370 struct scatterlist *sgl, int nents, unsigned int len) in __kfifo_dma_out_prepare() argument
378 return setup_sgl(fifo, sgl, nents, len, fifo->out); in __kfifo_dma_out_prepare()
[all …]
/lib/mpi/
Dmpicoder.c261 int nents; in mpi_write_to_sgl() local
269 nents = sg_nents_for_len(sgl, nbytes); in mpi_write_to_sgl()
270 if (nents < 0) in mpi_write_to_sgl()
273 sg_miter_start(&miter, sgl, nents, SG_MITER_ATOMIC | SG_MITER_TO_SG); in mpi_write_to_sgl()