Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\scatterlist.c Create Date:2022-07-28 06:20:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:sg_copy_buffer - Copy data between a linear buffer and an SG list*@sgl: The SG list*@nents: Number of SG entries*@buf: Where to copy from*@buflen: The number of bytes to copy*@skip: Number of bytes to skip before copying*@to_buffer: transfer direction

Proto:size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip, bool to_buffer)

Type:size_t

Parameter:

TypeParameterName
struct scatterlist *sgl
unsigned intnents
void *buf
size_tbuflen
off_tskip
boolto_buffer
843  offset = 0
845  sg_flags = use kmap_atomic
847  If to_buffer Then sg_flags |= p
849  Else sg_flags |= lush back to phys on unmap
852  sg_miter_start - start mapping iteration over a sg list*@miter: sg mapping iter to be started*@sgl: sg list to iterate over*@nents: number of sg entries* Description:* Starts mapping iterator @miter.* Context:* Don't care.
854  If Not sg_miter_skip - reposition mapping iterator*@miter: sg mapping iter to be skipped*@offset: number of bytes to plus the current location* Description:* Sets the offset of @miter to its current location plus @offset bytes Then Return false
857  When offset < buflen && sg_miter_next - proceed mapping iterator to the next mapping*@miter: sg mapping iter to proceed* Description:* Proceeds @miter to the next mapping. @miter should have been started* using sg_miter_start(). On successful return, @miter->page, cycle
860  len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( length of the mapped area , buflen - offset)
862  If to_buffer Then No 3D Now!(buf + offset, pointer to the mapped area , len)
864  Else No 3D Now!( pointer to the mapped area , buf + offset, len)
867  offset += len
870  sg_miter_stop - stop mapping iteration*@miter: sg mapping iter to be stopped* Description:* Stops mapping iterator @miter. @miter should have been started* using sg_miter_start(). A stopped iteration can be resumed by* calling sg_miter_next() on it
872  Return offset
Caller
NameDescribe
sg_copy_from_buffersg_copy_from_buffer - Copy from a linear buffer to an SG list*@sgl: The SG list*@nents: Number of SG entries*@buf: Where to copy from*@buflen: The number of bytes to copy* Returns the number of copied bytes.
sg_copy_to_buffersg_copy_to_buffer - Copy from an SG list to a linear buffer*@sgl: The SG list*@nents: Number of SG entries*@buf: Where to copy to*@buflen: The number of bytes to copy* Returns the number of copied bytes.
sg_pcopy_from_buffersg_pcopy_from_buffer - Copy from a linear buffer to an SG list*@sgl: The SG list*@nents: Number of SG entries*@buf: Where to copy from*@buflen: The number of bytes to copy*@skip: Number of bytes to skip before copying* Returns the number of copied bytes.
sg_pcopy_to_buffersg_pcopy_to_buffer - Copy from an SG list to a linear buffer*@sgl: The SG list*@nents: Number of SG entries*@buf: Where to copy to*@buflen: The number of bytes to copy*@skip: Number of bytes to skip before copying* Returns the number of copied bytes.