Home
last modified time | relevance | path

Searched refs:sg (Results 1 – 25 of 885) sorted by relevance

12345678910>>...36

/linux/tools/virtio/linux/
A Dscatterlist.h14 #define sg_is_chain(sg) ((sg)->page_link & 0x01) argument
15 #define sg_is_last(sg) ((sg)->page_link & 0x02) argument
16 #define sg_chain_ptr(sg) \ argument
62 sg->offset = offset; in sg_set_page()
63 sg->length = len; in sg_set_page()
78 for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
139 if (sg_is_last(sg)) in sg_next()
142 sg++; in sg_next()
144 sg = sg_chain_ptr(sg); in sg_next()
146 return sg; in sg_next()
[all …]
/linux/drivers/ata/
A Dsata_gemini.c128 if (!sg->sata_bridge) in gemini_sata_bridge_enabled()
147 return sg->muxmode; in gemini_sata_get_muxmode()
327 sg = devm_kzalloc(dev, sizeof(*sg), GFP_KERNEL); in gemini_sata_probe()
328 if (!sg) in gemini_sata_probe()
330 sg->dev = dev; in gemini_sata_probe()
337 if (IS_ERR(sg->base)) in gemini_sata_probe()
354 sg->ide_pins = true; in gemini_sata_probe()
356 if (!sg->sata_bridge && !sg->ide_pins) { in gemini_sata_probe()
372 sg->muxmode = muxmode; in gemini_sata_probe()
388 if (sg->ide_pins) { in gemini_sata_probe()
[all …]
/linux/drivers/clk/sprd/
A Dgate.c24 reg |= sg->enable_mask; in clk_gate_toggle()
26 reg &= ~sg->enable_mask; in clk_gate_toggle()
45 offset = set ? sg->sc_offset : sg->sc_offset * 2; in clk_sc_gate_toggle()
48 sg->enable_mask); in clk_sc_gate_toggle()
55 clk_gate_toggle(sg, false); in sprd_gate_disable()
62 clk_gate_toggle(sg, true); in sprd_gate_enable()
78 clk_sc_gate_toggle(sg, true); in sprd_sc_gate_enable()
87 clk_sc_gate_toggle(sg, true); in sprd_pll_sc_gate_prepare()
88 udelay(sg->udelay); in sprd_pll_sc_gate_prepare()
109 reg ^= sg->enable_mask; in sprd_gate_is_enabled()
[all …]
/linux/include/linux/
A Dscatterlist.h28 #define sg_dma_address(sg) ((sg)->dma_address) argument
31 #define sg_dma_len(sg) ((sg)->dma_length) argument
33 #define sg_dma_len(sg) ((sg)->length) argument
72 #define sg_is_chain(sg) ((sg)->page_link & SG_CHAIN) argument
73 #define sg_is_last(sg) ((sg)->page_link & SG_END) argument
97 BUG_ON(sg_is_chain(sg)); in sg_assign_page()
120 sg->offset = offset; in sg_set_page()
121 sg->length = len; in sg_set_page()
152 for (__i = 0, sg = (sglist); __i < (nr); __i++, sg = sg_next(sg))
243 return page_to_phys(sg_page(sg)) + sg->offset; in sg_phys()
[all …]
/linux/drivers/gpu/drm/i915/
A Di915_scatterlist.c30 sg_set_page(new_sg, sg_page(sg), sg->length, 0); in i915_sg_trim()
75 sg = st->sgl; in i915_sg_from_mm_node()
86 sg = __sg_next(sg); in i915_sg_from_mm_node()
89 sg_dma_len(sg) = 0; in i915_sg_from_mm_node()
90 sg->length = 0; in i915_sg_from_mm_node()
95 sg->length += len; in i915_sg_from_mm_node()
104 sg_mark_end(sg); in i915_sg_from_mm_node()
147 sg = st->sgl; in i915_sg_from_buddy_resource()
162 sg = __sg_next(sg); in i915_sg_from_buddy_resource()
166 sg->length = 0; in i915_sg_from_buddy_resource()
[all …]
A Di915_scatterlist.h51 return sg->length >> PAGE_SHIFT; in __sg_page_count()
56 return sg_dma_len(sg) >> PAGE_SHIFT; in __sg_dma_page_count()
61 ++sg; in ____sg_next()
62 if (unlikely(sg_is_chain(sg))) in ____sg_next()
63 sg = sg_chain_ptr(sg); in ____sg_next()
64 return sg; in ____sg_next()
78 return sg_is_last(sg) ? NULL : ____sg_next(sg); in __sg_next()
120 while (sg && sg_dma_len(sg)) { in i915_sg_dma_sizes()
121 GEM_BUG_ON(sg->offset); in i915_sg_dma_sizes()
123 page_sizes |= sg_dma_len(sg); in i915_sg_dma_sizes()
[all …]
/linux/Documentation/scsi/
A Dscsi-generic.rst4 Notes on Linux SCSI Generic (sg) driver
23 Major versions of the sg driver
46 - http://sg.danny.cz/sg/p/sg_v3_ho.html
49 be found at http://sg.danny.cz/sg/. A larger version
50 is at: http://sg.danny.cz/sg/p/scsi-generic_long.txt.
77 capabilities. They can be found at: http://sg.danny.cz/sg/sg3_utils.html and
87 of the sg driver:
89 - lk 2.4.0 : sg version 3.1.17
90 - lk 2.4.7 : sg version 3.1.19
98 new version of the sg driver:
[all …]
/linux/drivers/crypto/
A Domap-crypto.c20 int n = sg_nents(*sg); in omap_crypto_copy_sg_lists()
33 while (*sg && total) { in omap_crypto_copy_sg_lists()
41 sg_set_page(tmp, sg_page(*sg), len, (*sg)->offset); in omap_crypto_copy_sg_lists()
47 *sg = sg_next(*sg); in omap_crypto_copy_sg_lists()
50 *sg = new_sg; in omap_crypto_copy_sg_lists()
83 *sg = new_sg; in omap_crypto_copy_sgs()
97 while (sg) { in omap_crypto_check_sg()
109 len += sg->length; in omap_crypto_check_sg()
110 sg = sg_next(sg); in omap_crypto_check_sg()
150 sg_set_buf(new_sg, sg_virt(*sg), (*sg)->length); in omap_crypto_align_sg()
[all …]
/linux/lib/
A Dscatterlist.c28 sg++; in sg_next()
30 sg = sg_chain_ptr(sg); in sg_next()
32 return sg; in sg_next()
48 for (nents = 0; sg; sg = sg_next(sg)) in sg_nents()
76 for (nents = 0, total = 0; sg; sg = sg_next(sg)) { in sg_nents_for_len()
107 ret = sg; in sg_last()
635 sg = sg_next(sg); in sgl_alloc_order()
739 piter->sg = sg_next(piter->sg); in __sg_page_iter_next()
765 piter->sg = sg_next(piter->sg); in __sg_page_iter_dma_next()
805 sg = miter->piter.sg; in sg_miter_get_next_page()
[all …]
/linux/arch/s390/mm/
A Dgmap.c248 gmap_put(sg); in gmap_remove()
1564 if (sg->removed) in gmap_unshadow()
1566 sg->removed = 1; in gmap_unshadow()
1602 if (sg->orig_asce != asce || sg->edat_level != edat_level || in gmap_find_shadow()
1608 return sg; in gmap_find_shadow()
1629 return sg->orig_asce == asce && sg->edat_level == edat_level; in gmap_shadow_valid()
1660 if (sg) in gmap_shadow()
1661 return sg; in gmap_shadow()
1677 if (sg) { in gmap_shadow()
1680 return sg; in gmap_shadow()
[all …]
/linux/drivers/net/ethernet/marvell/octeontx2/nic/
A Dotx2_txrx.c116 sg = &sq->sg[snd_comp->sqe_id]; in otx2_xdp_snd_pkt_handler()
143 sg = &sq->sg[snd_comp->sqe_id]; in otx2_snd_pkt_handler()
250 struct nix_rx_sg_s *sg = &cqe->sg; in otx2_free_rcv_seg() local
337 struct nix_rx_sg_s *sg = &cqe->sg; in otx2_rcv_pkt_handler() local
565 iova = (void *)sg + sizeof(*sg); in otx2_sqe_add_sg()
730 struct sg_list *sg = &sq->sg[sqe]; in otx2_dma_map_tso_skb() local
749 sg->size[sg->num_segs] = len; in otx2_dma_map_tso_skb()
762 struct sg_list *sg = &sq->sg[sqe]; in otx2_tso_frag_dma_addr() local
792 iova = (void *)sg + sizeof(*sg); in otx2_sqe_tso_add_sg()
1068 sg = &sq->sg[cqe->comp.sqe_id]; in otx2_cleanup_tx_cqes()
[all …]
/linux/include/soc/fsl/
A Ddpaa2-fd.h311 return (dma_addr_t)le64_to_cpu(sg->addr); in dpaa2_sg_get_addr()
321 sg->addr = cpu_to_le64(addr); in dpaa2_sg_set_addr()
338 if (dpaa2_sg_short_len(sg)) in dpaa2_sg_get_len()
339 return le32_to_cpu(sg->len) & SG_SHORT_LEN_MASK; in dpaa2_sg_get_len()
341 return le32_to_cpu(sg->len); in dpaa2_sg_get_len()
351 sg->len = cpu_to_le32(len); in dpaa2_sg_set_len()
373 sg->format_offset &= cpu_to_le16(~SG_OFFSET_MASK); in dpaa2_sg_set_offset()
374 sg->format_offset |= cpu_to_le16(offset); in dpaa2_sg_set_offset()
410 return le16_to_cpu(sg->bpid) & SG_BPID_MASK; in dpaa2_sg_get_bpid()
420 sg->bpid &= cpu_to_le16(~(SG_BPID_MASK)); in dpaa2_sg_set_bpid()
[all …]
/linux/net/core/
A Dskmsg.c14 if (msg->sg.end > msg->sg.start && in sk_msg_try_coalesce_ok()
18 if (msg->sg.end < msg->sg.start && in sk_msg_try_coalesce_ok()
60 sge = &msg->sg.data[msg->sg.end]; in sk_msg_alloc()
277 if (msg->sg.curr == i && msg->sg.copybreak > msg->sg.data[i].length) in sk_msg_trim()
278 msg->sg.copybreak = msg->sg.data[i].length; in sk_msg_trim()
290 msg->sg.curr = msg->sg.start; in sk_msg_trim()
293 sk_msg_iter_dist(msg->sg.start, msg->sg.end)) { in sk_msg_trim()
296 msg->sg.copybreak = msg->sg.data[i].length; in sk_msg_trim()
331 sg_set_page(&msg->sg.data[msg->sg.end], in sk_msg_zerocopy_from_iter()
333 sg_unmark_end(&msg->sg.data[msg->sg.end]); in sk_msg_zerocopy_from_iter()
[all …]
/linux/include/crypto/
A Dscatterwalk.h20 struct scatterlist *sg, int num) in scatterwalk_crypto_chain() argument
22 if (sg) in scatterwalk_crypto_chain()
23 sg_chain(head, num, sg); in scatterwalk_crypto_chain()
30 unsigned int len = walk->sg->offset + walk->sg->length - walk->offset; in scatterwalk_pagelen()
56 return sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT); in scatterwalk_page()
65 struct scatterlist *sg) in scatterwalk_start() argument
67 walk->sg = sg; in scatterwalk_start()
68 walk->offset = sg->offset; in scatterwalk_start()
87 if (more && walk->offset >= walk->sg->offset + walk->sg->length) in scatterwalk_pagedone()
88 scatterwalk_start(walk, sg_next(walk->sg)); in scatterwalk_pagedone()
[all …]
/linux/drivers/dma/
A Ddma-axi-dmac.c225 sg = &desc->sg[desc->num_submitted]; in axi_dmac_start_transfer()
285 return sg->x_len * sg->y_len; in axi_dmac_total_sg_bytes()
305 sg = &desc->sg[i]; in axi_dmac_dequeue_partial_xfers()
352 sg = &active->sg[i]; in axi_dmac_compute_residue()
374 sg = &active->sg[active->num_completed]; in axi_dmac_transfer_done()
516 sg->y_len = 1; in axi_dmac_fill_linear_sg()
517 sg++; in axi_dmac_fill_linear_sg()
527 sg->y_len = 1; in axi_dmac_fill_linear_sg()
528 sg++; in axi_dmac_fill_linear_sg()
532 return sg; in axi_dmac_fill_linear_sg()
[all …]
/linux/samples/kfifo/
A Ddma-example.c26 struct scatterlist sg[10]; in example_init() local
62 sg_init_table(sg, ARRAY_SIZE(sg)); in example_init()
63 nents = kfifo_dma_in_prepare(&fifo, sg, ARRAY_SIZE(sg), FIFO_SIZE); in example_init()
77 i, sg_page(&sg[i]), sg[i].offset, sg[i].length); in example_init()
79 if (sg_is_last(&sg[i])) in example_init()
93 nents = kfifo_dma_out_prepare(&fifo, sg, ARRAY_SIZE(sg), 8); in example_init()
106 i, sg_page(&sg[i]), sg[i].offset, sg[i].length); in example_init()
108 if (sg_is_last(&sg[i])) in example_init()
/linux/drivers/media/pci/tw68/
A Dtw68-risc.c38 struct scatterlist *sg; in tw68_risc_field() local
54 sg = sglist; in tw68_risc_field()
58 offset -= sg_dma_len(sg); in tw68_risc_field()
59 sg = sg_next(sg); in tw68_risc_field()
76 done = (sg_dma_len(sg) - offset); in tw68_risc_field()
82 sg = sg_next(sg); in tw68_risc_field()
84 while (todo > sg_dma_len(sg)) { in tw68_risc_field()
87 sg_dma_len(sg)); in tw68_risc_field()
89 todo -= sg_dma_len(sg); in tw68_risc_field()
90 sg = sg_next(sg); in tw68_risc_field()
[all …]
/linux/tools/testing/selftests/bpf/progs/
A Dloop6.c34 #define sg_is_chain(sg) ((sg)->page_link & SG_CHAIN) argument
35 #define sg_is_last(sg) ((sg)->page_link & SG_END) argument
36 #define sg_chain_ptr(sg) \ argument
37 ((struct scatterlist *) ((sg)->page_link & ~(SG_CHAIN | SG_END)))
41 struct scatterlist sg; in __sg_next() local
43 bpf_probe_read_kernel(&sg, sizeof(sg), sgp); in __sg_next()
44 if (sg_is_last(&sg)) in __sg_next()
49 bpf_probe_read_kernel(&sg, sizeof(sg), sgp); in __sg_next()
50 if (sg_is_chain(&sg)) in __sg_next()
51 sgp = sg_chain_ptr(&sg); in __sg_next()
/linux/net/mac80211/
A Daead_api.c22 struct scatterlist sg[3]; in aead_encrypt() local
35 sg_init_table(sg, 3); in aead_encrypt()
36 sg_set_buf(&sg[0], __aad, aad_len); in aead_encrypt()
37 sg_set_buf(&sg[1], data, data_len); in aead_encrypt()
38 sg_set_buf(&sg[2], mic, mic_len); in aead_encrypt()
41 aead_request_set_crypt(aead_req, sg, sg, data_len, b_0); in aead_encrypt()
54 struct scatterlist sg[3]; in aead_decrypt() local
70 sg_init_table(sg, 3); in aead_decrypt()
71 sg_set_buf(&sg[0], __aad, aad_len); in aead_decrypt()
73 sg_set_buf(&sg[2], mic, mic_len); in aead_decrypt()
[all …]
A Daes_gmac.c20 struct scatterlist sg[5]; in ieee80211_aes_gmac() local
41 sg_init_table(sg, 5); in ieee80211_aes_gmac()
42 sg_set_buf(&sg[0], __aad, GMAC_AAD_LEN); in ieee80211_aes_gmac()
43 sg_set_buf(&sg[1], zero, 8); in ieee80211_aes_gmac()
45 sg_set_buf(&sg[3], zero, GMAC_MIC_LEN); in ieee80211_aes_gmac()
46 sg_set_buf(&sg[4], mic, GMAC_MIC_LEN); in ieee80211_aes_gmac()
48 sg_init_table(sg, 4); in ieee80211_aes_gmac()
49 sg_set_buf(&sg[0], __aad, GMAC_AAD_LEN); in ieee80211_aes_gmac()
51 sg_set_buf(&sg[2], zero, GMAC_MIC_LEN); in ieee80211_aes_gmac()
52 sg_set_buf(&sg[3], mic, GMAC_MIC_LEN); in ieee80211_aes_gmac()
[all …]
/linux/drivers/target/iscsi/cxgbit/
A Dcxgbit_ddp.c21 if (sg) { in cxgbit_set_one_ppod()
27 if (sg) { in cxgbit_set_one_ppod()
32 sg = sg_next(sg); in cxgbit_set_one_ppod()
33 if (sg) { in cxgbit_set_one_ppod()
48 *sg_pp = sg; in cxgbit_set_one_ppod()
54 if (sg) { in cxgbit_set_one_ppod()
55 sg = sg_next(sg); in cxgbit_set_one_ppod()
56 if (sg) in cxgbit_set_one_ppod()
158 for (i = 0; i < nents; i++, sg = sg_next(sg)) { in cxgbit_ddp_sgl_check()
159 unsigned int len = sg->length + sg->offset; in cxgbit_ddp_sgl_check()
[all …]
/linux/drivers/crypto/gemini/
A Dsl3516-ce-cipher.c28 struct scatterlist *sg; in sl3516_ce_need_fallback() local
49 sg = areq->src; in sl3516_ce_need_fallback()
50 while (sg) { in sl3516_ce_need_fallback()
63 sg = sg_next(sg); in sl3516_ce_need_fallback()
65 sg = areq->dst; in sl3516_ce_need_fallback()
66 while (sg) { in sl3516_ce_need_fallback()
79 sg = sg_next(sg); in sl3516_ce_need_fallback()
177 sg = areq->src; in sl3516_ce_cipher()
189 sg = sg_next(sg); in sl3516_ce_cipher()
199 sg = areq->dst; in sl3516_ce_cipher()
[all …]
/linux/arch/alpha/kernel/
A Dpci_iommu.c491 leader = sg; in sg_classify()
498 for (++sg; sg < end; ++sg) { in sg_classify()
517 leader = sg; in sg_classify()
596 sg = leader; in sg_fill()
605 while (sg+1 < end && (int) sg[1].dma_address == -1) { in sg_fill()
607 sg = sg_next(sg); in sg_fill()
626 } while (++sg < end && (int) sg->dma_address < 0); in sg_fill()
648 sg->dma_length = sg->length; in alpha_pci_map_sg()
657 start = sg; in alpha_pci_map_sg()
678 for (out = sg; sg < end; ++sg) { in alpha_pci_map_sg()
[all …]
/linux/drivers/gpu/drm/i915/gem/
A Di915_gem_internal.c22 struct scatterlist *sg; in internal_free_pages() local
24 for (sg = st->sgl; sg; sg = __sg_next(sg)) { in internal_free_pages()
25 if (sg_page(sg)) in internal_free_pages()
26 __free_pages(sg_page(sg), get_order(sg->length)); in internal_free_pages()
37 struct scatterlist *sg; in i915_gem_object_get_pages_internal() local
75 sg = st->sgl; in i915_gem_object_get_pages_internal()
95 sg_set_page(sg, page, PAGE_SIZE << order, 0); in i915_gem_object_get_pages_internal()
101 sg_mark_end(sg); in i915_gem_object_get_pages_internal()
105 sg = __sg_next(sg); in i915_gem_object_get_pages_internal()
123 sg_set_page(sg, NULL, 0, 0); in i915_gem_object_get_pages_internal()
[all …]
/linux/crypto/
A Daf_alg.c439 sg_chain(sgl_prev->sg, sgl_prev->npages + 1, sgl_new->sg); in af_alg_link_sg()
506 sg = sgl->sg; in af_alg_alloc_tsgl()
518 if (sg) in af_alg_alloc_tsgl()
519 sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg); in af_alg_alloc_tsgl()
550 const struct scatterlist *sg = sgl->sg; in af_alg_count_tsgl() local
606 sg = sgl->sg; in af_alg_pull_tsgl()
894 sg = sgl->sg + sgl->cur - 1; in af_alg_sendmsg()
896 PAGE_SIZE - sg->offset - sg->length); in af_alg_sendmsg()
899 sg->offset + sg->length, in af_alg_sendmsg()
905 ctx->merge = (sg->offset + sg->length) & in af_alg_sendmsg()
[all …]

Completed in 102 milliseconds

12345678910>>...36