/kernel/linux/linux-5.10/tools/virtio/linux/ |
H A D | scatterlist.h | 15 #define sg_is_chain(sg) ((sg)->page_link & 0x01) 16 #define sg_is_last(sg) ((sg)->page_link & 0x02) 17 #define sg_chain_ptr(sg) \ 18 ((struct scatterlist *) ((sg)->page_link & ~0x03)) 22 * @sg: SG entry 26 * Assign page to sg entry. Also see sg_set_page(), the most commonly used 30 static inline void sg_assign_page(struct scatterlist *sg, struct page *page) in sg_assign_page() argument 32 unsigned long page_link = sg in sg_assign_page() 59 sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset) sg_set_page() argument 67 sg_page(struct scatterlist *sg) sg_page() argument 116 sg_mark_end(struct scatterlist *sg) sg_mark_end() argument 133 sg_unmark_end(struct scatterlist *sg) sg_unmark_end() argument 138 sg_next(struct scatterlist *sg) sg_next() argument 156 sg_phys(struct scatterlist *sg) sg_phys() argument 161 sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen) sg_set_buf() argument 167 sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) sg_init_one() argument [all...] |
/kernel/linux/linux-6.6/tools/virtio/linux/ |
H A D | scatterlist.h | 15 #define sg_is_chain(sg) ((sg)->page_link & 0x01) 16 #define sg_is_last(sg) ((sg)->page_link & 0x02) 17 #define sg_chain_ptr(sg) \ 18 ((struct scatterlist *) ((sg)->page_link & ~0x03)) 22 * @sg: SG entry 26 * Assign page to sg entry. Also see sg_set_page(), the most commonly used 30 static inline void sg_assign_page(struct scatterlist *sg, struct page *page) in sg_assign_page() argument 32 unsigned long page_link = sg in sg_assign_page() 59 sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset) sg_set_page() argument 67 sg_page(struct scatterlist *sg) sg_page() argument 116 sg_mark_end(struct scatterlist *sg) sg_mark_end() argument 133 sg_unmark_end(struct scatterlist *sg) sg_unmark_end() argument 138 sg_next(struct scatterlist *sg) sg_next() argument 156 sg_phys(struct scatterlist *sg) sg_phys() argument 161 sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen) sg_set_buf() argument 167 sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) sg_init_one() argument [all...] |
/kernel/linux/linux-5.10/drivers/ata/ |
H A D | sata_gemini.c | 126 bool gemini_sata_bridge_enabled(struct sata_gemini *sg, bool is_ata1) in gemini_sata_bridge_enabled() argument 128 if (!sg->sata_bridge) in gemini_sata_bridge_enabled() 134 if ((sg->muxmode == GEMINI_MUXMODE_2) && in gemini_sata_bridge_enabled() 137 if ((sg->muxmode == GEMINI_MUXMODE_3) && in gemini_sata_bridge_enabled() 145 enum gemini_muxmode gemini_sata_get_muxmode(struct sata_gemini *sg) in gemini_sata_get_muxmode() argument 147 return sg->muxmode; in gemini_sata_get_muxmode() 151 static int gemini_sata_setup_bridge(struct sata_gemini *sg, in gemini_sata_setup_bridge() argument 161 if (sg->muxmode == GEMINI_MUXMODE_2) in gemini_sata_setup_bridge() 163 writel(val, sg->base + GEMINI_SATA0_CTRL); in gemini_sata_setup_bridge() 167 if (sg in gemini_sata_setup_bridge() 195 gemini_sata_start_bridge(struct sata_gemini *sg, unsigned int bridge) gemini_sata_start_bridge() argument 216 gemini_sata_stop_bridge(struct sata_gemini *sg, unsigned int bridge) gemini_sata_stop_bridge() argument 225 gemini_sata_reset_bridge(struct sata_gemini *sg, unsigned int bridge) gemini_sata_reset_bridge() argument 237 gemini_sata_bridge_init(struct sata_gemini *sg) gemini_sata_bridge_init() argument 319 struct sata_gemini *sg; gemini_sata_probe() local 410 struct sata_gemini *sg = platform_get_drvdata(pdev); gemini_sata_remove() local [all...] |
/kernel/linux/linux-6.6/drivers/ata/ |
H A D | sata_gemini.c | 125 bool gemini_sata_bridge_enabled(struct sata_gemini *sg, bool is_ata1) in gemini_sata_bridge_enabled() argument 127 if (!sg->sata_bridge) in gemini_sata_bridge_enabled() 133 if ((sg->muxmode == GEMINI_MUXMODE_2) && in gemini_sata_bridge_enabled() 136 if ((sg->muxmode == GEMINI_MUXMODE_3) && in gemini_sata_bridge_enabled() 144 enum gemini_muxmode gemini_sata_get_muxmode(struct sata_gemini *sg) in gemini_sata_get_muxmode() argument 146 return sg->muxmode; in gemini_sata_get_muxmode() 150 static int gemini_sata_setup_bridge(struct sata_gemini *sg, in gemini_sata_setup_bridge() argument 160 if (sg->muxmode == GEMINI_MUXMODE_2) in gemini_sata_setup_bridge() 162 writel(val, sg->base + GEMINI_SATA0_CTRL); in gemini_sata_setup_bridge() 166 if (sg in gemini_sata_setup_bridge() 194 gemini_sata_start_bridge(struct sata_gemini *sg, unsigned int bridge) gemini_sata_start_bridge() argument 215 gemini_sata_stop_bridge(struct sata_gemini *sg, unsigned int bridge) gemini_sata_stop_bridge() argument 224 gemini_sata_reset_bridge(struct sata_gemini *sg, unsigned int bridge) gemini_sata_reset_bridge() argument 236 gemini_sata_bridge_init(struct sata_gemini *sg) gemini_sata_bridge_init() argument 318 struct sata_gemini *sg; gemini_sata_probe() local 404 struct sata_gemini *sg = platform_get_drvdata(pdev); gemini_sata_remove() local [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | scatterlist.h | 27 * You should only work with the number of sg entries dma_map_sg 28 * returns, or alternatively stop on the first sg_dma_len(sg) which 31 #define sg_dma_address(sg) ((sg)->dma_address) 34 #define sg_dma_len(sg) ((sg)->dma_length) 36 #define sg_dma_len(sg) ((sg)->length) 55 * the page pointer AND encode information about the sg table as well. The two 58 * If bit 0 is set, then the page_link contains a pointer to the next sg 77 __sg_flags(struct scatterlist *sg) __sg_flags() argument 82 sg_chain_ptr(struct scatterlist *sg) sg_chain_ptr() argument 87 sg_is_chain(struct scatterlist *sg) sg_is_chain() argument 92 sg_is_last(struct scatterlist *sg) sg_is_last() argument 107 sg_assign_page(struct scatterlist *sg, struct page *page) sg_assign_page() argument 136 sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset) sg_set_page() argument 158 sg_set_folio(struct scatterlist *sg, struct folio *folio, size_t len, size_t offset) sg_set_folio() argument 168 sg_page(struct scatterlist *sg) sg_page() argument 183 sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen) sg_set_buf() argument 253 sg_mark_end(struct scatterlist *sg) sg_mark_end() argument 270 sg_unmark_end(struct scatterlist *sg) sg_unmark_end() argument 295 sg_dma_is_bus_address(struct scatterlist *sg) sg_dma_is_bus_address() argument 310 sg_dma_mark_bus_address(struct scatterlist *sg) sg_dma_mark_bus_address() argument 322 sg_dma_unmark_bus_address(struct scatterlist *sg) sg_dma_unmark_bus_address() argument 337 sg_dma_is_swiotlb(struct scatterlist *sg) sg_dma_is_swiotlb() argument 350 sg_dma_mark_swiotlb(struct scatterlist *sg) sg_dma_mark_swiotlb() argument 357 sg_dma_is_bus_address(struct scatterlist *sg) sg_dma_is_bus_address() argument 361 sg_dma_mark_bus_address(struct scatterlist *sg) sg_dma_mark_bus_address() argument 364 sg_dma_unmark_bus_address(struct scatterlist *sg) sg_dma_unmark_bus_address() argument 367 sg_dma_is_swiotlb(struct scatterlist *sg) sg_dma_is_swiotlb() argument 371 sg_dma_mark_swiotlb(struct scatterlist *sg) sg_dma_mark_swiotlb() argument 387 sg_phys(struct scatterlist *sg) sg_phys() argument 402 sg_virt(struct scatterlist *sg) sg_virt() argument 551 struct scatterlist *sg; /* sg holding the page */ global() member [all...] |
/kernel/linux/linux-5.10/drivers/clk/sprd/ |
H A D | gate.c | 13 static void clk_gate_toggle(const struct sprd_gate *sg, bool en) in clk_gate_toggle() argument 15 const struct sprd_clk_common *common = &sg->common; in clk_gate_toggle() 17 bool set = sg->flags & CLK_GATE_SET_TO_DISABLE ? true : false; in clk_gate_toggle() 24 reg |= sg->enable_mask; in clk_gate_toggle() 26 reg &= ~sg->enable_mask; in clk_gate_toggle() 31 static void clk_sc_gate_toggle(const struct sprd_gate *sg, bool en) in clk_sc_gate_toggle() argument 33 const struct sprd_clk_common *common = &sg->common; in clk_sc_gate_toggle() 34 bool set = sg->flags & CLK_GATE_SET_TO_DISABLE ? 1 : 0; in clk_sc_gate_toggle() 45 offset = set ? sg->sc_offset : sg in clk_sc_gate_toggle() 53 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_gate_disable() local 60 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_gate_enable() local 69 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_sc_gate_disable() local 76 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_sc_gate_enable() local 85 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_pll_sc_gate_prepare() local 95 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_gate_is_enabled() local [all...] |
/kernel/linux/linux-6.6/drivers/clk/sprd/ |
H A D | gate.c | 13 static void clk_gate_toggle(const struct sprd_gate *sg, bool en) in clk_gate_toggle() argument 15 const struct sprd_clk_common *common = &sg->common; in clk_gate_toggle() 17 bool set = sg->flags & CLK_GATE_SET_TO_DISABLE ? true : false; in clk_gate_toggle() 24 reg |= sg->enable_mask; in clk_gate_toggle() 26 reg &= ~sg->enable_mask; in clk_gate_toggle() 31 static void clk_sc_gate_toggle(const struct sprd_gate *sg, bool en) in clk_sc_gate_toggle() argument 33 const struct sprd_clk_common *common = &sg->common; in clk_sc_gate_toggle() 34 bool set = sg->flags & CLK_GATE_SET_TO_DISABLE ? 1 : 0; in clk_sc_gate_toggle() 45 offset = set ? sg->sc_offset : sg in clk_sc_gate_toggle() 53 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_gate_disable() local 60 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_gate_enable() local 69 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_sc_gate_disable() local 76 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_sc_gate_enable() local 85 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_pll_sc_gate_prepare() local 95 struct sprd_gate *sg = hw_to_sprd_gate(hw); sprd_gate_is_enabled() local [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | scatterlist.h | 30 * You should only work with the number of sg entries dma_map_sg 31 * returns, or alternatively stop on the first sg_dma_len(sg) which 34 #define sg_dma_address(sg) ((sg)->dma_address) 37 #define sg_dma_len(sg) ((sg)->dma_length) 39 #define sg_dma_len(sg) ((sg)->length) 52 * the page pointer AND encode information about the sg table as well. The two 55 * If bit 0 is set, then the page_link contains a pointer to the next sg 87 sg_assign_page(struct scatterlist *sg, struct page *page) sg_assign_page() argument 116 sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset) sg_set_page() argument 124 sg_page(struct scatterlist *sg) sg_page() argument 139 sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen) sg_set_buf() argument 209 sg_mark_end(struct scatterlist *sg) sg_mark_end() argument 226 sg_unmark_end(struct scatterlist *sg) sg_unmark_end() argument 241 sg_phys(struct scatterlist *sg) sg_phys() argument 256 sg_virt(struct scatterlist *sg) sg_virt() argument 373 struct scatterlist *sg; /* sg holding the page */ global() member [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/i915/ |
H A D | i915_scatterlist.c | 18 struct scatterlist *sg, *new_sg; in i915_sg_trim() local 28 for_each_sg(orig_st->sgl, sg, orig_st->nents, i) { in i915_sg_trim() 29 sg_set_page(new_sg, sg_page(sg), sg->length, 0); in i915_sg_trim() 30 sg_dma_address(new_sg) = sg_dma_address(sg); in i915_sg_trim() 31 sg_dma_len(new_sg) = sg_dma_len(sg); in i915_sg_trim() 70 * @region_start: An offset to add to the dma addresses of the sg list. 71 * @page_alignment: Required page alignment for each sg entry. Power of two. 89 struct scatterlist *sg; in i915_rsgt_from_mm_node() local 112 sg in i915_rsgt_from_mm_node() 174 struct scatterlist *sg; i915_rsgt_from_buddy_resource() local [all...] |
H A D | i915_scatterlist.h | 50 static inline int __sg_page_count(const struct scatterlist *sg) in __sg_page_count() argument 52 return sg->length >> PAGE_SHIFT; in __sg_page_count() 55 static inline int __sg_dma_page_count(const struct scatterlist *sg) in __sg_dma_page_count() argument 57 return sg_dma_len(sg) >> PAGE_SHIFT; in __sg_dma_page_count() 60 static inline struct scatterlist *____sg_next(struct scatterlist *sg) in ____sg_next() argument 62 ++sg; in ____sg_next() 63 if (unlikely(sg_is_chain(sg))) in ____sg_next() 64 sg = sg_chain_ptr(sg); in ____sg_next() 65 return sg; in ____sg_next() 77 __sg_next(struct scatterlist *sg) __sg_next() argument 116 i915_sg_dma_sizes(struct scatterlist *sg) i915_sg_dma_sizes() argument [all...] |
/kernel/linux/linux-5.10/drivers/crypto/ |
H A D | omap-crypto.c | 17 struct scatterlist **sg, in omap_crypto_copy_sg_lists() 20 int n = sg_nents(*sg); in omap_crypto_copy_sg_lists() 24 new_sg = kmalloc_array(n, sizeof(*sg), GFP_KERNEL); in omap_crypto_copy_sg_lists() 33 while (*sg && total) { in omap_crypto_copy_sg_lists() 34 int len = (*sg)->length; 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 in omap_crypto_copy_sg_lists() 16 omap_crypto_copy_sg_lists(int total, int bs, struct scatterlist **sg, struct scatterlist *new_sg, u16 flags) omap_crypto_copy_sg_lists() argument 55 omap_crypto_copy_sgs(int total, int bs, struct scatterlist **sg, struct scatterlist *new_sg, u16 flags) omap_crypto_copy_sgs() argument 88 omap_crypto_check_sg(struct scatterlist *sg, int total, int bs, u16 flags) omap_crypto_check_sg() argument 125 omap_crypto_align_sg(struct scatterlist **sg, int total, int bs, struct scatterlist *new_sg, u16 flags, u8 flags_shift, unsigned long *dd_flags) omap_crypto_align_sg() argument 198 omap_crypto_cleanup(struct scatterlist *sg, struct scatterlist *orig, int offset, int len, u8 flags_shift, unsigned long flags) omap_crypto_cleanup() argument [all...] |
/kernel/linux/linux-6.6/drivers/crypto/ |
H A D | omap-crypto.c | 17 struct scatterlist **sg, in omap_crypto_copy_sg_lists() 20 int n = sg_nents(*sg); in omap_crypto_copy_sg_lists() 24 new_sg = kmalloc_array(n, sizeof(*sg), GFP_KERNEL); in omap_crypto_copy_sg_lists() 33 while (*sg && total) { in omap_crypto_copy_sg_lists() 34 int len = (*sg)->length; 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 in omap_crypto_copy_sg_lists() 16 omap_crypto_copy_sg_lists(int total, int bs, struct scatterlist **sg, struct scatterlist *new_sg, u16 flags) omap_crypto_copy_sg_lists() argument 55 omap_crypto_copy_sgs(int total, int bs, struct scatterlist **sg, struct scatterlist *new_sg, u16 flags) omap_crypto_copy_sgs() argument 88 omap_crypto_check_sg(struct scatterlist *sg, int total, int bs, u16 flags) omap_crypto_check_sg() argument 125 omap_crypto_align_sg(struct scatterlist **sg, int total, int bs, struct scatterlist *new_sg, u16 flags, u8 flags_shift, unsigned long *dd_flags) omap_crypto_align_sg() argument 197 omap_crypto_cleanup(struct scatterlist *sg, struct scatterlist *orig, int offset, int len, u8 flags_shift, unsigned long flags) omap_crypto_cleanup() argument [all...] |
/kernel/linux/linux-5.10/lib/ |
H A D | scatterlist.c | 15 * @sg: The current sg entry 18 * Usually the next entry will be @sg@ + 1, but if this sg element is part 23 struct scatterlist *sg_next(struct scatterlist *sg) in sg_next() argument 25 if (sg_is_last(sg)) in sg_next() 28 sg++; in sg_next() 29 if (unlikely(sg_is_chain(sg))) in sg_next() 30 sg = sg_chain_ptr(sg); in sg_next() 45 sg_nents(struct scatterlist *sg) sg_nents() argument 68 sg_nents_for_len(struct scatterlist *sg, u64 len) sg_nents_for_len() argument 103 struct scatterlist *sg, *ret = NULL; sg_last() local 138 sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) sg_init_one() argument 169 sg_kfree(struct scatterlist *sg, unsigned int nents) sg_kfree() argument 271 struct scatterlist *sg, *prv; __sg_alloc_table() local 571 struct scatterlist *sgl, *sg; sgl_alloc_order() local 643 struct scatterlist *sg; sgl_free_n_order() local 693 sg_page_count(struct scatterlist *sg) sg_page_count() argument 717 sg_dma_page_count(struct scatterlist *sg) sg_dma_page_count() argument 769 struct scatterlist *sg; sg_miter_get_next_page() local [all...] |
/kernel/linux/linux-5.10/arch/s390/mm/ |
H A D | gmap.c | 241 struct gmap *sg, *next; in gmap_remove() local 247 list_for_each_entry_safe(sg, next, &gmap->children, list) { in gmap_remove() 248 list_del(&sg->list); in gmap_remove() 249 gmap_put(sg); in gmap_remove() 957 * Expected to be called with sg->mm->mmap_lock in read and 1003 * Expected to be called with sg->mm->mmap_lock in read 1039 * Called with sg->mm->mmap_lock in read. 1172 * @sg: pointer to the shadow guest address space structure 1176 * Called with the sg->guest_table_lock 1178 static inline void gmap_insert_rmap(struct gmap *sg, unsigne argument 1206 gmap_protect_rmap(struct gmap *sg, unsigned long raddr, unsigned long paddr, unsigned long len) gmap_protect_rmap() argument 1287 gmap_unshadow_page(struct gmap *sg, unsigned long raddr) gmap_unshadow_page() argument 1307 __gmap_unshadow_pgt(struct gmap *sg, unsigned long raddr, unsigned long *pgt) __gmap_unshadow_pgt() argument 1324 gmap_unshadow_pgt(struct gmap *sg, unsigned long raddr) gmap_unshadow_pgt() argument 1353 __gmap_unshadow_sgt(struct gmap *sg, unsigned long raddr, unsigned long *sgt) __gmap_unshadow_sgt() argument 1381 gmap_unshadow_sgt(struct gmap *sg, unsigned long raddr) gmap_unshadow_sgt() argument 1410 __gmap_unshadow_r3t(struct gmap *sg, unsigned long raddr, unsigned long *r3t) __gmap_unshadow_r3t() argument 1438 gmap_unshadow_r3t(struct gmap *sg, unsigned long raddr) gmap_unshadow_r3t() argument 1467 __gmap_unshadow_r2t(struct gmap *sg, unsigned long raddr, unsigned long *r2t) __gmap_unshadow_r2t() argument 1495 gmap_unshadow_r2t(struct gmap *sg, unsigned long raddr) gmap_unshadow_r2t() argument 1524 __gmap_unshadow_r1t(struct gmap *sg, unsigned long raddr, unsigned long *r1t) __gmap_unshadow_r1t() argument 1554 gmap_unshadow(struct gmap *sg) gmap_unshadow() argument 1594 struct gmap *sg; gmap_find_shadow() local 1620 gmap_shadow_valid(struct gmap *sg, unsigned long asce, int edat_level) gmap_shadow_valid() argument 1646 struct gmap *sg, *new; gmap_shadow() local 1735 gmap_shadow_r2t(struct gmap *sg, unsigned long saddr, unsigned long r2t, int fake) gmap_shadow_r2t() argument 1819 gmap_shadow_r3t(struct gmap *sg, unsigned long saddr, unsigned long r3t, int fake) gmap_shadow_r3t() argument 1903 gmap_shadow_sgt(struct gmap *sg, unsigned long saddr, unsigned long sgt, int fake) gmap_shadow_sgt() argument 1987 gmap_shadow_pgt_lookup(struct gmap *sg, unsigned long saddr, unsigned long *pgt, int *dat_protection, int *fake) gmap_shadow_pgt_lookup() argument 2027 gmap_shadow_pgt(struct gmap *sg, unsigned long saddr, unsigned long pgt, int fake) gmap_shadow_pgt() argument 2106 gmap_shadow_page(struct gmap *sg, unsigned long saddr, pte_t pte) gmap_shadow_page() argument 2174 gmap_shadow_notify(struct gmap *sg, unsigned long vmaddr, unsigned long gaddr) gmap_shadow_notify() argument 2241 struct gmap *gmap, *sg, *next; ptep_notify() local [all...] |
/kernel/linux/linux-6.6/lib/ |
H A D | scatterlist.c | 17 * @sg: The current sg entry 20 * Usually the next entry will be @sg@ + 1, but if this sg element is part 25 struct scatterlist *sg_next(struct scatterlist *sg) in sg_next() argument 27 if (sg_is_last(sg)) in sg_next() 30 sg++; in sg_next() 31 if (unlikely(sg_is_chain(sg))) in sg_next() 32 sg = sg_chain_ptr(sg); in sg_next() 47 sg_nents(struct scatterlist *sg) sg_nents() argument 70 sg_nents_for_len(struct scatterlist *sg, u64 len) sg_nents_for_len() argument 105 struct scatterlist *sg, *ret = NULL; sg_last() local 140 sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen) sg_init_one() argument 171 sg_kfree(struct scatterlist *sg, unsigned int nents) sg_kfree() argument 290 struct scatterlist *sg, *prv; __sg_alloc_table() local 615 struct scatterlist *sgl, *sg; sgl_alloc_order() local 687 struct scatterlist *sg; sgl_free_n_order() local 737 sg_page_count(struct scatterlist *sg) sg_page_count() argument 761 sg_dma_page_count(struct scatterlist *sg) sg_dma_page_count() argument 814 struct scatterlist *sg; sg_miter_get_next_page() local 1113 struct scatterlist *sg = sgtable->sgl + sgtable->nents; extract_user_to_sg() local 1168 struct scatterlist *sg = sgtable->sgl + sgtable->nents; extract_bvec_to_sg() local 1214 struct scatterlist *sg = sgtable->sgl + sgtable->nents; extract_kvec_to_sg() local 1274 struct scatterlist *sg = sgtable->sgl + sgtable->nents; extract_xarray_to_sg() local [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/nic/ |
H A D | otx2_txrx.c | 67 static void otx2_dma_unmap_skb_frags(struct otx2_nic *pfvf, struct sg_list *sg) in otx2_dma_unmap_skb_frags() argument 71 for (seg = 0; seg < sg->num_segs; seg++) { in otx2_dma_unmap_skb_frags() 72 otx2_dma_unmap_page(pfvf, sg->dma_addr[seg], in otx2_dma_unmap_skb_frags() 73 sg->size[seg], DMA_TO_DEVICE); in otx2_dma_unmap_skb_frags() 75 sg->num_segs = 0; in otx2_dma_unmap_skb_frags() 88 struct sg_list *sg; in otx2_snd_pkt_handler() local 96 sg = &sq->sg[snd_comp->sqe_id]; in otx2_snd_pkt_handler() 97 skb = (struct sk_buff *)sg->skb; in otx2_snd_pkt_handler() 115 otx2_dma_unmap_skb_frags(pfvf, sg); in otx2_snd_pkt_handler() 191 struct nix_rx_sg_s *sg = &cqe->sg; otx2_free_rcv_seg() local 463 struct nix_sqe_sg_s *sg = NULL; otx2_sqe_add_sg() local 627 struct sg_list *sg = &sq->sg[sqe]; otx2_dma_map_tso_skb() local 659 struct sg_list *sg = &sq->sg[sqe]; otx2_tso_frag_dma_addr() local 676 struct nix_sqe_sg_s *sg = NULL; otx2_sqe_tso_add_sg() local 937 struct sg_list *sg; otx2_cleanup_tx_cqes() local [all...] |
/kernel/linux/linux-5.10/samples/kfifo/ |
H A D | dma-example.c | 26 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() 75 "sg[%d] -> " in example_init() 77 i, sg_page(&sg[i]), sg[i].offset, sg[i].length); in example_init() 79 if (sg_is_last(&sg[ in example_init() [all...] |
/kernel/linux/linux-6.6/samples/kfifo/ |
H A D | dma-example.c | 26 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() 75 "sg[%d] -> " in example_init() 77 i, sg_page(&sg[i]), sg[i].offset, sg[i].length); in example_init() 79 if (sg_is_last(&sg[ in example_init() [all...] |
/kernel/linux/linux-5.10/include/soc/fsl/ |
H A D | dpaa2-fd.h | 283 * @addr: address of the sg entry 284 * @len: length in this sg entry 305 * @sg: the given scatter-gathering object 309 static inline dma_addr_t dpaa2_sg_get_addr(const struct dpaa2_sg_entry *sg) in dpaa2_sg_get_addr() argument 311 return (dma_addr_t)le64_to_cpu(sg->addr); in dpaa2_sg_get_addr() 316 * @sg: the given scatter-gathering object 319 static inline void dpaa2_sg_set_addr(struct dpaa2_sg_entry *sg, dma_addr_t addr) in dpaa2_sg_set_addr() argument 321 sg->addr = cpu_to_le64(addr); in dpaa2_sg_set_addr() 324 static inline bool dpaa2_sg_short_len(const struct dpaa2_sg_entry *sg) in dpaa2_sg_short_len() argument 326 return !!((le16_to_cpu(sg in dpaa2_sg_short_len() 336 dpaa2_sg_get_len(const struct dpaa2_sg_entry *sg) dpaa2_sg_get_len() argument 349 dpaa2_sg_set_len(struct dpaa2_sg_entry *sg, u32 len) dpaa2_sg_set_len() argument 360 dpaa2_sg_get_offset(const struct dpaa2_sg_entry *sg) dpaa2_sg_get_offset() argument 370 dpaa2_sg_set_offset(struct dpaa2_sg_entry *sg, u16 offset) dpaa2_sg_set_offset() argument 384 dpaa2_sg_get_format(const struct dpaa2_sg_entry *sg) dpaa2_sg_get_format() argument 395 dpaa2_sg_set_format(struct dpaa2_sg_entry *sg, enum dpaa2_sg_format format) dpaa2_sg_set_format() argument 408 dpaa2_sg_get_bpid(const struct dpaa2_sg_entry *sg) dpaa2_sg_get_bpid() argument 418 dpaa2_sg_set_bpid(struct dpaa2_sg_entry *sg, u16 bpid) dpaa2_sg_set_bpid() argument 430 dpaa2_sg_is_final(const struct dpaa2_sg_entry *sg) dpaa2_sg_is_final() argument 440 dpaa2_sg_set_final(struct dpaa2_sg_entry *sg, bool final) dpaa2_sg_set_final() argument [all...] |
/kernel/linux/linux-6.6/include/soc/fsl/ |
H A D | dpaa2-fd.h | 284 * @addr: address of the sg entry 285 * @len: length in this sg entry 306 * @sg: the given scatter-gathering object 310 static inline dma_addr_t dpaa2_sg_get_addr(const struct dpaa2_sg_entry *sg) in dpaa2_sg_get_addr() argument 312 return (dma_addr_t)le64_to_cpu(sg->addr); in dpaa2_sg_get_addr() 317 * @sg: the given scatter-gathering object 320 static inline void dpaa2_sg_set_addr(struct dpaa2_sg_entry *sg, dma_addr_t addr) in dpaa2_sg_set_addr() argument 322 sg->addr = cpu_to_le64(addr); in dpaa2_sg_set_addr() 325 static inline bool dpaa2_sg_short_len(const struct dpaa2_sg_entry *sg) in dpaa2_sg_short_len() argument 327 return !!((le16_to_cpu(sg in dpaa2_sg_short_len() 337 dpaa2_sg_get_len(const struct dpaa2_sg_entry *sg) dpaa2_sg_get_len() argument 350 dpaa2_sg_set_len(struct dpaa2_sg_entry *sg, u32 len) dpaa2_sg_set_len() argument 361 dpaa2_sg_get_offset(const struct dpaa2_sg_entry *sg) dpaa2_sg_get_offset() argument 371 dpaa2_sg_set_offset(struct dpaa2_sg_entry *sg, u16 offset) dpaa2_sg_set_offset() argument 385 dpaa2_sg_get_format(const struct dpaa2_sg_entry *sg) dpaa2_sg_get_format() argument 396 dpaa2_sg_set_format(struct dpaa2_sg_entry *sg, enum dpaa2_sg_format format) dpaa2_sg_set_format() argument 409 dpaa2_sg_get_bpid(const struct dpaa2_sg_entry *sg) dpaa2_sg_get_bpid() argument 419 dpaa2_sg_set_bpid(struct dpaa2_sg_entry *sg, u16 bpid) dpaa2_sg_set_bpid() argument 431 dpaa2_sg_is_final(const struct dpaa2_sg_entry *sg) dpaa2_sg_is_final() argument 441 dpaa2_sg_set_final(struct dpaa2_sg_entry *sg, bool final) dpaa2_sg_set_final() argument [all...] |
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/ |
H A D | i915_scatterlist.h | 42 static inline int __sg_page_count(const struct scatterlist *sg) in __sg_page_count() argument 44 return sg->length >> PAGE_SHIFT; in __sg_page_count() 47 static inline struct scatterlist *____sg_next(struct scatterlist *sg) in ____sg_next() argument 49 ++sg; in ____sg_next() 50 if (unlikely(sg_is_chain(sg))) in ____sg_next() 51 sg = sg_chain_ptr(sg); in ____sg_next() 52 return sg; in ____sg_next() 57 * @sg: The current sg entr 64 __sg_next(struct scatterlist *sg) __sg_next() argument 95 i915_sg_page_sizes(struct scatterlist *sg) i915_sg_page_sizes() argument [all...] |
/kernel/linux/linux-5.10/drivers/media/pci/tw68/ |
H A D | tw68-risc.c | 38 struct scatterlist *sg; in tw68_risc_field() local 54 sg = sglist; in tw68_risc_field() 57 while (offset && offset >= sg_dma_len(sg)) { in tw68_risc_field() 58 offset -= sg_dma_len(sg); in tw68_risc_field() 59 sg = sg_next(sg); in tw68_risc_field() 61 if (bpl <= sg_dma_len(sg) - offset) { in tw68_risc_field() 65 *(rp++) = cpu_to_le32(sg_dma_address(sg) + offset); in tw68_risc_field() 76 done = (sg_dma_len(sg) - offset); in tw68_risc_field() 80 *(rp++) = cpu_to_le32(sg_dma_address(sg) in tw68_risc_field() [all...] |
/kernel/linux/linux-6.6/drivers/media/pci/tw68/ |
H A D | tw68-risc.c | 38 struct scatterlist *sg; in tw68_risc_field() local 54 sg = sglist; in tw68_risc_field() 57 while (offset && offset >= sg_dma_len(sg)) { in tw68_risc_field() 58 offset -= sg_dma_len(sg); in tw68_risc_field() 59 sg = sg_next(sg); in tw68_risc_field() 61 if (bpl <= sg_dma_len(sg) - offset) { in tw68_risc_field() 65 *(rp++) = cpu_to_le32(sg_dma_address(sg) + offset); in tw68_risc_field() 76 done = (sg_dma_len(sg) - offset); in tw68_risc_field() 80 *(rp++) = cpu_to_le32(sg_dma_address(sg) in tw68_risc_field() [all...] |
/kernel/linux/linux-5.10/drivers/dma/ |
H A D | dma-axi-dmac.c | 116 struct axi_dmac_sg sg[]; member 208 struct axi_dmac_sg *sg; in axi_dmac_start_transfer() local 225 sg = &desc->sg[desc->num_submitted]; in axi_dmac_start_transfer() 228 if (sg->id != AXI_DMAC_SG_UNUSED) { in axi_dmac_start_transfer() 229 sg->schedule_when_free = true; in axi_dmac_start_transfer() 245 sg->id = axi_dmac_read(dmac, AXI_DMAC_REG_TRANSFER_ID); in axi_dmac_start_transfer() 248 axi_dmac_write(dmac, AXI_DMAC_REG_DEST_ADDRESS, sg->dest_addr); in axi_dmac_start_transfer() 249 axi_dmac_write(dmac, AXI_DMAC_REG_DEST_STRIDE, sg->dest_stride); in axi_dmac_start_transfer() 253 axi_dmac_write(dmac, AXI_DMAC_REG_SRC_ADDRESS, sg in axi_dmac_start_transfer() 281 axi_dmac_total_sg_bytes(struct axi_dmac_chan *chan, struct axi_dmac_sg *sg) axi_dmac_total_sg_bytes() argument 294 struct axi_dmac_sg *sg; axi_dmac_dequeue_partial_xfers() local 341 struct axi_dmac_sg *sg; axi_dmac_compute_residue() local 362 struct axi_dmac_sg *sg; axi_dmac_transfer_done() local 492 axi_dmac_fill_linear_sg(struct axi_dmac_chan *chan, enum dma_transfer_direction direction, dma_addr_t addr, unsigned int num_periods, unsigned int period_len, struct axi_dmac_sg *sg) axi_dmac_fill_linear_sg() argument 543 struct scatterlist *sg; axi_dmac_prep_slave_sg() local [all...] |
/kernel/linux/linux-6.6/drivers/dma/ |
H A D | dma-axi-dmac.c | 120 struct axi_dmac_sg sg[]; member 212 struct axi_dmac_sg *sg; in axi_dmac_start_transfer() local 229 sg = &desc->sg[desc->num_submitted]; in axi_dmac_start_transfer() 232 if (sg->id != AXI_DMAC_SG_UNUSED) { in axi_dmac_start_transfer() 233 sg->schedule_when_free = true; in axi_dmac_start_transfer() 249 sg->id = axi_dmac_read(dmac, AXI_DMAC_REG_TRANSFER_ID); in axi_dmac_start_transfer() 252 axi_dmac_write(dmac, AXI_DMAC_REG_DEST_ADDRESS, sg->dest_addr); in axi_dmac_start_transfer() 253 axi_dmac_write(dmac, AXI_DMAC_REG_DEST_STRIDE, sg->dest_stride); in axi_dmac_start_transfer() 257 axi_dmac_write(dmac, AXI_DMAC_REG_SRC_ADDRESS, sg in axi_dmac_start_transfer() 285 axi_dmac_total_sg_bytes(struct axi_dmac_chan *chan, struct axi_dmac_sg *sg) axi_dmac_total_sg_bytes() argument 298 struct axi_dmac_sg *sg; axi_dmac_dequeue_partial_xfers() local 345 struct axi_dmac_sg *sg; axi_dmac_compute_residue() local 366 struct axi_dmac_sg *sg; axi_dmac_transfer_done() local 496 axi_dmac_fill_linear_sg(struct axi_dmac_chan *chan, enum dma_transfer_direction direction, dma_addr_t addr, unsigned int num_periods, unsigned int period_len, struct axi_dmac_sg *sg) axi_dmac_fill_linear_sg() argument 547 struct scatterlist *sg; axi_dmac_prep_slave_sg() local [all...] |