sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget$/translations/zh_CN/core-api/dma-apimodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/zh_TW/core-api/dma-apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/it_IT/core-api/dma-apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ja_JP/core-api/dma-apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ko_KR/core-api/dma-apimodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/sp_SP/core-api/dma-apimodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h,Dynamic DMA mapping using the generic deviceh]h,Dynamic DMA mapping using the generic device}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh>/var/lib/git/docbuild/linux/Documentation/core-api/dma-api.rsthKubh field_list)}(hhh]hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(h=James E.J. Bottomley h]h paragraph)}(hh](hJames E.J. Bottomley <}(hhhhhNhNubh reference)}(h%James.Bottomley@HansenPartnership.comh]h%James.Bottomley@HansenPartnership.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refuri,mailto:James.Bottomley@HansenPartnership.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hThis document describes the DMA API. For a more gentle introduction of the API (and actual examples), see Documentation/core-api/dma-api-howto.rst.h]hThis document describes the DMA API. For a more gentle introduction of the API (and actual examples), see Documentation/core-api/dma-api-howto.rst.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX9This API is split into two pieces. Part I describes the basic API. Part II describes extensions for supporting non-coherent memory machines. Unless you know that your driver absolutely has to support non-coherent platforms (this is usually only legacy platforms) you should only use the API described in part I.h]hX9This API is split into two pieces. Part I describes the basic API. Part II describes extensions for supporting non-coherent memory machines. Unless you know that your driver absolutely has to support non-coherent platforms (this is usually only legacy platforms) you should only use the API described in part I.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hPart I - DMA APIh]hPart I - DMA API}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hhhhhKubh)}(hzTo get the DMA API, you must #include . This provides dma_addr_t and the interfaces described below.h]hzTo get the DMA API, you must #include . This provides dma_addr_t and the interfaces described below.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+hhubh)}(hX A dma_addr_t can hold any valid DMA address for the platform. It can be given to a device to use as a DMA source or target. A CPU cannot reference a dma_addr_t directly because there may be translation between its physical address space and the DMA address space.h]hX A dma_addr_t can hold any valid DMA address for the platform. It can be given to a device to use as a DMA source or target. A CPU cannot reference a dma_addr_t directly because there may be translation between its physical address space and the DMA address space.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+hhubeh}(h]part-i-dma-apiah ]h"]part i - dma apiah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h*Part Ia - Using large DMA-coherent buffersh]h*Part Ia - Using large DMA-coherent buffers}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hhhhhKubh literal_block)}(hqvoid * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag)h]hqvoid * dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag)}hjssbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jqhhhK hj`hhubh)}(hX+Coherent memory is memory for which a write by either the device or the processor can immediately be read by the processor or device without having to worry about caching effects. (You may however need to make sure to flush the processor's write buffers before telling devices to read that memory.)h]hX-Coherent memory is memory for which a write by either the device or the processor can immediately be read by the processor or device without having to worry about caching effects. (You may however need to make sure to flush the processor’s write buffers before telling devices to read that memory.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hj`hhubh)}(hCThis routine allocates a region of bytes of coherent memory.h]hCThis routine allocates a region of bytes of coherent memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj`hhubh)}(hyIt returns a pointer to the allocated region (in the processor's virtual address space) or NULL if the allocation failed.h]h{It returns a pointer to the allocated region (in the processor’s virtual address space) or NULL if the allocation failed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hj`hhubh)}(hIt also returns a which may be cast to an unsigned integer the same width as the bus and given to the device as the DMA address base of the region.h]hIt also returns a which may be cast to an unsigned integer the same width as the bus and given to the device as the DMA address base of the region.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hj`hhubh)}(hX Note: coherent memory can be expensive on some platforms, and the minimum allocation length may be as big as a page, so you should consolidate your requests for coherent memory as much as possible. The simplest way to do that is to use the dma_pool calls (see below).h]hX Note: coherent memory can be expensive on some platforms, and the minimum allocation length may be as big as a page, so you should consolidate your requests for coherent memory as much as possible. The simplest way to do that is to use the dma_pool calls (see below).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hj`hhubh)}(hThe flag parameter allows the caller to specify the ``GFP_`` flags (see kmalloc()) for the allocation (the implementation may ignore flags that affect the location of the returned memory, like GFP_DMA).h](h4The flag parameter allows the caller to specify the }(hjhhhNhNubhliteral)}(h``GFP_``h]hGFP_}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flags (see kmalloc()) for the allocation (the implementation may ignore flags that affect the location of the returned memory, like GFP_DMA).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK8hj`hhubjr)}(hpvoid dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_handle)h]hpvoid dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_handle)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhK>hj`hhubh)}(hFree a previously allocated region of coherent memory. dev, size and dma_handle must all be the same as those passed into dma_alloc_coherent(). cpu_addr must be the virtual address returned by dma_alloc_coherent().h]hFree a previously allocated region of coherent memory. dev, size and dma_handle must all be the same as those passed into dma_alloc_coherent(). cpu_addr must be the virtual address returned by dma_alloc_coherent().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhj`hhubh)}(h`Note that unlike the sibling allocation call, this routine may only be called with IRQs enabled.h]h`Note that unlike the sibling allocation call, this routine may only be called with IRQs enabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhj`hhubeh}(h](part-ia-using-large-dma-coherent-buffersah ]h"]*part ia - using large dma-coherent buffersah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h*Part Ib - Using small DMA-coherent buffersh]h*Part Ib - Using small DMA-coherent buffers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKKubh)}(hDTo get this part of the DMA API, you must #include h]hDTo get this part of the DMA API, you must #include }(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjhhubh)}(hXMany drivers need lots of small DMA-coherent memory regions for DMA descriptors or I/O buffers. Rather than allocating in units of a page or more using dma_alloc_coherent(), you can use DMA pools. These work much like a struct kmem_cache, except that they use the DMA-coherent allocator, not __get_free_pages(). Also, they understand common hardware constraints for alignment, like queue heads needing to be aligned on N-byte boundaries.h]hXMany drivers need lots of small DMA-coherent memory regions for DMA descriptors or I/O buffers. Rather than allocating in units of a page or more using dma_alloc_coherent(), you can use DMA pools. These work much like a struct kmem_cache, except that they use the DMA-coherent allocator, not __get_free_pages(). Also, they understand common hardware constraints for alignment, like queue heads needing to be aligned on N-byte boundaries.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single!dma_pool_create_node (C function)c.dma_pool_create_nodehNtauh1jJhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hstruct dma_pool * dma_pool_create_node (const char *name, struct device *dev, size_t size, size_t align, size_t boundary, int node)h]hdesc_signature_line)}(hstruct dma_pool *dma_pool_create_node(const char *name, struct device *dev, size_t size, size_t align, size_t boundary, int node)h](hdesc_sig_keyword)}(hstructh]hstruct}(hjnhhhNhNubah}(h]h ]kah"]h$]h&]uh1jlhjhhhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1j~hjhhhhj}hKubh)}(hhh]h desc_sig_name)}(hdma_poolh]hdma_pool}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jdma_pool_create_nodesbc.dma_pool_create_nodeasbuh1hhjhhhhj}hKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjhhhhj}hKubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjhhhhj}hKubh desc_name)}(hdma_pool_create_nodeh]j)}(hjh]hdma_pool_create_node}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]jjuh1jhjhhhhj}hKubhdesc_parameterlist)}(h\(const char *name, struct device *dev, size_t size, size_t align, size_t boundary, int node)h](hdesc_parameter)}(hconst char *nameh](jm)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubhdesc_sig_keyword_type)}(hcharh]hchar}(hj#hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j!hjubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnameh]hname}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct device *devh](jm)}(hjph]hstruct}(hjfhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjbubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubh)}(hhh]j)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.dma_pool_create_nodeasbuh1hhjbubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(hdevh]hdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.dma_pool_create_nodeasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t alignh](h)}(hhh]j)}(hsize_th]hsize_t}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj#modnameN classnameNjj)}j]jc.dma_pool_create_nodeasbuh1hhjubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(halignh]halign}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsize_t boundaryh](h)}(hhh]j)}(hsize_th]hsize_t}(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjkmodnameN classnameNjj)}j]jc.dma_pool_create_nodeasbuh1hhjbubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubj)}(hboundaryh]hboundary}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint nodeh](j")}(hinth]hint}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hnodeh]hnode}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhhj}hKubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1jfsphinx_line_type declaratorhjbhhhj}hKubah}(h]jYah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j`hj}hKhj]hhubh desc_content)}(hhh]h)}(h-Creates a pool of coherent DMA memory blocks.h]h-Creates a pool of coherent DMA memory blocks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhj]hhhj}hKubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j[hhhjhNhNubh container)}(hXT**Parameters** ``const char *name`` name of pool, for diagnostics ``struct device *dev`` device that will be doing the DMA ``size_t size`` size of the blocks in this pool. ``size_t align`` alignment requirement for blocks; must be a power of two ``size_t boundary`` returned blocks won't cross this power of two boundary ``int node`` optional NUMA node to allocate structs 'dma_pool' and 'dma_page' on **Context** not in_interrupt() **Description** Given one of these pools, dma_pool_alloc() may be used to allocate memory. Such memory will all have coherent DMA mappings, accessible by the device and its driver without using cache flushing primitives. The actual size of blocks allocated may be larger than requested because of alignment. If **boundary** is nonzero, objects returned from dma_pool_alloc() won't cross that size boundary. This is useful for devices which have addressing restrictions on individual DMA transfers, such as not crossing boundaries of 4KBytes. **Return** a dma allocation pool with the requested characteristics, or ``NULL`` if one can't be created.h](h)}(h**Parameters**h]hstrong)}(hj(h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj&ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj"ubhdefinition_list)}(hhh](hdefinition_list_item)}(h3``const char *name`` name of pool, for diagnostics h](hterm)}(h``const char *name``h]j)}(hjOh]hconst char *name}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjGubh definition)}(hhh]h)}(hname of pool, for diagnosticsh]hname of pool, for diagnostics}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhKhjgubah}(h]h ]h"]h$]h&]uh1jehjGubeh}(h]h ]h"]h$]h&]uh1jEhjdhKhjBubjF)}(h9``struct device *dev`` device that will be doing the DMA h](jL)}(h``struct device *dev``h]j)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjubjf)}(hhh]h)}(h!device that will be doing the DMAh]h!device that will be doing the DMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhKhjBubjF)}(h1``size_t size`` size of the blocks in this pool. h](jL)}(h``size_t size``h]j)}(hjh]h size_t size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjubjf)}(hhh]h)}(h size of the blocks in this pool.h]h size of the blocks in this pool.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhKhjBubjF)}(hJ``size_t align`` alignment requirement for blocks; must be a power of two h](jL)}(h``size_t align``h]j)}(hjh]h size_t align}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjubjf)}(hhh]h)}(h8alignment requirement for blocks; must be a power of twoh]h8alignment requirement for blocks; must be a power of two}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhKhjBubjF)}(hK``size_t boundary`` returned blocks won't cross this power of two boundary h](jL)}(h``size_t boundary``h]j)}(hj5h]hsize_t boundary}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj/ubjf)}(hhh]h)}(h6returned blocks won't cross this power of two boundaryh]h8returned blocks won’t cross this power of two boundary}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhKhjKubah}(h]h ]h"]h$]h&]uh1jehj/ubeh}(h]h ]h"]h$]h&]uh1jEhjJhKhjBubjF)}(hQ``int node`` optional NUMA node to allocate structs 'dma_pool' and 'dma_page' on h](jL)}(h ``int node``h]j)}(hjnh]hint node}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjhubjf)}(hhh]h)}(hCoptional NUMA node to allocate structs 'dma_pool' and 'dma_page' onh]hKoptional NUMA node to allocate structs ‘dma_pool’ and ‘dma_page’ on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jehjhubeh}(h]h ]h"]h$]h&]uh1jEhjhKhjBubeh}(h]h ]h"]h$]h&]uh1j@hj"ubh)}(h **Context**h]j+)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj"ubh)}(hnot in_interrupt()h]hnot in_interrupt()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj"ubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj"ubh)}(hX%Given one of these pools, dma_pool_alloc() may be used to allocate memory. Such memory will all have coherent DMA mappings, accessible by the device and its driver without using cache flushing primitives. The actual size of blocks allocated may be larger than requested because of alignment.h]hX%Given one of these pools, dma_pool_alloc() may be used to allocate memory. Such memory will all have coherent DMA mappings, accessible by the device and its driver without using cache flushing primitives. The actual size of blocks allocated may be larger than requested because of alignment.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj"ubh)}(hIf **boundary** is nonzero, objects returned from dma_pool_alloc() won't cross that size boundary. This is useful for devices which have addressing restrictions on individual DMA transfers, such as not crossing boundaries of 4KBytes.h](hIf }(hjhhhNhNubj+)}(h **boundary**h]hboundary}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubh is nonzero, objects returned from dma_pool_alloc() won’t cross that size boundary. This is useful for devices which have addressing restrictions on individual DMA transfers, such as not crossing boundaries of 4KBytes.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj"ubh)}(h **Return**h]j+)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj"ubh)}(h^a dma allocation pool with the requested characteristics, or ``NULL`` if one can't be created.h](h=a dma allocation pool with the requested characteristics, or }(hj.hhhNhNubj)}(h``NULL``h]hNULL}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh if one can’t be created.}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWdma_pool_destroy (C function)c.dma_pool_destroyhNtauh1jJhjhhhNhNubj\)}(hhh](ja)}(h-void dma_pool_destroy (struct dma_pool *pool)h]jg)}(h,void dma_pool_destroy(struct dma_pool *pool)h](j")}(hvoidh]hvoid}(hjohhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjkhhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMdubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjkhhhj}hMdubj)}(hdma_pool_destroyh]j)}(hdma_pool_destroyh]hdma_pool_destroy}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjkhhhj}hMdubj)}(h(struct dma_pool *pool)h]j)}(hstruct dma_pool *poolh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.dma_pool_destroyasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjkhhhj}hMdubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjghhhj}hMdubah}(h]jbah ](jjeh"]h$]h&]jj)jhuh1j`hj}hMdhjdhhubj)}(hhh]h)}(h%destroys a pool of dma memory blocks.h]h%destroys a pool of dma memory blocks.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMdhj,hhubah}(h]h ]h"]h$]h&]uh1jhjdhhhj}hMdubeh}(h]h ](jfunctioneh"]h$]h&]jjjjGjjGjjjuh1j[hhhjhNhNubj!)}(h**Parameters** ``struct dma_pool *pool`` dma pool that will be destroyed **Context** !in_interrupt() **Description** Caller guarantees that no more memory from the pool is in use, and that nothing will try to use the pool after this call.h](h)}(h**Parameters**h]j+)}(hjQh]h Parameters}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjOubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhhjKubjA)}(hhh]jF)}(h:``struct dma_pool *pool`` dma pool that will be destroyed h](jL)}(h``struct dma_pool *pool``h]j)}(hjph]hstruct dma_pool *pool}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMehjjubjf)}(hhh]h)}(hdma pool that will be destroyedh]hdma pool that will be destroyed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMehjubah}(h]h ]h"]h$]h&]uh1jehjjubeh}(h]h ]h"]h$]h&]uh1jEhjhMehjgubah}(h]h ]h"]h$]h&]uh1j@hjKubh)}(h **Context**h]j+)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMghjKubh)}(h!in_interrupt()h]h!in_interrupt()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMfhjKubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhhjKubh)}(hyCaller guarantees that no more memory from the pool is in use, and that nothing will try to use the pool after this call.h]hyCaller guarantees that no more memory from the pool is in use, and that nothing will try to use the pool after this call.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMghjKubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWdma_pool_alloc (C function)c.dma_pool_allochNtauh1jJhjhhhNhNubj\)}(hhh](ja)}(hRvoid * dma_pool_alloc (struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h]jg)}(hPvoid *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h](j")}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj hhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMubj)}(h h]h }(hj& hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj hhhj% hMubj)}(hjh]h*}(hj4 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj% hMubj)}(hdma_pool_alloch]j)}(hdma_pool_alloch]hdma_pool_alloc}(hjE hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj% hMubj)}(h<(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h](j)}(hstruct dma_pool *poolh](jm)}(hjph]hstruct}(hja hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj] ubj)}(h h]h }(hjn hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj] ubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj| ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jjG sbc.dma_pool_allocasbuh1hhj] ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj] ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj] ubj)}(hpoolh]hpool}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj] ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjY ubj)}(hgfp_t mem_flagsh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j c.dma_pool_allocasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj ubj)}(h mem_flagsh]h mem_flags}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjY ubj)}(hdma_addr_t *handleh](h)}(hhh]j)}(h dma_addr_th]h dma_addr_t}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j c.dma_pool_allocasbuh1hhj ubj)}(h h]h }(hj< hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj ubj)}(hjh]h*}(hjJ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hhandleh]hhandle}(hjW hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjY ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj% hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj hhhj% hMubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j`hj% hMhj hhubj)}(hhh]h)}(hget a block of coherent memoryh]hget a block of coherent memory}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj~ hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj% hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj jj jjjuh1j[hhhjhNhNubj!)}(hXe**Parameters** ``struct dma_pool *pool`` dma pool that will produce the block ``gfp_t mem_flags`` GFP_* bitmask ``dma_addr_t *handle`` pointer to dma address of block **Return** the kernel virtual address of a currently unused block, and reports its dma address through the handle. If such a memory block can't be allocated, ``NULL`` is returned.h](h)}(h**Parameters**h]j+)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjA)}(hhh](jF)}(h?``struct dma_pool *pool`` dma pool that will produce the block h](jL)}(h``struct dma_pool *pool``h]j)}(hj h]hstruct dma_pool *pool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjf)}(hhh]h)}(h$dma pool that will produce the blockh]h$dma pool that will produce the block}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]uh1jEhj hMhj ubjF)}(h"``gfp_t mem_flags`` GFP_* bitmask h](jL)}(h``gfp_t mem_flags``h]j)}(hj h]hgfp_t mem_flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjf)}(hhh]h)}(h GFP_* bitmaskh]h GFP_* bitmask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]uh1jEhj hMhj ubjF)}(h7``dma_addr_t *handle`` pointer to dma address of block h](jL)}(h``dma_addr_t *handle``h]j)}(hj4 h]hdma_addr_t *handle}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2 ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj. ubjf)}(hhh]h)}(hpointer to dma address of blockh]hpointer to dma address of block}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI hMhjJ ubah}(h]h ]h"]h$]h&]uh1jehj. ubeh}(h]h ]h"]h$]h&]uh1jEhjI hMhj ubeh}(h]h ]h"]h$]h&]uh1j@hj ubh)}(h **Return**h]j+)}(hjo h]hReturn}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjm ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubh)}(hthe kernel virtual address of a currently unused block, and reports its dma address through the handle. If such a memory block can't be allocated, ``NULL`` is returned.h](hthe kernel virtual address of a currently unused block, and reports its dma address through the handle. If such a memory block can’t be allocated, }(hj hhhNhNubj)}(h``NULL``h]hNULL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is returned.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWdma_pool_free (C function)c.dma_pool_freehNtauh1jJhjhhhNhNubj\)}(hhh](ja)}(hGvoid dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t dma)h]jg)}(hFvoid dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)h](j")}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj hhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj hhhj hMubj)}(h dma_pool_freeh]j)}(h dma_pool_freeh]h dma_pool_free}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj hMubj)}(h4(struct dma_pool *pool, void *vaddr, dma_addr_t dma)h](j)}(hstruct dma_pool *poolh](jm)}(hjph]hstruct}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj ubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hj! hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj# modnameN classnameNjj)}j]j)}jj sbc.dma_pool_freeasbuh1hhj ubj)}(h h]h }(hjA hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj ubj)}(hjh]h*}(hjO hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hpoolh]hpool}(hj\ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h void *vaddrh](j")}(hvoidh]hvoid}(hju hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjq ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjq ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq ubj)}(hvaddrh]hvaddr}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hdma_addr_t dmah](h)}(hhh]j)}(h dma_addr_th]h dma_addr_t}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j= c.dma_pool_freeasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj ubj)}(hdmah]hdma}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj hhhj hMubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j`hj hMhj hhubj)}(hhh]h)}(hput block back into dma poolh]hput block back into dma pool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj( jj( jjjuh1j[hhhjhNhNubj!)}(hX**Parameters** ``struct dma_pool *pool`` the dma pool holding the block ``void *vaddr`` virtual address of block ``dma_addr_t dma`` dma address of block **Description** Caller promises neither device nor driver will again touch this block unless it is first re-allocated.h](h)}(h**Parameters**h]j+)}(hj2 h]h Parameters}(hj4 hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj0 ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj, ubjA)}(hhh](jF)}(h9``struct dma_pool *pool`` the dma pool holding the block h](jL)}(h``struct dma_pool *pool``h]j)}(hjQ h]hstruct dma_pool *pool}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjO ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjK ubjf)}(hhh]h)}(hthe dma pool holding the blockh]hthe dma pool holding the block}(hjj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf hMhjg ubah}(h]h ]h"]h$]h&]uh1jehjK ubeh}(h]h ]h"]h$]h&]uh1jEhjf hMhjH ubjF)}(h)``void *vaddr`` virtual address of block h](jL)}(h``void *vaddr``h]j)}(hj h]h void *vaddr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjf)}(hhh]h)}(hvirtual address of blockh]hvirtual address of block}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]uh1jEhj hMhjH ubjF)}(h(``dma_addr_t dma`` dma address of block h](jL)}(h``dma_addr_t dma``h]j)}(hj h]hdma_addr_t dma}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjf)}(hhh]h)}(hdma address of blockh]hdma address of block}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]uh1jEhj hMhjH ubeh}(h]h ]h"]h$]h&]uh1j@hj, ubh)}(h**Description**h]j+)}(hj h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj, ubh)}(hfCaller promises neither device nor driver will again touch this block unless it is first re-allocated.h]hfCaller promises neither device nor driver will again touch this block unless it is first re-allocated.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj, ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWdmam_pool_create (C function)c.dmam_pool_createhNtauh1jJhjhhhNhNubj\)}(hhh](ja)}(hwstruct dma_pool * dmam_pool_create (const char *name, struct device *dev, size_t size, size_t align, size_t allocation)h]jg)}(hustruct dma_pool *dmam_pool_create(const char *name, struct device *dev, size_t size, size_t align, size_t allocation)h](jm)}(hjph]hstruct}(hjChhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj?hhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMubj)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj?hhhjPhMubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjdmodnameN classnameNjj)}j]j)}jdmam_pool_createsbc.dmam_pool_createasbuh1hhj?hhhjPhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj?hhhjPhMubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhjPhMubj)}(hdmam_pool_createh]j)}(hjh]hdmam_pool_create}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhj?hhhjPhMubj)}(hT(const char *name, struct device *dev, size_t size, size_t align, size_t allocation)h](j)}(hconst char *nameh](jm)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj")}(hcharh]hchar}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnameh]hname}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct device *devh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(hdeviceh]hdevice}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj:modnameN classnameNjj)}j]j~c.dmam_pool_createasbuh1hhjubj)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hdevh]hdev}(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j~c.dmam_pool_createasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t alignh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j~c.dmam_pool_createasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(halignh]halign}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsize_t allocationh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j~c.dmam_pool_createasbuh1hhjubj)}(h h]h }(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(h allocationh]h allocation}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhj?hhhjPhMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj;hhhjPhMubah}(h]j6ah ](jjeh"]h$]h&]jj)jhuh1j`hjPhMhj8hhubj)}(hhh]h)}(hManaged dma_pool_create()h]hManaged dma_pool_create()}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjphhubah}(h]h ]h"]h$]h&]uh1jhj8hhhjPhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhjhNhNubj!)}(hXA**Parameters** ``const char *name`` name of pool, for diagnostics ``struct device *dev`` device that will be doing the DMA ``size_t size`` size of the blocks in this pool. ``size_t align`` alignment requirement for blocks; must be a power of two ``size_t allocation`` returned blocks won't cross this boundary (or zero) **Description** Managed dma_pool_create(). DMA pool created with this function is automatically destroyed on driver detach. **Return** a managed dma allocation pool with the requested characteristics, or ``NULL`` if one can't be created.h](h)}(h**Parameters**h]j+)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubjA)}(hhh](jF)}(h3``const char *name`` name of pool, for diagnostics h](jL)}(h``const char *name``h]j)}(hjh]hconst char *name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubjf)}(hhh]h)}(hname of pool, for diagnosticsh]hname of pool, for diagnostics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubjF)}(h9``struct device *dev`` device that will be doing the DMA h](jL)}(h``struct device *dev``h]j)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubjf)}(hhh]h)}(h!device that will be doing the DMAh]h!device that will be doing the DMA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubjF)}(h1``size_t size`` size of the blocks in this pool. h](jL)}(h``size_t size``h]j)}(hj&h]h size_t size}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjf)}(hhh]h)}(h size of the blocks in this pool.h]h size of the blocks in this pool.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMhj<ubah}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]uh1jEhj;hMhjubjF)}(hJ``size_t align`` alignment requirement for blocks; must be a power of two h](jL)}(h``size_t align``h]j)}(hj_h]h size_t align}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjYubjf)}(hhh]h)}(h8alignment requirement for blocks; must be a power of twoh]h8alignment requirement for blocks; must be a power of two}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthMhjuubah}(h]h ]h"]h$]h&]uh1jehjYubeh}(h]h ]h"]h$]h&]uh1jEhjthMhjubjF)}(hJ``size_t allocation`` returned blocks won't cross this boundary (or zero) h](jL)}(h``size_t allocation``h]j)}(hjh]hsize_t allocation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubjf)}(hhh]h)}(h3returned blocks won't cross this boundary (or zero)h]h5returned blocks won’t cross this boundary (or zero)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubeh}(h]h ]h"]h$]h&]uh1j@hjubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubh)}(hlManaged dma_pool_create(). DMA pool created with this function is automatically destroyed on driver detach.h]hlManaged dma_pool_create(). DMA pool created with this function is automatically destroyed on driver detach.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubh)}(h **Return**h]j+)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubh)}(hfa managed dma allocation pool with the requested characteristics, or ``NULL`` if one can't be created.h](hEa managed dma allocation pool with the requested characteristics, or }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if one can’t be created.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWdmam_pool_destroy (C function)c.dmam_pool_destroyhNtauh1jJhjhhhNhNubj\)}(hhh](ja)}(h.void dmam_pool_destroy (struct dma_pool *pool)h]jg)}(h-void dmam_pool_destroy(struct dma_pool *pool)h](j")}(hvoidh]hvoid}(hjQhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjMhhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjMhhhj_hMubj)}(hdmam_pool_destroyh]j)}(hdmam_pool_destroyh]hdmam_pool_destroy}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubah}(h]h ](jjeh"]h$]h&]jjuh1jhjMhhhj_hMubj)}(h(struct dma_pool *pool)h]j)}(hstruct dma_pool *poolh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjtsbc.dmam_pool_destroyasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjMhhhj_hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjIhhhj_hMubah}(h]jDah ](jjeh"]h$]h&]jj)jhuh1j`hj_hMhjFhhubj)}(hhh]h)}(hManaged dma_pool_destroy()h]hManaged dma_pool_destroy()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjFhhhj_hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj)jj)jjjuh1j[hhhjhNhNubj!)}(hy**Parameters** ``struct dma_pool *pool`` dma pool that will be destroyed **Description** Managed dma_pool_destroy().h](h)}(h**Parameters**h]j+)}(hj3h]h Parameters}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj1ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj-ubjA)}(hhh]jF)}(h:``struct dma_pool *pool`` dma pool that will be destroyed h](jL)}(h``struct dma_pool *pool``h]j)}(hjRh]hstruct dma_pool *pool}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1jKhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjLubjf)}(hhh]h)}(hdma pool that will be destroyedh]hdma pool that will be destroyed}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjhubah}(h]h ]h"]h$]h&]uh1jehjLubeh}(h]h ]h"]h$]h&]uh1jEhjghMhjIubah}(h]h ]h"]h$]h&]uh1j@hj-ubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj-ubh)}(hManaged dma_pool_destroy().h]hManaged dma_pool_destroy().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjhhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWdma_pool_zalloc (C function)c.dma_pool_zallochNtauh1jJhjhhhNhNubj\)}(hhh](ja)}(hSvoid * dma_pool_zalloc (struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h]jg)}(hQvoid *dma_pool_zalloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h](j")}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjhhhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhK@ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjhhhjhK@ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhK@ubj)}(hdma_pool_zalloch]j)}(hdma_pool_zalloch]hdma_pool_zalloc}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhK@ubj)}(h<(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h](j)}(hstruct dma_pool *poolh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj<modnameN classnameNjj)}j]j)}jjsbc.dma_pool_zallocasbuh1hhjubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hpoolh]hpool}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hgfp_t mem_flagsh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jVc.dma_pool_zallocasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(h mem_flagsh]h mem_flags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hdma_addr_t *handleh](h)}(hhh]j)}(h dma_addr_th]h dma_addr_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jVc.dma_pool_zallocasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hhandleh]hhandle}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhK@ubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjhhhjhK@ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j`hjhK@hjhhubj)}(hhh]h)}(h4Get a zero-initialized block of DMA coherent memory.h]h4Get a zero-initialized block of DMA coherent memory.}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhK@hj9hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhK@ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjTjjTjjjuh1j[hhhjhNhNubj!)}(h**Parameters** ``struct dma_pool *pool`` dma pool that will produce the block ``gfp_t mem_flags`` GFP_* bitmask ``dma_addr_t *handle`` pointer to dma address of block **Description** Same as dma_pool_alloc(), but the returned memory is zeroed.h](h)}(h**Parameters**h]j+)}(hj^h]h Parameters}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj\ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKDhjXubjA)}(hhh](jF)}(h?``struct dma_pool *pool`` dma pool that will produce the block h](jL)}(h``struct dma_pool *pool``h]j)}(hj}h]hstruct dma_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1jKhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKAhjwubjf)}(hhh]h)}(h$dma pool that will produce the blockh]h$dma pool that will produce the block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKAhjubah}(h]h ]h"]h$]h&]uh1jehjwubeh}(h]h ]h"]h$]h&]uh1jEhjhKAhjtubjF)}(h"``gfp_t mem_flags`` GFP_* bitmask h](jL)}(h``gfp_t mem_flags``h]j)}(hjh]hgfp_t mem_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKBhjubjf)}(hhh]h)}(h GFP_* bitmaskh]h GFP_* bitmask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKBhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhKBhjtubjF)}(h7``dma_addr_t *handle`` pointer to dma address of block h](jL)}(h``dma_addr_t *handle``h]j)}(hjh]hdma_addr_t *handle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKChjubjf)}(hhh]h)}(hpointer to dma address of blockh]hpointer to dma address of block}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKChjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhKChjtubeh}(h]h ]h"]h$]h&]uh1j@hjXubh)}(h**Description**h]j+)}(hj*h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj(ubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKEhjXubh)}(h`. However, these methods are not always available, and even if they are, they may still fail for a number of reasons. In short, a device driver may need to be wary of where buffers are located in physical memory, especially if the DMA mask is less than 32 bits.h](h)}(hX#In particular, mapping may fail for memory not addressable by the device, e.g. if it is not within the DMA mask of the device and/or a connecting bus bridge. Streaming DMA functions try to overcome such addressing constraints, either by using an IOMMU (a device which maps I/O DMA addresses to physical memory addresses), or by copying the data to/from a bounce buffer if the kernel is configured with a :doc:`SWIOTLB `. However, these methods are not always available, and even if they are, they may still fail for a number of reasons.h](hXIn particular, mapping may fail for memory not addressable by the device, e.g. if it is not within the DMA mask of the device and/or a connecting bus bridge. Streaming DMA functions try to overcome such addressing constraints, either by using an IOMMU (a device which maps I/O DMA addresses to physical memory addresses), or by copying the data to/from a bounce buffer if the kernel is configured with a }(hjhhhNhNubh)}(h:doc:`SWIOTLB `h]hinline)}(hjh]hSWIOTLB}(hjhhhNhNubah}(h]h ](xrefstdstd-doceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoccore-api/dma-api refdomainjreftypedoc refexplicitrefwarn reftargetswiotlbuh1hhhhKhjubhv. However, these methods are not always available, and even if they are, they may still fail for a number of reasons.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hIn short, a device driver may need to be wary of where buffers are located in physical memory, especially if the DMA mask is less than 32 bits.h]hIn short, a device driver may need to be wary of where buffers are located in physical memory, especially if the DMA mask is less than 32 bits.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubjr)}(h|dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, size_t size, enum dma_data_direction direction)h]h|dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, size_t size, enum dma_data_direction direction)}hj)sbah}(h]h ]h"]h$]h&]jjuh1jqhhhKhjhhubh)}(hwMaps a piece of processor virtual memory so it can be accessed by the device and returns the DMA address of the memory.h]hwMaps a piece of processor virtual memory so it can be accessed by the device and returns the DMA address of the memory.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h?The DMA API uses a strongly typed enumerator for its direction:h]h?The DMA API uses a strongly typed enumerator for its direction:}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j]hjZubj^)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1j]hjZubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hDMA_NONEh]hDMA_NONE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j}hjzubj~)}(hhh]h)}(h!no direction (used for debugging)h]h!no direction (used for debugging)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j}hjzubeh}(h]h ]h"]h$]h&]uh1jxhjuubjy)}(hhh](j~)}(hhh]h)}(h DMA_TO_DEVICEh]h DMA_TO_DEVICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j}hjubj~)}(hhh]h)}(h+data is going from the memory to the deviceh]h+data is going from the memory to the device}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1jxhjuubjy)}(hhh](j~)}(hhh]h)}(hDMA_FROM_DEVICEh]hDMA_FROM_DEVICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j}hjubj~)}(hhh]h)}(h,data is coming from the device to the memoryh]h,data is coming from the device to the memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1jxhjuubjy)}(hhh](j~)}(hhh]h)}(hDMA_BIDIRECTIONALh]hDMA_BIDIRECTIONAL}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj$ubah}(h]h ]h"]h$]h&]uh1j}hj!ubj~)}(hhh]h)}(hdirection isn't knownh]hdirection isn’t known}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubah}(h]h ]h"]h$]h&]uh1j}hj!ubeh}(h]h ]h"]h$]h&]uh1jxhjuubeh}(h]h ]h"]h$]h&]uh1jshjZubeh}(h]h ]h"]h$]h&]colsKuh1jXhjUubah}(h]h ]h"]h$]h&]uh1jShjhhhhhNubj)}(hXmContiguous kernel virtual space may not be contiguous as physical memory. Since this API does not provide any scatter/gather capability, it will fail if the user tries to map a non-physically contiguous piece of memory. For this reason, memory to be mapped by this API should be obtained from sources which guarantee it to be physically contiguous (like kmalloc).h]h)}(hXmContiguous kernel virtual space may not be contiguous as physical memory. Since this API does not provide any scatter/gather capability, it will fail if the user tries to map a non-physically contiguous piece of memory. For this reason, memory to be mapped by this API should be obtained from sources which guarantee it to be physically contiguous (like kmalloc).h]hXmContiguous kernel virtual space may not be contiguous as physical memory. Since this API does not provide any scatter/gather capability, it will fail if the user tries to map a non-physically contiguous piece of memory. For this reason, memory to be mapped by this API should be obtained from sources which guarantee it to be physically contiguous (like kmalloc).}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjkubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubhwarning)}(hX Memory coherency operates at a granularity called the cache line width. In order for memory mapped by this API to operate correctly, the mapped region must begin exactly on a cache line boundary and end exactly on one (to prevent two separately mapped regions from sharing a single cache line). Since the cache line size may not be known at compile time, the API will not enforce this requirement. Therefore, it is recommended that driver writers who don't take special care to determine the cache line size at run time only map virtual regions that begin and end on page boundaries (which are guaranteed also to be cache line boundaries). DMA_TO_DEVICE synchronisation must be done after the last modification of the memory region by the software and before it is handed off to the device. Once this primitive is used, memory covered by this primitive should be treated as read-only by the device. If the device may write to it at any point, it should be DMA_BIDIRECTIONAL (see below). DMA_FROM_DEVICE synchronisation must be done before the driver accesses data that may be changed by the device. This memory should be treated as read-only by the driver. If the driver needs to write to it at any point, it should be DMA_BIDIRECTIONAL (see below). DMA_BIDIRECTIONAL requires special handling: it means that the driver isn't sure if the memory was modified before being handed off to the device and also isn't sure if the device will also modify it. Thus, you must always sync bidirectional memory twice: once before the memory is handed off to the device (to make sure all memory changes are flushed from the processor) and once before the data may be accessed after being used by the device (to make sure any processor cache lines are updated with data that the device may have changed).h](h)}(hXMemory coherency operates at a granularity called the cache line width. In order for memory mapped by this API to operate correctly, the mapped region must begin exactly on a cache line boundary and end exactly on one (to prevent two separately mapped regions from sharing a single cache line). Since the cache line size may not be known at compile time, the API will not enforce this requirement. Therefore, it is recommended that driver writers who don't take special care to determine the cache line size at run time only map virtual regions that begin and end on page boundaries (which are guaranteed also to be cache line boundaries).h]hXMemory coherency operates at a granularity called the cache line width. In order for memory mapped by this API to operate correctly, the mapped region must begin exactly on a cache line boundary and end exactly on one (to prevent two separately mapped regions from sharing a single cache line). Since the cache line size may not be known at compile time, the API will not enforce this requirement. Therefore, it is recommended that driver writers who don’t take special care to determine the cache line size at run time only map virtual regions that begin and end on page boundaries (which are guaranteed also to be cache line boundaries).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hX\DMA_TO_DEVICE synchronisation must be done after the last modification of the memory region by the software and before it is handed off to the device. Once this primitive is used, memory covered by this primitive should be treated as read-only by the device. If the device may write to it at any point, it should be DMA_BIDIRECTIONAL (see below).h]hX\DMA_TO_DEVICE synchronisation must be done after the last modification of the memory region by the software and before it is handed off to the device. Once this primitive is used, memory covered by this primitive should be treated as read-only by the device. If the device may write to it at any point, it should be DMA_BIDIRECTIONAL (see below).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXDMA_FROM_DEVICE synchronisation must be done before the driver accesses data that may be changed by the device. This memory should be treated as read-only by the driver. If the driver needs to write to it at any point, it should be DMA_BIDIRECTIONAL (see below).h]hXDMA_FROM_DEVICE synchronisation must be done before the driver accesses data that may be changed by the device. This memory should be treated as read-only by the driver. If the driver needs to write to it at any point, it should be DMA_BIDIRECTIONAL (see below).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXDMA_BIDIRECTIONAL requires special handling: it means that the driver isn't sure if the memory was modified before being handed off to the device and also isn't sure if the device will also modify it. Thus, you must always sync bidirectional memory twice: once before the memory is handed off to the device (to make sure all memory changes are flushed from the processor) and once before the data may be accessed after being used by the device (to make sure any processor cache lines are updated with data that the device may have changed).h]hX!DMA_BIDIRECTIONAL requires special handling: it means that the driver isn’t sure if the memory was modified before being handed off to the device and also isn’t sure if the device will also modify it. Thus, you must always sync bidirectional memory twice: once before the memory is handed off to the device (to make sure all memory changes are flushed from the processor) and once before the data may be accessed after being used by the device (to make sure any processor cache lines are updated with data that the device may have changed).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubjr)}(hvoid dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction direction)h]hvoid dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction direction)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhjhhubh)}(hUnmaps the region previously mapped. All the parameters passed in must be identical to those passed to (and returned by) dma_map_single().h]hUnmaps the region previously mapped. All the parameters passed in must be identical to those passed to (and returned by) dma_map_single().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjr)}(hXdma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction direction) void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, enum dma_data_direction direction)h]hXdma_addr_t dma_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, enum dma_data_direction direction) void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, enum dma_data_direction direction)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhjhhubh)}(hX"API for mapping and unmapping for pages. All the notes and warnings for the other mapping APIs apply here. Also, although the and parameters are provided to do partial page mapping, it is recommended that you never use these unless you really know what the cache width is.h]hX"API for mapping and unmapping for pages. All the notes and warnings for the other mapping APIs apply here. Also, although the and parameters are provided to do partial page mapping, it is recommended that you never use these unless you really know what the cache width is.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubjr)}(hX&dma_addr_t dma_map_resource(struct device *dev, phys_addr_t phys_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) void dma_unmap_resource(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir, unsigned long attrs)h]hX&dma_addr_t dma_map_resource(struct device *dev, phys_addr_t phys_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) void dma_unmap_resource(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir, unsigned long attrs)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhM(hjhhubh)}(hAPI for mapping and unmapping for MMIO resources. All the notes and warnings for the other mapping APIs apply here. The API should only be used to map device MMIO resources, mapping of RAM is not permitted.h]hAPI for mapping and unmapping for MMIO resources. All the notes and warnings for the other mapping APIs apply here. The API should only be used to map device MMIO resources, mapping of RAM is not permitted.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hjhhubjr)}(h>int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)h]h>int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhM6hjhhubh)}(hXIn some circumstances dma_map_single(), dma_map_page() and dma_map_resource() will fail to create a mapping. A driver can check for these errors by testing the returned DMA address with dma_mapping_error(). A non-zero return value means the mapping could not be created and the driver should take appropriate action (e.g. reduce current DMA mapping usage or delay and try again later).h]hXIn some circumstances dma_map_single(), dma_map_page() and dma_map_resource() will fail to create a mapping. A driver can check for these errors by testing the returned DMA address with dma_mapping_error(). A non-zero return value means the mapping could not be created and the driver should take appropriate action (e.g. reduce current DMA mapping usage or delay and try again later).}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjhhubjr)}(hsint dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction)h]hsint dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction)}hj7sbah}(h]h ]h"]h$]h&]jjuh1jqhhhMAhjhhubh)}(hXMaps a scatter/gather list for DMA. Returns the number of DMA address segments mapped, which may be smaller than passed in if several consecutive sglist entries are merged (e.g. with an IOMMU, or if some adjacent segments just happen to be physically contiguous).h]hXMaps a scatter/gather list for DMA. Returns the number of DMA address segments mapped, which may be smaller than passed in if several consecutive sglist entries are merged (e.g. with an IOMMU, or if some adjacent segments just happen to be physically contiguous).}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjhhubh)}(hPlease note that the sg cannot be mapped again if it has been mapped once. The mapping process is allowed to destroy information in the sg.h]hPlease note that the sg cannot be mapped again if it has been mapped once. The mapping process is allowed to destroy information in the sg.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjhhubh)}(hX/As with the other mapping interfaces, dma_map_sg() can fail. When it does, 0 is returned and a driver must take appropriate action. It is critical that the driver do something, in the case of a block driver aborting the request or even oopsing is better than doing nothing and corrupting the filesystem.h]hX/As with the other mapping interfaces, dma_map_sg() can fail. When it does, 0 is returned and a driver must take appropriate action. It is critical that the driver do something, in the case of a block driver aborting the request or even oopsing is better than doing nothing and corrupting the filesystem.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjhhubh)}(haddress and sg->length as shown above.h]hThen you should loop count times (note: this can be less than nents times) and use sg_dma_address() and sg_dma_len() macros where you previously accessed sg->address and sg->length as shown above.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchjhhubjr)}(hxvoid dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction)h]hxvoid dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMihjhhubh)}(hUnmap the previously mapped scatter/gather list. All the parameters must be the same as those and passed in to the scatter/gather mapping API.h]hUnmap the previously mapped scatter/gather list. All the parameters must be the same as those and passed in to the scatter/gather mapping API.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhjhhubh)}(haNote: must be the number you passed in, *not* the number of DMA address entries returned.h](h0Note: must be the number you passed in, }(hjhhhNhNubhemphasis)}(h*not*h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, the number of DMA address entries returned.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMqhjhhubjr)}(hXvoid dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction)h]hXvoid dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction direction) void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction) void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction direction)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMvhjhhubh)}(hXQSynchronise a single contiguous or scatter/gather mapping for the CPU and device. With the sync_sg API, all the parameters must be the same as those passed into the sg mapping API. With the sync_single API, you can use dma_handle and size parameters that aren't identical to those passed into the single mapping API to do a partial sync.h]hXSSynchronise a single contiguous or scatter/gather mapping for the CPU and device. With the sync_sg API, all the parameters must be the same as those passed into the sg mapping API. With the sync_single API, you can use dma_handle and size parameters that aren’t identical to those passed into the single mapping API to do a partial sync.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(hX=You must do this: - Before reading values that have been written by DMA from the device (use the DMA_FROM_DEVICE direction) - After writing values that will be written to the device using DMA (use the DMA_TO_DEVICE) direction - before *and* after handing memory to the device if the memory is DMA_BIDIRECTIONALh](h)}(hYou must do this:h]hYou must do this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh bullet_list)}(hhh](h list_item)}(hgBefore reading values that have been written by DMA from the device (use the DMA_FROM_DEVICE direction)h]h)}(hgBefore reading values that have been written by DMA from the device (use the DMA_FROM_DEVICE direction)h]hgBefore reading values that have been written by DMA from the device (use the DMA_FROM_DEVICE direction)}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubah}(h]h ]h"]h$]h&]uh1j&hj#ubj')}(hcAfter writing values that will be written to the device using DMA (use the DMA_TO_DEVICE) directionh]h)}(hcAfter writing values that will be written to the device using DMA (use the DMA_TO_DEVICE) directionh]hcAfter writing values that will be written to the device using DMA (use the DMA_TO_DEVICE) direction}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj@ubah}(h]h ]h"]h$]h&]uh1j&hj#ubj')}(hRbefore *and* after handing memory to the device if the memory is DMA_BIDIRECTIONALh]h)}(hRbefore *and* after handing memory to the device if the memory is DMA_BIDIRECTIONALh](hbefore }(hj\hhhNhNubj)}(h*and*h]hand}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubhF after handing memory to the device if the memory is DMA_BIDIRECTIONAL}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjXubah}(h]h ]h"]h$]h&]uh1j&hj#ubeh}(h]h ]h"]h$]h&]bullet-uh1j!hhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hSee also dma_map_single().h]hSee also dma_map_single().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjr)}(hXdma_addr_t dma_map_single_attrs(struct device *dev, void *cpu_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) void dma_unmap_single_attrs(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) int dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs) void dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs)h]hXdma_addr_t dma_map_single_attrs(struct device *dev, void *cpu_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) void dma_unmap_single_attrs(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) int dma_map_sg_attrs(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs) void dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sgl, int nents, enum dma_data_direction dir, unsigned long attrs)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhjhhubh)}(hThe four functions above are just like the counterpart functions without the _attrs suffixes, except that they pass an optional dma_attrs.h]hThe four functions above are just like the counterpart functions without the _attrs suffixes, except that they pass an optional dma_attrs.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe interpretation of DMA attributes is architecture-specific, and each attribute should be documented in Documentation/core-api/dma-attributes.rst.h]hThe interpretation of DMA attributes is architecture-specific, and each attribute should be documented in Documentation/core-api/dma-attributes.rst.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hIf dma_attrs are 0, the semantics of each of these functions is identical to those of the corresponding function without the _attrs suffix. As a result dma_map_single_attrs() can generally replace dma_map_single(), etc.h]hIf dma_attrs are 0, the semantics of each of these functions is identical to those of the corresponding function without the _attrs suffix. As a result dma_map_single_attrs() can generally replace dma_map_single(), etc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hAs an example of the use of the ``*_attrs`` functions, here's how you could pass an attribute DMA_ATTR_FOO when mapping memory for DMA::h](h As an example of the use of the }(hjhhhNhNubj)}(h ``*_attrs``h]h*_attrs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh^ functions, here’s how you could pass an attribute DMA_ATTR_FOO when mapping memory for DMA:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjr)}(hX4#include /* DMA_ATTR_FOO should be defined in linux/dma-mapping.h and * documented in Documentation/core-api/dma-attributes.rst */ ... unsigned long attr; attr |= DMA_ATTR_FOO; .... n = dma_map_sg_attrs(dev, sg, nents, DMA_TO_DEVICE, attr); ....h]hX4#include /* DMA_ATTR_FOO should be defined in linux/dma-mapping.h and * documented in Documentation/core-api/dma-attributes.rst */ ... unsigned long attr; attr |= DMA_ATTR_FOO; .... n = dma_map_sg_attrs(dev, sg, nents, DMA_TO_DEVICE, attr); ....}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhjhhubh)}(hArchitectures that care about DMA_ATTR_FOO would check for its presence in their implementations of the mapping and unmapping routines, e.g.:::h]hArchitectures that care about DMA_ATTR_FOO would check for its presence in their implementations of the mapping and unmapping routines, e.g.::}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjr)}(hX+void whizco_dma_map_sg_attrs(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) { .... if (attrs & DMA_ATTR_FOO) /* twizzle the frobnozzle */ .... }h]hX+void whizco_dma_map_sg_attrs(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) { .... if (attrs & DMA_ATTR_FOO) /* twizzle the frobnozzle */ .... }}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhjhhubeh}(h]part-id-streaming-dma-mappingsah ]h"] part id - streaming dma mappingsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h!Part Ie - IOVA-based DMA mappingsh]h!Part Ie - IOVA-based DMA mappings}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hhhhhMubh)}(hX5These APIs allow a very efficient mapping when using an IOMMU. They are an optional path that requires extra code and are only recommended for drivers where DMA mapping performance, or the space usage for storing the DMA addresses matter. All the considerations from the previous section apply here as well.h]hX5These APIs allow a very efficient mapping when using an IOMMU. They are an optional path that requires extra code and are only recommended for drivers where DMA mapping performance, or the space usage for storing the DMA addresses matter. All the considerations from the previous section apply here as well.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubjr)}(hubool dma_iova_try_alloc(struct device *dev, struct dma_iova_state *state, phys_addr_t phys, size_t size);h]hubool dma_iova_try_alloc(struct device *dev, struct dma_iova_state *state, phys_addr_t phys, size_t size);}hjGsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj(hhubh)}(hXIs used to try to allocate IOVA space for mapping operation. If it returns false this API can't be used for the given device and the normal streaming DMA mapping API should be used. The ``struct dma_iova_state`` is allocated by the driver and must be kept around until unmap time.h](hIs used to try to allocate IOVA space for mapping operation. If it returns false this API can’t be used for the given device and the normal streaming DMA mapping API should be used. The }(hjUhhhNhNubj)}(h``struct dma_iova_state``h]hstruct dma_iova_state}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubhE is allocated by the driver and must be kept around until unmap time.}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubjr)}(h=static inline bool dma_use_iova(struct dma_iova_state *state)h]h=static inline bool dma_use_iova(struct dma_iova_state *state)}hjusbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj(hhubh)}(hCan be used by the driver to check if the IOVA-based API is used after a call to dma_iova_try_alloc. This can be useful in the unmap path.h]hCan be used by the driver to check if the IOVA-based API is used after a call to dma_iova_try_alloc. This can be useful in the unmap path.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubjr)}(hint dma_iova_link(struct device *dev, struct dma_iova_state *state, phys_addr_t phys, size_t offset, size_t size, enum dma_data_direction dir, unsigned long attrs);h]hint dma_iova_link(struct device *dev, struct dma_iova_state *state, phys_addr_t phys, size_t offset, size_t size, enum dma_data_direction dir, unsigned long attrs);}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj(hhubh)}(hX/Is used to link ranges to the IOVA previously allocated. The start of all but the first call to dma_iova_link for a given state must be aligned to the DMA merge boundary returned by ``dma_get_merge_boundary())``, and the size of all but the last range must be aligned to the DMA merge boundary as well.h](hIs used to link ranges to the IOVA previously allocated. The start of all but the first call to dma_iova_link for a given state must be aligned to the DMA merge boundary returned by }(hjhhhNhNubj)}(h``dma_get_merge_boundary())``h]hdma_get_merge_boundary())}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh[, and the size of all but the last range must be aligned to the DMA merge boundary as well.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubjr)}(hlint dma_iova_sync(struct device *dev, struct dma_iova_state *state, size_t offset, size_t size);h]hlint dma_iova_sync(struct device *dev, struct dma_iova_state *state, size_t offset, size_t size);}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj(hhubh)}(hoMust be called to sync the IOMMU page tables for IOVA-range mapped by one or more calls to ``dma_iova_link()``.h](h[Must be called to sync the IOMMU page tables for IOVA-range mapped by one or more calls to }(hjhhhNhNubj)}(h``dma_iova_link()``h]hdma_iova_link()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubh)}(hbFor drivers that use a one-shot mapping, all ranges can be unmapped and the IOVA freed by calling:h]hbFor drivers that use a one-shot mapping, all ranges can be unmapped and the IOVA freed by calling:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj(hhubjr)}(hvoid dma_iova_destroy(struct device *dev, struct dma_iova_state *state, size_t mapped_len, enum dma_data_direction dir, unsigned long attrs);h]hvoid dma_iova_destroy(struct device *dev, struct dma_iova_state *state, size_t mapped_len, enum dma_data_direction dir, unsigned long attrs);}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj(hhubh)}(hvAlternatively drivers can dynamically manage the IOVA space by unmapping and mapping individual regions. In that caseh]hvAlternatively drivers can dynamically manage the IOVA space by unmapping and mapping individual regions. In that case}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubjr)}(hvoid dma_iova_unlink(struct device *dev, struct dma_iova_state *state, size_t offset, size_t size, enum dma_data_direction dir, unsigned long attrs);h]hvoid dma_iova_unlink(struct device *dev, struct dma_iova_state *state, size_t offset, size_t size, enum dma_data_direction dir, unsigned long attrs);}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj(hhubh)}(h/is used to unmap a range previously mapped, andh]h/is used to unmap a range previously mapped, and}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubjr)}(hEvoid dma_iova_free(struct device *dev, struct dma_iova_state *state);h]hEvoid dma_iova_free(struct device *dev, struct dma_iova_state *state);}hj3sbah}(h]h ]h"]h$]h&]jjuh1jqhhhM!hj(hhubh)}(his used to free the IOVA space. All regions must have been unmapped using ``dma_iova_unlink()`` before calling ``dma_iova_free()``.h](hKis used to free the IOVA space. All regions must have been unmapped using }(hjAhhhNhNubj)}(h``dma_iova_unlink()``h]hdma_iova_unlink()}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh before calling }(hjAhhhNhNubj)}(h``dma_iova_free()``h]hdma_iova_free()}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM#hj(hhubeh}(h]part-ie-iova-based-dma-mappingsah ]h"]!part ie - iova-based dma mappingsah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(h&Part II - Non-coherent DMA allocationsh]h&Part II - Non-coherent DMA allocations}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hhhhhM'ubh)}(hThese APIs allow to allocate pages that are guaranteed to be DMA addressable by the passed in device, but which need explicit management of memory ownership for the kernel vs the device.h]hThese APIs allow to allocate pages that are guaranteed to be DMA addressable by the passed in device, but which need explicit management of memory ownership for the kernel vs the device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj{hhubh)}(hIf you don't understand how cache line coherency works between a processor and an I/O device, you should not be using this part of the API.h]hIf you don’t understand how cache line coherency works between a processor and an I/O device, you should not be using this part of the API.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj{hhubjr)}(hstruct page * dma_alloc_pages(struct device *dev, size_t size, dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp)h]hstruct page * dma_alloc_pages(struct device *dev, size_t size, dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhM2hj{hhubh)}(hThis routine allocates a region of bytes of non-coherent memory. It returns a pointer to first struct page for the region, or NULL if the allocation failed. The resulting struct page can be used for everything a struct page is suitable for.h]hThis routine allocates a region of bytes of non-coherent memory. It returns a pointer to first struct page for the region, or NULL if the allocation failed. The resulting struct page can be used for everything a struct page is suitable for.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj{hhubh)}(hIt also returns a which may be cast to an unsigned integer the same width as the bus and given to the device as the DMA address base of the region.h]hIt also returns a which may be cast to an unsigned integer the same width as the bus and given to the device as the DMA address base of the region.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj{hhubh)}(hkThe dir parameter specified if data is read and/or written by the device, see dma_map_single() for details.h]hkThe dir parameter specified if data is read and/or written by the device, see dma_map_single() for details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj{hhubh)}(hThe gfp parameter allows the caller to specify the ``GFP_`` flags (see kmalloc()) for the allocation, but rejects flags used to specify a memory zone such as GFP_DMA or GFP_HIGHMEM.h](h3The gfp parameter allows the caller to specify the }(hjhhhNhNubj)}(h``GFP_``h]hGFP_}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhz flags (see kmalloc()) for the allocation, but rejects flags used to specify a memory zone such as GFP_DMA or GFP_HIGHMEM.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMBhj{hhubh)}(hBefore giving the memory to the device, dma_sync_single_for_device() needs to be called, and before reading memory written by the device, dma_sync_single_for_cpu(), just like for streaming DMA mappings that are reused.h]hBefore giving the memory to the device, dma_sync_single_for_device() needs to be called, and before reading memory written by the device, dma_sync_single_for_cpu(), just like for streaming DMA mappings that are reused.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj{hhubjr)}(hvoid dma_free_pages(struct device *dev, size_t size, struct page *page, dma_addr_t dma_handle, enum dma_data_direction dir)h]hvoid dma_free_pages(struct device *dev, size_t size, struct page *page, dma_addr_t dma_handle, enum dma_data_direction dir)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMMhj{hhubh)}(hFree a region of memory previously allocated using dma_alloc_pages(). dev, size, dma_handle and dir must all be the same as those passed into dma_alloc_pages(). page must be the pointer returned by dma_alloc_pages().h]hFree a region of memory previously allocated using dma_alloc_pages(). dev, size, dma_handle and dir must all be the same as those passed into dma_alloc_pages(). page must be the pointer returned by dma_alloc_pages().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj{hhubjr)}(hqint dma_mmap_pages(struct device *dev, struct vm_area_struct *vma, size_t size, struct page *page)h]hqint dma_mmap_pages(struct device *dev, struct vm_area_struct *vma, size_t size, struct page *page)}hj*sbah}(h]h ]h"]h$]h&]jjuh1jqhhhMWhj{hhubh)}(hMap an allocation returned from dma_alloc_pages() into a user address space. dev and size must be the same as those passed into dma_alloc_pages(). page must be the pointer returned by dma_alloc_pages().h]hMap an allocation returned from dma_alloc_pages() into a user address space. dev and size must be the same as those passed into dma_alloc_pages(). page must be the pointer returned by dma_alloc_pages().}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hj{hhubjr)}(hvoid * dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp)h]hvoid * dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_handle, enum dma_data_direction dir, gfp_t gfp)}hjFsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMahj{hhubh)}(hThis routine is a convenient wrapper around dma_alloc_pages that returns the kernel virtual address for the allocated memory instead of the page structure.h]hThis routine is a convenient wrapper around dma_alloc_pages that returns the kernel virtual address for the allocated memory instead of the page structure.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhj{hhubjr)}(hvoid dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_handle, enum dma_data_direction dir)h]hvoid dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_handle, enum dma_data_direction dir)}hjbsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMkhj{hhubh)}(hFree a region of memory previously allocated using dma_alloc_noncoherent(). dev, size, dma_handle and dir must all be the same as those passed into dma_alloc_noncoherent(). cpu_addr must be the virtual address returned by dma_alloc_noncoherent().h]hFree a region of memory previously allocated using dma_alloc_noncoherent(). dev, size, dma_handle and dir must all be the same as those passed into dma_alloc_noncoherent(). cpu_addr must be the virtual address returned by dma_alloc_noncoherent().}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohj{hhubjr)}(hstruct sg_table * dma_alloc_noncontiguous(struct device *dev, size_t size, enum dma_data_direction dir, gfp_t gfp, unsigned long attrs);h]hstruct sg_table * dma_alloc_noncontiguous(struct device *dev, size_t size, enum dma_data_direction dir, gfp_t gfp, unsigned long attrs);}hj~sbah}(h]h ]h"]h$]h&]jjuh1jqhhhMvhj{hhubh)}(hX4This routine allocates bytes of non-coherent and possibly non-contiguous memory. It returns a pointer to struct sg_table that describes the allocated and DMA mapped memory, or NULL if the allocation failed. The resulting memory can be used for struct page mapped into a scatterlist are suitable for.h]hX4This routine allocates bytes of non-coherent and possibly non-contiguous memory. It returns a pointer to struct sg_table that describes the allocated and DMA mapped memory, or NULL if the allocation failed. The resulting memory can be used for struct page mapped into a scatterlist are suitable for.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hj{hhubh)}(hThe return sg_table is guaranteed to have 1 single DMA mapped segment as indicated by sgt->nents, but it might have multiple CPU side segments as indicated by sgt->orig_nents.h]hThe return sg_table is guaranteed to have 1 single DMA mapped segment as indicated by sgt->nents, but it might have multiple CPU side segments as indicated by sgt->orig_nents.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubh)}(hkThe dir parameter specified if data is read and/or written by the device, see dma_map_single() for details.h]hkThe dir parameter specified if data is read and/or written by the device, see dma_map_single() for details.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubh)}(hThe gfp parameter allows the caller to specify the ``GFP_`` flags (see kmalloc()) for the allocation, but rejects flags used to specify a memory zone such as GFP_DMA or GFP_HIGHMEM.h](h3The gfp parameter allows the caller to specify the }(hjhhhNhNubj)}(h``GFP_``h]hGFP_}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhz flags (see kmalloc()) for the allocation, but rejects flags used to specify a memory zone such as GFP_DMA or GFP_HIGHMEM.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubh)}(hCThe attrs argument must be either 0 or DMA_ATTR_ALLOC_SINGLE_PAGES.h]hCThe attrs argument must be either 0 or DMA_ATTR_ALLOC_SINGLE_PAGES.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubh)}(hBefore giving the memory to the device, dma_sync_sgtable_for_device() needs to be called, and before reading memory written by the device, dma_sync_sgtable_for_cpu(), just like for streaming DMA mappings that are reused.h]hBefore giving the memory to the device, dma_sync_sgtable_for_device() needs to be called, and before reading memory written by the device, dma_sync_sgtable_for_cpu(), just like for streaming DMA mappings that are reused.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubjr)}(hvoid dma_free_noncontiguous(struct device *dev, size_t size, struct sg_table *sgt, enum dma_data_direction dir)h]hvoid dma_free_noncontiguous(struct device *dev, size_t size, struct sg_table *sgt, enum dma_data_direction dir)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj{hhubh)}(hFree memory previously allocated using dma_alloc_noncontiguous(). dev, size, and dir must all be the same as those passed into dma_alloc_noncontiguous(). sgt must be the pointer returned by dma_alloc_noncontiguous().h]hFree memory previously allocated using dma_alloc_noncontiguous(). dev, size, and dir must all be the same as those passed into dma_alloc_noncontiguous(). sgt must be the pointer returned by dma_alloc_noncontiguous().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubjr)}(h\void * dma_vmap_noncontiguous(struct device *dev, size_t size, struct sg_table *sgt)h]h\void * dma_vmap_noncontiguous(struct device *dev, size_t size, struct sg_table *sgt)}hjsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj{hhubh)}(hReturn a contiguous kernel mapping for an allocation returned from dma_alloc_noncontiguous(). dev and size must be the same as those passed into dma_alloc_noncontiguous(). sgt must be the pointer returned by dma_alloc_noncontiguous().h]hReturn a contiguous kernel mapping for an allocation returned from dma_alloc_noncontiguous(). dev and size must be the same as those passed into dma_alloc_noncontiguous(). sgt must be the pointer returned by dma_alloc_noncontiguous().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubh)}(hOnce a non-contiguous allocation is mapped using this function, the flush_kernel_vmap_range() and invalidate_kernel_vmap_range() APIs must be used to manage the coherency between the kernel mapping, the device and user space mappings (if any).h]hOnce a non-contiguous allocation is mapped using this function, the flush_kernel_vmap_range() and invalidate_kernel_vmap_range() APIs must be used to manage the coherency between the kernel mapping, the device and user space mappings (if any).}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubjr)}(h>void dma_vunmap_noncontiguous(struct device *dev, void *vaddr)h]h>void dma_vunmap_noncontiguous(struct device *dev, void *vaddr)}hj8sbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj{hhubh)}(hUnmap a kernel mapping returned by dma_vmap_noncontiguous(). dev must be the same the one passed into dma_alloc_noncontiguous(). vaddr must be the pointer returned by dma_vmap_noncontiguous().h]hUnmap a kernel mapping returned by dma_vmap_noncontiguous(). dev must be the same the one passed into dma_alloc_noncontiguous(). vaddr must be the pointer returned by dma_vmap_noncontiguous().}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubjr)}(hint dma_mmap_noncontiguous(struct device *dev, struct vm_area_struct *vma, size_t size, struct sg_table *sgt)h]hint dma_mmap_noncontiguous(struct device *dev, struct vm_area_struct *vma, size_t size, struct sg_table *sgt)}hjTsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj{hhubh)}(hMap an allocation returned from dma_alloc_noncontiguous() into a user address space. dev and size must be the same as those passed into dma_alloc_noncontiguous(). sgt must be the pointer returned by dma_alloc_noncontiguous().h]hMap an allocation returned from dma_alloc_noncontiguous() into a user address space. dev and size must be the same as those passed into dma_alloc_noncontiguous(). sgt must be the pointer returned by dma_alloc_noncontiguous().}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubjr)}(h!int dma_get_cache_alignment(void)h]h!int dma_get_cache_alignment(void)}hjpsbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhj{hhubh)}(hReturns the processor cache alignment. This is the absolute minimum alignment *and* width that you must observe when either mapping memory or doing partial flushes.h](hOReturns the processor cache alignment. This is the absolute minimum alignment }(hj~hhhNhNubj)}(h*and*h]hand}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubhQ width that you must observe when either mapping memory or doing partial flushes.}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj{hhubj)}(hThis API may return a number *larger* than the actual cache line, but it will guarantee that one or more cache lines fit exactly into the width returned by this call. It will also always be a power of two for easy alignment.h]h)}(hThis API may return a number *larger* than the actual cache line, but it will guarantee that one or more cache lines fit exactly into the width returned by this call. It will also always be a power of two for easy alignment.h](hThis API may return a number }(hjhhhNhNubj)}(h*larger*h]hlarger}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh than the actual cache line, but it will guarantee that one or more cache lines fit exactly into the width returned by this call. It will also always be a power of two for easy alignment.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj{hhhhhNubeh}(h]$part-ii-non-coherent-dma-allocationsah ]h"]&part ii - non-coherent dma allocationsah$]h&]uh1hhhhhhhhM'ubh)}(hhh](h)}(h+Part III - Debug drivers use of the DMA APIh]h+Part III - Debug drivers use of the DMA API}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXfThe DMA API as described above has some constraints. DMA addresses must be released with the corresponding function with the same size for example. With the advent of hardware IOMMUs it becomes more and more important that drivers do not violate those constraints. In the worst case such a violation can result in data corruption up to destroyed filesystems.h]hXfThe DMA API as described above has some constraints. DMA addresses must be released with the corresponding function with the same size for example. With the advent of hardware IOMMUs it becomes more and more important that drivers do not violate those constraints. In the worst case such a violation can result in data corruption up to destroyed filesystems.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXrTo debug drivers and find bugs in the usage of the DMA API checking code can be compiled into the kernel which will tell the developer about those violations. If your architecture supports it you can select the "Enable debugging of DMA API usage" option in your kernel configuration. Enabling this option has a performance impact. Do not enable it in production kernels.h]hXvTo debug drivers and find bugs in the usage of the DMA API checking code can be compiled into the kernel which will tell the developer about those violations. If your architecture supports it you can select the “Enable debugging of DMA API usage” option in your kernel configuration. Enabling this option has a performance impact. Do not enable it in production kernels.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hXIf you boot the resulting kernel will contain code which does some bookkeeping about what DMA memory was allocated for which device. If this code detects an error it prints a warning message with some details into your kernel log. An example warning message may look like this::h]hXIf you boot the resulting kernel will contain code which does some bookkeeping about what DMA memory was allocated for which device. If this code detects an error it prints a warning message with some details into your kernel log. An example warning message may look like this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjr)}(hXWARNING: at /data2/repos/linux-2.6-iommu/lib/dma-debug.c:448 check_unmap+0x203/0x490() Hardware name: forcedeth 0000:00:08.0: DMA-API: device driver frees DMA memory with wrong function [device address=0x00000000640444be] [size=66 bytes] [mapped as single] [unmapped as page] Modules linked in: nfsd exportfs bridge stp llc r8169 Pid: 0, comm: swapper Tainted: G W 2.6.28-dmatest-09289-g8bb99c0 #1 Call Trace: [] warn_slowpath+0xf2/0x130 [] _spin_unlock+0x10/0x30 [] usb_hcd_link_urb_to_ep+0x75/0xc0 [] _spin_unlock_irqrestore+0x12/0x40 [] ohci_urb_enqueue+0x19f/0x7c0 [] queue_work+0x56/0x60 [] enqueue_task_fair+0x20/0x50 [] usb_hcd_submit_urb+0x379/0xbc0 [] cpumask_next_and+0x23/0x40 [] find_busiest_group+0x207/0x8a0 [] _spin_lock_irqsave+0x1f/0x50 [] check_unmap+0x203/0x490 [] debug_dma_unmap_page+0x49/0x50 [] nv_tx_done_optimized+0xc6/0x2c0 [] nv_nic_irq_optimized+0x73/0x2b0 [] handle_IRQ_event+0x34/0x70 [] handle_edge_irq+0xc9/0x150 [] do_IRQ+0xcb/0x1c0 [] ret_from_intr+0x0/0xa <4>---[ end trace f6435a98e2a38c0e ]---h]hXWARNING: at /data2/repos/linux-2.6-iommu/lib/dma-debug.c:448 check_unmap+0x203/0x490() Hardware name: forcedeth 0000:00:08.0: DMA-API: device driver frees DMA memory with wrong function [device address=0x00000000640444be] [size=66 bytes] [mapped as single] [unmapped as page] Modules linked in: nfsd exportfs bridge stp llc r8169 Pid: 0, comm: swapper Tainted: G W 2.6.28-dmatest-09289-g8bb99c0 #1 Call Trace: [] warn_slowpath+0xf2/0x130 [] _spin_unlock+0x10/0x30 [] usb_hcd_link_urb_to_ep+0x75/0xc0 [] _spin_unlock_irqrestore+0x12/0x40 [] ohci_urb_enqueue+0x19f/0x7c0 [] queue_work+0x56/0x60 [] enqueue_task_fair+0x20/0x50 [] usb_hcd_submit_urb+0x379/0xbc0 [] cpumask_next_and+0x23/0x40 [] find_busiest_group+0x207/0x8a0 [] _spin_lock_irqsave+0x1f/0x50 [] check_unmap+0x203/0x490 [] debug_dma_unmap_page+0x49/0x50 [] nv_tx_done_optimized+0xc6/0x2c0 [] nv_nic_irq_optimized+0x73/0x2b0 [] handle_IRQ_event+0x34/0x70 [] handle_edge_irq+0xc9/0x150 [] do_IRQ+0xcb/0x1c0 [] ret_from_intr+0x0/0xa <4>---[ end trace f6435a98e2a38c0e ]---}hj sbah}(h]h ]h"]h$]h&]jjuh1jqhhhMhjhhubh)}(h}The driver developer can find the driver and the device including a stacktrace of the DMA API call which caused this warning.h]h}The driver developer can find the driver and the device including a stacktrace of the DMA API call which caused this warning.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hX:Per default only the first error will result in a warning message. All other errors will only silently counted. This limitation exist to prevent the code from flooding your kernel log. To support debugging a device driver this can be disabled via debugfs. See the debugfs interface documentation below for details.h]hX:Per default only the first error will result in a warning message. All other errors will only silently counted. This limitation exist to prevent the code from flooding your kernel log. To support debugging a device driver this can be disabled via debugfs. See the debugfs interface documentation below for details.}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hThe debugfs directory for the DMA API debugging code is called dma-api/. In this directory the following files can currently be found:h]hThe debugfs directory for the DMA API debugging code is called dma-api/. In this directory the following files can currently be found:}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjT)}(hhh]jY)}(hhh](j^)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j]hjF ubj^)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1j]hjF ubjt)}(hhh](jy)}(hhh](j~)}(hhh]h)}(hdma-api/all_errorsh]hdma-api/all_errors}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjc ubah}(h]h ]h"]h$]h&]uh1j}hj` ubj~)}(hhh]h)}(hThis file contains a numeric value. If this value is not equal to zero the debugging code will print a warning for every error it finds into the kernel log. Be careful with this option, as it can easily flood your logs.h]hThis file contains a numeric value. If this value is not equal to zero the debugging code will print a warning for every error it finds into the kernel log. Be careful with this option, as it can easily flood your logs.}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjz ubah}(h]h ]h"]h$]h&]uh1j}hj` ubeh}(h]h ]h"]h$]h&]uh1jxhj] ubjy)}(hhh](j~)}(hhh]h)}(hdma-api/disabledh]hdma-api/disabled}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j}hj ubj~)}(hhh]h)}(hThis read-only file contains the character 'Y' if the debugging code is disabled. This can happen when it runs out of memory or if it was disabled at boot timeh]hThis read-only file contains the character ‘Y’ if the debugging code is disabled. This can happen when it runs out of memory or if it was disabled at boot time}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j}hj ubeh}(h]h ]h"]h$]h&]uh1jxhj] ubjy)}(hhh](j~)}(hhh]h)}(h dma-api/dumph]h dma-api/dump}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j}hj ubj~)}(hhh]h)}(h2This read-only file contains current DMA mappings.h]h2This read-only file contains current DMA mappings.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j}hj ubeh}(h]h ]h"]h$]h&]uh1jxhj] ubjy)}(hhh](j~)}(hhh]h)}(hdma-api/error_counth]hdma-api/error_count}(hj !hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj!ubah}(h]h ]h"]h$]h&]uh1j}hj!ubj~)}(hhh]h)}(hCThis file is read-only and shows the total numbers of errors found.h]hCThis file is read-only and shows the total numbers of errors found.}(hj"!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj!ubah}(h]h ]h"]h$]h&]uh1j}hj!ubeh}(h]h ]h"]h$]h&]uh1jxhj] ubjy)}(hhh](j~)}(hhh]h)}(hdma-api/num_errorsh]hdma-api/num_errors}(hjB!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hj?!ubah}(h]h ]h"]h$]h&]uh1j}hjThe current number of free dma_debug_entries in the allocator.h]h>The current number of free dma_debug_entries in the allocator.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj!ubah}(h]h ]h"]h$]h&]uh1j}hj!ubeh}(h]h ]h"]h$]h&]uh1jxhj] ubjy)}(hhh](j~)}(hhh]h)}(hdma-api/nr_total_entriesh]hdma-api/nr_total_entries}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hj!ubah}(h]h ]h"]h$]h&]uh1j}hj!ubj~)}(hhh]h)}(hKThe total number of dma_debug_entries in the allocator, both free and used.h]hKThe total number of dma_debug_entries in the allocator, both free and used.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hj!ubah}(h]h ]h"]h$]h&]uh1j}hj!ubeh}(h]h ]h"]h$]h&]uh1jxhj] ubjy)}(hhh](j~)}(hhh]h)}(hdma-api/driver_filterh]hdma-api/driver_filter}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj"ubah}(h]h ]h"]h$]h&]uh1j}hj"ubj~)}(hhh]h)}(hYou can write a name of a driver into this file to limit the debug output to requests from that particular driver. Write an empty string to that file to disable the filter and see all errors again.h]hYou can write a name of a driver into this file to limit the debug output to requests from that particular driver. Write an empty string to that file to disable the filter and see all errors again.}(hj5"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj2"ubah}(h]h ]h"]h$]h&]uh1j}hj"ubeh}(h]h ]h"]h$]h&]uh1jxhj] ubeh}(h]h ]h"]h$]h&]uh1jshjF ubeh}(h]h ]h"]h$]h&]colsKuh1jXhjC ubah}(h]h ]h"]h$]h&]uh1jShjhhhhhNubh)}(hX,If you have this code compiled into your kernel it will be enabled by default. If you want to boot without the bookkeeping anyway you can provide 'dma_debug=off' as a boot parameter. This will disable DMA API debugging. Notice that you can not enable it again at runtime. You have to reboot to do so.h]hX0If you have this code compiled into your kernel it will be enabled by default. If you want to boot without the bookkeeping anyway you can provide ‘dma_debug=off’ as a boot parameter. This will disable DMA API debugging. Notice that you can not enable it again at runtime. You have to reboot to do so.}(hjb"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjhhubh)}(hX.If you want to see debug messages only for a special device driver you can specify the dma_debug_driver= parameter. This will enable the driver filter at boot time. The debug code will only print errors for that driver afterwards. This filter can be disabled or changed later using debugfs.h]hX.If you want to see debug messages only for a special device driver you can specify the dma_debug_driver= parameter. This will enable the driver filter at boot time. The debug code will only print errors for that driver afterwards. This filter can be disabled or changed later using debugfs.}(hjp"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjhhubh)}(hXWhen the code disables itself at runtime this is most likely because it ran out of dma_debug_entries and was unable to allocate more on-demand. 65536 entries are preallocated at boot - if this is too low for you boot with 'dma_debug_entries=' to overwrite the default. Note that the code allocates entries in batches, so the exact number of preallocated entries may be greater than the actual number requested. The code will print to the kernel log each time it has dynamically allocated as many entries as were initially preallocated. This is to indicate that a larger preallocation size may be appropriate, or if it happens continually that a driver may be leaking mappings.h]hXWhen the code disables itself at runtime this is most likely because it ran out of dma_debug_entries and was unable to allocate more on-demand. 65536 entries are preallocated at boot - if this is too low for you boot with ‘dma_debug_entries=’ to overwrite the default. Note that the code allocates entries in batches, so the exact number of preallocated entries may be greater than the actual number requested. The code will print to the kernel log each time it has dynamically allocated as many entries as were initially preallocated. This is to indicate that a larger preallocation size may be appropriate, or if it happens continually that a driver may be leaking mappings.}(hj~"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMGhjhhubjr)}(hFvoid debug_dma_mapping_error(struct device *dev, dma_addr_t dma_addr);h]hFvoid debug_dma_mapping_error(struct device *dev, dma_addr_t dma_addr);}hj"sbah}(h]h ]h"]h$]h&]jjuh1jqhhhMThjhhubh)}(hX;dma-debug interface debug_dma_mapping_error() to debug drivers that fail to check DMA mapping errors on addresses returned by dma_map_single() and dma_map_page() interfaces. This interface clears a flag set by debug_dma_map_page() to indicate that dma_mapping_error() has been called by the driver. When driver does unmap, debug_dma_unmap() checks the flag and if this flag is still set, prints warning message that includes call trace that leads up to the unmap. This interface can be called from dma_mapping_error() routines to enable DMA mapping error check debugging.h]hX;dma-debug interface debug_dma_mapping_error() to debug drivers that fail to check DMA mapping errors on addresses returned by dma_map_single() and dma_map_page() interfaces. This interface clears a flag set by debug_dma_map_page() to indicate that dma_mapping_error() has been called by the driver. When driver does unmap, debug_dma_unmap() checks the flag and if this flag is still set, prints warning message that includes call trace that leads up to the unmap. This interface can be called from dma_mapping_error() routines to enable DMA mapping error check debugging.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjhhubh)}(hhh](h)}(hFunctions and structuresh]hFunctions and structures}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhMaubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_next (C function) c.sg_nexthNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h5struct scatterlist * sg_next (struct scatterlist *sg)h]jg)}(h3struct scatterlist *sg_next(struct scatterlist *sg)h](jm)}(hjph]hstruct}(hj"hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj"hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKbubj)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj"hhhj"hKbubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj"modnameN classnameNjj)}j]j)}jsg_nextsb c.sg_nextasbuh1hhj"hhhj"hKbubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj"hhhj"hKbubj)}(hjh]h*}(hj #hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"hhhj"hKbubj)}(hsg_nexth]j)}(hj#h]hsg_next}(hj1#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-#ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj"hhhj"hKbubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hjL#hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjH#ubj)}(h h]h }(hjY#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjH#ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjg#ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjl#modnameN classnameNjj)}j]j # c.sg_nextasbuh1hhjH#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjH#ubj)}(hjh]h*}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjH#ubj)}(hsgh]hsg}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjH#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjD#ubah}(h]h ]h"]h$]h&]jjuh1jhj"hhhj"hKbubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj"hhhj"hKbubah}(h]j"ah ](jjeh"]h$]h&]jj)jhuh1j`hj"hKbhj"hhubj)}(hhh]h)}(h+return the next scatterlist entry in a listh]h+return the next scatterlist entry in a list}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKbhj#hhubah}(h]h ]h"]h$]h&]uh1jhj"hhhj"hKbubeh}(h]h ](jfunctioneh"]h$]h&]jjjj#jj#jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` The current sg entry **Description** Usually the next entry will be **sg** + 1, but if this sg element is part of a chained scatterlist, it could jump to the start of a new scatterlist array.h](h)}(h**Parameters**h]j+)}(hj#h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj#ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKfhj#ubjA)}(hhh]jF)}(h0``struct scatterlist *sg`` The current sg entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj$h]hstruct scatterlist *sg}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj $ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKchj$ubjf)}(hhh]h)}(hThe current sg entryh]hThe current sg entry}(hj'$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#$hKchj$$ubah}(h]h ]h"]h$]h&]uh1jehj$ubeh}(h]h ]h"]h$]h&]uh1jEhj#$hKchj$ubah}(h]h ]h"]h$]h&]uh1j@hj#ubh)}(h**Description**h]j+)}(hjI$h]h Description}(hjK$hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjG$ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKehj#ubh block_quote)}(hUsually the next entry will be **sg** + 1, but if this sg element is part of a chained scatterlist, it could jump to the start of a new scatterlist array.h]h)}(hUsually the next entry will be **sg** + 1, but if this sg element is part of a chained scatterlist, it could jump to the start of a new scatterlist array.h](hUsually the next entry will be }(hje$hhhNhNubj+)}(h**sg**h]hsg}(hjm$hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hje$ubhu + 1, but if this sg element is part of a chained scatterlist, it could jump to the start of a new scatterlist array.}(hje$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKehja$ubah}(h]h ]h"]h$]h&]uh1j_$hj$hKehj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_assign_page (C function)c.sg_assign_pagehNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h?void sg_assign_page (struct scatterlist *sg, struct page *page)h]jg)}(h>void sg_assign_page(struct scatterlist *sg, struct page *page)h](j")}(hvoidh]hvoid}(hj$hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj$hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKxubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj$hhhj$hKxubj)}(hsg_assign_pageh]j)}(hsg_assign_pageh]hsg_assign_page}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj$hhhj$hKxubj)}(h+(struct scatterlist *sg, struct page *page)h](j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj$hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj$ubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj$ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj %modnameN classnameNjj)}j]j)}jj$sbc.sg_assign_pageasbuh1hhj$ubj)}(h h]h }(hj'%hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj$ubj)}(hjh]h*}(hj5%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(hsgh]hsg}(hjB%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$ubj)}(hstruct page *pageh](jm)}(hjph]hstruct}(hj[%hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjW%ubj)}(h h]h }(hjh%hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjW%ubh)}(hhh]j)}(hpageh]hpage}(hjy%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj{%modnameN classnameNjj)}j]j#%c.sg_assign_pageasbuh1hhjW%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjW%ubj)}(hjh]h*}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW%ubj)}(hpageh]hpage}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$ubeh}(h]h ]h"]h$]h&]jjuh1jhj$hhhj$hKxubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj$hhhj$hKxubah}(h]j$ah ](jjeh"]h$]h&]jj)jhuh1j`hj$hKxhj$hhubj)}(hhh]h)}(h"Assign a given page to an SG entryh]h"Assign a given page to an SG entry}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKxhj%hhubah}(h]h ]h"]h$]h&]uh1jhj$hhhj$hKxubeh}(h]h ](jfunctioneh"]h$]h&]jjjj%jj%jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` SG entry ``struct page *page`` The page **Description** Assign page to sg entry. Also see sg_set_page(), the most commonly used variant.h](h)}(h**Parameters**h]j+)}(hj%h]h Parameters}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj%ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhK|hj%ubjA)}(hhh](jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj&h]hstruct scatterlist *sg}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKyhj&ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hj6&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2&hKyhj3&ubah}(h]h ]h"]h$]h&]uh1jehj&ubeh}(h]h ]h"]h$]h&]uh1jEhj2&hKyhj&ubjF)}(h``struct page *page`` The page h](jL)}(h``struct page *page``h]j)}(hjV&h]hstruct page *page}(hjX&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT&ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKzhjP&ubjf)}(hhh]h)}(hThe pageh]hThe page}(hjo&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjk&hKzhjl&ubah}(h]h ]h"]h$]h&]uh1jehjP&ubeh}(h]h ]h"]h$]h&]uh1jEhjk&hKzhj&ubeh}(h]h ]h"]h$]h&]uh1j@hj%ubh)}(h**Description**h]j+)}(hj&h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj&ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhK|hj%ubj`$)}(hPAssign page to sg entry. Also see sg_set_page(), the most commonly used variant.h]h)}(hPAssign page to sg entry. Also see sg_set_page(), the most commonly used variant.h]hPAssign page to sg entry. Also see sg_set_page(), the most commonly used variant.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhK|hj&ubah}(h]h ]h"]h$]h&]uh1j_$hj&hK|hj%ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_set_page (C function) c.sg_set_pagehNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hcvoid sg_set_page (struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset)h]jg)}(hbvoid sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset)h](j")}(hvoidh]hvoid}(hj&hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj&hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKubj)}(h h]h }(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj&hhhj&hKubj)}(h sg_set_pageh]j)}(h sg_set_pageh]h sg_set_page}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj&hhhj&hKubj)}(hR(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset)h](j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj'hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj'ubj)}(h h]h }(hj*'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj'ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj;'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj='modnameN classnameNjj)}j]j)}jj'sb c.sg_set_pageasbuh1hhj'ubj)}(h h]h }(hj['hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj'ubj)}(hjh]h*}(hji'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(hsgh]hsg}(hjv'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'ubj)}(hstruct page *pageh](jm)}(hjph]hstruct}(hj'hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj'ubh)}(hhh]j)}(hpageh]hpage}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj'modnameN classnameNjj)}j]jW' c.sg_set_pageasbuh1hhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj'ubj)}(hjh]h*}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(hpageh]hpage}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'ubj)}(hunsigned int lenh](j")}(hunsignedh]hunsigned}(hj'hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj'ubj)}(h h]h }(hj (hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj'ubj")}(hinth]hint}(hj(hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj'ubj)}(h h]h }(hj)(hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj'ubj)}(hlenh]hlen}(hj7(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'ubj)}(hunsigned int offseth](j")}(hunsignedh]hunsigned}(hjP(hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjL(ubj)}(h h]h }(hj^(hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjL(ubj")}(hinth]hint}(hjl(hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjL(ubj)}(h h]h }(hjz(hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjL(ubj)}(hoffseth]hoffset}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjL(ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'ubeh}(h]h ]h"]h$]h&]jjuh1jhj&hhhj&hKubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj&hhhj&hKubah}(h]j&ah ](jjeh"]h$]h&]jj)jhuh1j`hj&hKhj&hhubj)}(hhh]h)}(h#Set sg entry to point at given pageh]h#Set sg entry to point at given page}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj(hhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj&hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj(jj(jjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct scatterlist *sg`` SG entry ``struct page *page`` The page ``unsigned int len`` Length of data ``unsigned int offset`` Offset into page **Description** Use this function to set an sg entry pointing at a page, never assign the page directly. We encode sg table information in the lower bits of the page pointer. See sg_page() for looking up the page belonging to an sg entry.h](h)}(h**Parameters**h]j+)}(hj(h]h Parameters}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj(ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj(ubjA)}(hhh](jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj(h]hstruct scatterlist *sg}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj(ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hj )hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKhj )ubah}(h]h ]h"]h$]h&]uh1jehj(ubeh}(h]h ]h"]h$]h&]uh1jEhj)hKhj(ubjF)}(h``struct page *page`` The page h](jL)}(h``struct page *page``h]j)}(hj,)h]hstruct page *page}(hj.)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*)ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj&)ubjf)}(hhh]h)}(hThe pageh]hThe page}(hjE)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA)hKhjB)ubah}(h]h ]h"]h$]h&]uh1jehj&)ubeh}(h]h ]h"]h$]h&]uh1jEhjA)hKhj(ubjF)}(h$``unsigned int len`` Length of data h](jL)}(h``unsigned int len``h]j)}(hje)h]hunsigned int len}(hjg)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjc)ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj_)ubjf)}(hhh]h)}(hLength of datah]hLength of data}(hj~)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjz)hKhj{)ubah}(h]h ]h"]h$]h&]uh1jehj_)ubeh}(h]h ]h"]h$]h&]uh1jEhjz)hKhj(ubjF)}(h)``unsigned int offset`` Offset into page h](jL)}(h``unsigned int offset``h]j)}(hj)h]hunsigned int offset}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj)ubjf)}(hhh]h)}(hOffset into pageh]hOffset into page}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKhj)ubah}(h]h ]h"]h$]h&]uh1jehj)ubeh}(h]h ]h"]h$]h&]uh1jEhj)hKhj(ubeh}(h]h ]h"]h$]h&]uh1j@hj(ubh)}(h**Description**h]j+)}(hj)h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj)ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj(ubj`$)}(hUse this function to set an sg entry pointing at a page, never assign the page directly. We encode sg table information in the lower bits of the page pointer. See sg_page() for looking up the page belonging to an sg entry.h]h)}(hUse this function to set an sg entry pointing at a page, never assign the page directly. We encode sg table information in the lower bits of the page pointer. See sg_page() for looking up the page belonging to an sg entry.h]hUse this function to set an sg entry pointing at a page, never assign the page directly. We encode sg table information in the lower bits of the page pointer. See sg_page() for looking up the page belonging to an sg entry.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj)ubah}(h]h ]h"]h$]h&]uh1j_$hj*hKhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_set_folio (C function)c.sg_set_foliohNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hZvoid sg_set_folio (struct scatterlist *sg, struct folio *folio, size_t len, size_t offset)h]jg)}(hYvoid sg_set_folio(struct scatterlist *sg, struct folio *folio, size_t len, size_t offset)h](j")}(hvoidh]hvoid}(hj(*hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj$*hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKubj)}(h h]h }(hj7*hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj$*hhhj6*hKubj)}(h sg_set_folioh]j)}(h sg_set_folioh]h sg_set_folio}(hjI*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjE*ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj$*hhhj6*hKubj)}(hH(struct scatterlist *sg, struct folio *folio, size_t len, size_t offset)h](j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hje*hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhja*ubj)}(h h]h }(hjr*hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hja*ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj*modnameN classnameNjj)}j]j)}jjK*sbc.sg_set_folioasbuh1hhja*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hja*ubj)}(hjh]h*}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhja*ubj)}(hsgh]hsg}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhja*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]*ubj)}(hstruct folio *folioh](jm)}(hjph]hstruct}(hj*hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj*ubh)}(hhh]j)}(hfolioh]hfolio}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj*modnameN classnameNjj)}j]j*c.sg_set_folioasbuh1hhj*ubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj*ubj)}(hjh]h*}(hj!+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(hfolioh]hfolio}(hj.+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]*ubj)}(h size_t lenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjJ+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjG+ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjL+modnameN classnameNjj)}j]j*c.sg_set_folioasbuh1hhjC+ubj)}(h h]h }(hjh+hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjC+ubj)}(hlenh]hlen}(hjv+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjC+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]*ubj)}(h size_t offseth](h)}(hhh]j)}(hsize_th]hsize_t}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj+modnameN classnameNjj)}j]j*c.sg_set_folioasbuh1hhj+ubj)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj+ubj)}(hoffseth]hoffset}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj]*ubeh}(h]h ]h"]h$]h&]jjuh1jhj$*hhhj6*hKubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj *hhhj6*hKubah}(h]j*ah ](jjeh"]h$]h&]jj)jhuh1j`hj6*hKhj*hhubj)}(hhh]h)}(h$Set sg entry to point at given folioh]h$Set sg entry to point at given folio}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj+hhubah}(h]h ]h"]h$]h&]uh1jhj*hhhj6*hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj,jj,jjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct scatterlist *sg`` SG entry ``struct folio *folio`` The folio ``size_t len`` Length of data ``size_t offset`` Offset into folio **Description** Use this function to set an sg entry pointing at a folio, never assign the folio directly. We encode sg table information in the lower bits of the folio pointer. See sg_page() for looking up the page belonging to an sg entry.h](h)}(h**Parameters**h]j+)}(hj ,h]h Parameters}(hj ,hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj,ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj,ubjA)}(hhh](jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj),h]hstruct scatterlist *sg}(hj+,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj',ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj#,ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hjB,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>,hKhj?,ubah}(h]h ]h"]h$]h&]uh1jehj#,ubeh}(h]h ]h"]h$]h&]uh1jEhj>,hKhj ,ubjF)}(h"``struct folio *folio`` The folio h](jL)}(h``struct folio *folio``h]j)}(hjb,h]hstruct folio *folio}(hjd,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`,ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj\,ubjf)}(hhh]h)}(h The folioh]h The folio}(hj{,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw,hKhjx,ubah}(h]h ]h"]h$]h&]uh1jehj\,ubeh}(h]h ]h"]h$]h&]uh1jEhjw,hKhj ,ubjF)}(h``size_t len`` Length of data h](jL)}(h``size_t len``h]j)}(hj,h]h size_t len}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj,ubjf)}(hhh]h)}(hLength of datah]hLength of data}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj,ubah}(h]h ]h"]h$]h&]uh1jehj,ubeh}(h]h ]h"]h$]h&]uh1jEhj,hKhj ,ubjF)}(h$``size_t offset`` Offset into folio h](jL)}(h``size_t offset``h]j)}(hj,h]h size_t offset}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj,ubjf)}(hhh]h)}(hOffset into folioh]hOffset into folio}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj,ubah}(h]h ]h"]h$]h&]uh1jehj,ubeh}(h]h ]h"]h$]h&]uh1jEhj,hKhj ,ubeh}(h]h ]h"]h$]h&]uh1j@hj,ubh)}(h**Description**h]j+)}(hj-h]h Description}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj -ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj,ubj`$)}(hUse this function to set an sg entry pointing at a folio, never assign the folio directly. We encode sg table information in the lower bits of the folio pointer. See sg_page() for looking up the page belonging to an sg entry.h]h)}(hUse this function to set an sg entry pointing at a folio, never assign the folio directly. We encode sg table information in the lower bits of the folio pointer. See sg_page() for looking up the page belonging to an sg entry.h]hUse this function to set an sg entry pointing at a folio, never assign the folio directly. We encode sg table information in the lower bits of the folio pointer. See sg_page() for looking up the page belonging to an sg entry.}(hj)-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj%-ubah}(h]h ]h"]h$]h&]uh1j_$hj7-hKhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_set_buf (C function) c.sg_set_bufhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hNvoid sg_set_buf (struct scatterlist *sg, const void *buf, unsigned int buflen)h]jg)}(hMvoid sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen)h](j")}(hvoidh]hvoid}(hj^-hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjZ-hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKubj)}(h h]h }(hjm-hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjZ-hhhjl-hKubj)}(h sg_set_bufh]j)}(h sg_set_bufh]h sg_set_buf}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{-ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjZ-hhhjl-hKubj)}(h>(struct scatterlist *sg, const void *buf, unsigned int buflen)h](j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj-hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj-ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj-ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj-modnameN classnameNjj)}j]j)}jj-sb c.sg_set_bufasbuh1hhj-ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj-ubj)}(hjh]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj)}(hsgh]hsg}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj-ubj)}(hconst void *bufh](jm)}(hjh]hconst}(hj .hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj .ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj .ubj")}(hvoidh]hvoid}(hj(.hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj .ubj)}(h h]h }(hj6.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj .ubj)}(hjh]h*}(hjD.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj .ubj)}(hbufh]hbuf}(hjQ.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj .ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj-ubj)}(hunsigned int buflenh](j")}(hunsignedh]hunsigned}(hjj.hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjf.ubj)}(h h]h }(hjx.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjf.ubj")}(hinth]hint}(hj.hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjf.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjf.ubj)}(hbuflenh]hbuflen}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj-ubeh}(h]h ]h"]h$]h&]jjuh1jhjZ-hhhjl-hKubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjV-hhhjl-hKubah}(h]jQ-ah ](jjeh"]h$]h&]jj)jhuh1j`hjl-hKhjS-hhubj)}(hhh]h)}(h#Set sg entry to point at given datah]h#Set sg entry to point at given data}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj.hhubah}(h]h ]h"]h$]h&]uh1jhjS-hhhjl-hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj.jj.jjjuh1j[hhhj"hNhNubj!)}(hx**Parameters** ``struct scatterlist *sg`` SG entry ``const void *buf`` Data ``unsigned int buflen`` Data lengthh](h)}(h**Parameters**h]j+)}(hj.h]h Parameters}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj.ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj.ubjA)}(hhh](jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj /h]hstruct scatterlist *sg}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj /ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj/ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hj&/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"/hKhj#/ubah}(h]h ]h"]h$]h&]uh1jehj/ubeh}(h]h ]h"]h$]h&]uh1jEhj"/hKhj/ubjF)}(h``const void *buf`` Data h](jL)}(h``const void *buf``h]j)}(hjF/h]hconst void *buf}(hjH/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD/ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj@/ubjf)}(hhh]h)}(hDatah]hData}(hj_/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[/hKhj\/ubah}(h]h ]h"]h$]h&]uh1jehj@/ubeh}(h]h ]h"]h$]h&]uh1jEhj[/hKhj/ubjF)}(h#``unsigned int buflen`` Data lengthh](jL)}(h``unsigned int buflen``h]j)}(hj/h]hunsigned int buflen}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}/ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhjy/ubjf)}(hhh]h)}(h Data lengthh]h Data length}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj/ubah}(h]h ]h"]h$]h&]uh1jehjy/ubeh}(h]h ]h"]h$]h&]uh1jEhj/hKhj/ubeh}(h]h ]h"]h$]h&]uh1j@hj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_chain (C function) c.sg_chainhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hXvoid sg_chain (struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl)h]jg)}(hWvoid sg_chain(struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl)h](j")}(hvoidh]hvoid}(hj/hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj/hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj/hhhj/hKubj)}(hsg_chainh]j)}(hsg_chainh]hsg_chain}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj/hhhj/hKubj)}(hJ(struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl)h](j)}(hstruct scatterlist *prvh](jm)}(hjph]hstruct}(hj0hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj0ubj)}(h h]h }(hj#0hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj40hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj10ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj60modnameN classnameNjj)}j]j)}jj/sb c.sg_chainasbuh1hhj0ubj)}(h h]h }(hjT0hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0ubj)}(hjh]h*}(hjb0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(hprvh]hprv}(hjo0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubj)}(hunsigned int prv_nentsh](j")}(hunsignedh]hunsigned}(hj0hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0ubj")}(hinth]hint}(hj0hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0ubj)}(h prv_nentsh]h prv_nents}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubj)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hj0hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj0modnameN classnameNjj)}j]jP0 c.sg_chainasbuh1hhj0ubj)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0ubj)}(hjh]h*}(hj#1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(hsglh]hsgl}(hj01hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubeh}(h]h ]h"]h$]h&]jjuh1jhj/hhhj/hKubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj/hhhj/hKubah}(h]j/ah ](jjeh"]h$]h&]jj)jhuh1j`hj/hKhj/hhubj)}(hhh]h)}(hChain two sglists togetherh]hChain two sglists together}(hjZ1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhjW1hhubah}(h]h ]h"]h$]h&]uh1jhj/hhhj/hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjr1jjr1jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *prv`` First scatterlist ``unsigned int prv_nents`` Number of entries in prv ``struct scatterlist *sgl`` Second scatterlist **Description** Links **prv** and **sgl** together, to form a longer scatterlist.h](h)}(h**Parameters**h]j+)}(hj|1h]h Parameters}(hj~1hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjz1ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhjv1ubjA)}(hhh](jF)}(h.``struct scatterlist *prv`` First scatterlist h](jL)}(h``struct scatterlist *prv``h]j)}(hj1h]hstruct scatterlist *prv}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj1ubjf)}(hhh]h)}(hFirst scatterlisth]hFirst scatterlist}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKhj1ubah}(h]h ]h"]h$]h&]uh1jehj1ubeh}(h]h ]h"]h$]h&]uh1jEhj1hKhj1ubjF)}(h4``unsigned int prv_nents`` Number of entries in prv h](jL)}(h``unsigned int prv_nents``h]j)}(hj1h]hunsigned int prv_nents}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj1ubjf)}(hhh]h)}(hNumber of entries in prvh]hNumber of entries in prv}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKhj1ubah}(h]h ]h"]h$]h&]uh1jehj1ubeh}(h]h ]h"]h$]h&]uh1jEhj1hKhj1ubjF)}(h/``struct scatterlist *sgl`` Second scatterlist h](jL)}(h``struct scatterlist *sgl``h]j)}(hj 2h]hstruct scatterlist *sgl}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 2ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj2ubjf)}(hhh]h)}(hSecond scatterlisth]hSecond scatterlist}(hj&2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"2hKhj#2ubah}(h]h ]h"]h$]h&]uh1jehj2ubeh}(h]h ]h"]h$]h&]uh1jEhj"2hKhj1ubeh}(h]h ]h"]h$]h&]uh1j@hjv1ubh)}(h**Description**h]j+)}(hjH2h]h Description}(hjJ2hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjF2ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjv1ubj`$)}(hALinks **prv** and **sgl** together, to form a longer scatterlist.h]h)}(hj`2h](hLinks }(hjb2hhhNhNubj+)}(h**prv**h]hprv}(hji2hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjb2ubh and }(hjb2hhhNhNubj+)}(h**sgl**h]hsgl}(hj{2hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjb2ubh( together, to form a longer scatterlist.}(hjb2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj^2ubah}(h]h ]h"]h$]h&]uh1j_$hj2hMhjv1ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"8hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_mark_end (C function) c.sg_mark_endhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h)void sg_mark_end (struct scatterlist *sg)h]jg)}(h(void sg_mark_end(struct scatterlist *sg)h](j")}(hvoidh]hvoid}(hj2hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj2hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj2hhhj2hM ubj)}(h sg_mark_endh]j)}(h sg_mark_endh]h sg_mark_end}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj2hhhj2hM ubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj2hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj2ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj2ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3modnameN classnameNjj)}j]j)}jj2sb c.sg_mark_endasbuh1hhj2ubj)}(h h]h }(hj53hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj2ubj)}(hjh]h*}(hjC3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubj)}(hsgh]hsg}(hjP3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj2ubah}(h]h ]h"]h$]h&]jjuh1jhj2hhhj2hM ubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj2hhhj2hM ubah}(h]j2ah ](jjeh"]h$]h&]jj)jhuh1j`hj2hM hj2hhubj)}(hhh]h)}(hMark the end of the scatterlisth]hMark the end of the scatterlist}(hjz3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM hjw3hhubah}(h]h ]h"]h$]h&]uh1jhj2hhhj2hM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj3jj3jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` SG entryScatterlist **Description** Marks the passed in sg entry as the termination point for the sg table. A call to sg_next() on this entry will return NULL.h](h)}(h**Parameters**h]j+)}(hj3h]h Parameters}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj3ubjA)}(hhh]jF)}(h/``struct scatterlist *sg`` SG entryScatterlist h](jL)}(h``struct scatterlist *sg``h]j)}(hj3h]hstruct scatterlist *sg}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM hj3ubjf)}(hhh]h)}(hSG entryScatterlisth]hSG entryScatterlist}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hM hj3ubah}(h]h ]h"]h$]h&]uh1jehj3ubeh}(h]h ]h"]h$]h&]uh1jEhj3hM hj3ubah}(h]h ]h"]h$]h&]uh1j@hj3ubh)}(h**Description**h]j+)}(hj3h]h Description}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj3ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj3ubj`$)}(h{Marks the passed in sg entry as the termination point for the sg table. A call to sg_next() on this entry will return NULL.h]h)}(h{Marks the passed in sg entry as the termination point for the sg table. A call to sg_next() on this entry will return NULL.h]h{Marks the passed in sg entry as the termination point for the sg table. A call to sg_next() on this entry will return NULL.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj 4ubah}(h]h ]h"]h$]h&]uh1j_$hj4hMhj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_unmark_end (C function)c.sg_unmark_endhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h+void sg_unmark_end (struct scatterlist *sg)h]jg)}(h*void sg_unmark_end(struct scatterlist *sg)h](j")}(hvoidh]hvoid}(hjE4hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjA4hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubj)}(h h]h }(hjT4hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjA4hhhjS4hMubj)}(h sg_unmark_endh]j)}(h sg_unmark_endh]h sg_unmark_end}(hjf4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjb4ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjA4hhhjS4hMubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj4hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj~4ubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj~4ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj4modnameN classnameNjj)}j]j)}jjh4sbc.sg_unmark_endasbuh1hhj~4ubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj~4ubj)}(hjh]h*}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~4ubj)}(hsgh]hsg}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjz4ubah}(h]h ]h"]h$]h&]jjuh1jhjA4hhhjS4hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj=4hhhjS4hMubah}(h]j84ah ](jjeh"]h$]h&]jj)jhuh1j`hjS4hMhj:4hhubj)}(hhh]h)}(h'Undo setting the end of the scatterlisth]h'Undo setting the end of the scatterlist}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj5hhubah}(h]h ]h"]h$]h&]uh1jhj:4hhhjS4hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj5jj5jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` SG entryScatterlist **Description** Removes the termination marker from the given entry of the scatterlist.h](h)}(h**Parameters**h]j+)}(hj'5h]h Parameters}(hj)5hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj%5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM!hj!5ubjA)}(hhh]jF)}(h/``struct scatterlist *sg`` SG entryScatterlist h](jL)}(h``struct scatterlist *sg``h]j)}(hjF5h]hstruct scatterlist *sg}(hjH5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD5ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj@5ubjf)}(hhh]h)}(hSG entryScatterlisth]hSG entryScatterlist}(hj_5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[5hMhj\5ubah}(h]h ]h"]h$]h&]uh1jehj@5ubeh}(h]h ]h"]h$]h&]uh1jEhj[5hMhj=5ubah}(h]h ]h"]h$]h&]uh1j@hj!5ubh)}(h**Description**h]j+)}(hj5h]h Description}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj5ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM hj!5ubj`$)}(hGRemoves the termination marker from the given entry of the scatterlist.h]h)}(hj5h]hGRemoves the termination marker from the given entry of the scatterlist.}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM hj5ubah}(h]h ]h"]h$]h&]uh1j_$hj5hM hj!5ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW"sg_dma_is_bus_address (C function)c.sg_dma_is_bus_addresshNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h3bool sg_dma_is_bus_address (struct scatterlist *sg)h]jg)}(h2bool sg_dma_is_bus_address(struct scatterlist *sg)h](j")}(hboolh]hbool}(hj5hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj5hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM5ubj)}(h h]h }(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj5hhhj5hM5ubj)}(hsg_dma_is_bus_addressh]j)}(hsg_dma_is_bus_addressh]hsg_dma_is_bus_address}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj5hhhj5hM5ubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj 6hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj6ubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj6ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj*6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'6ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj,6modnameN classnameNjj)}j]j)}jj5sbc.sg_dma_is_bus_addressasbuh1hhj6ubj)}(h h]h }(hjJ6hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj6ubj)}(hjh]h*}(hjX6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(hsgh]hsg}(hje6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj6ubah}(h]h ]h"]h$]h&]jjuh1jhj5hhhj5hM5ubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj5hhhj5hM5ubah}(h]j5ah ](jjeh"]h$]h&]jj)jhuh1j`hj5hM5hj5hhubj)}(hhh]h)}(h:Return whether a given segment was marked as a bus addressh]h:Return whether a given segment was marked as a bus address}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM5hj6hhubah}(h]h ]h"]h$]h&]uh1jhj5hhhj5hM5ubeh}(h]h ](jfunctioneh"]h$]h&]jjjj6jj6jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` SG entry **Description** Returns true if sg_dma_mark_bus_address() has been called on this segment.h](h)}(h**Parameters**h]j+)}(hj6h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj6ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM9hj6ubjA)}(hhh]jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj6h]hstruct scatterlist *sg}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM7hj6ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hM7hj6ubah}(h]h ]h"]h$]h&]uh1jehj6ubeh}(h]h ]h"]h$]h&]uh1jEhj6hM7hj6ubah}(h]h ]h"]h$]h&]uh1j@hj6ubh)}(h**Description**h]j+)}(hj 7h]h Description}(hj 7hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj 7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM9hj6ubj`$)}(hJReturns true if sg_dma_mark_bus_address() has been called on this segment.h]h)}(hJReturns true if sg_dma_mark_bus_address() has been called on this segment.h]hJReturns true if sg_dma_mark_bus_address() has been called on this segment.}(hj%7hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM9hj!7ubah}(h]h ]h"]h$]h&]uh1j_$hj37hM9hj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW$sg_dma_mark_bus_address (C function)c.sg_dma_mark_bus_addresshNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h5void sg_dma_mark_bus_address (struct scatterlist *sg)h]jg)}(h4void sg_dma_mark_bus_address(struct scatterlist *sg)h](j")}(hvoidh]hvoid}(hjZ7hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjV7hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMCubj)}(h h]h }(hji7hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjV7hhhjh7hMCubj)}(hsg_dma_mark_bus_addressh]j)}(hsg_dma_mark_bus_addressh]hsg_dma_mark_bus_address}(hj{7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw7ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjV7hhhjh7hMCubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj7hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj7ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj7modnameN classnameNjj)}j]j)}jj}7sbc.sg_dma_mark_bus_addressasbuh1hhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj7ubj)}(hjh]h*}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(hsgh]hsg}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj7ubah}(h]h ]h"]h$]h&]jjuh1jhjV7hhhjh7hMCubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjR7hhhjh7hMCubah}(h]jM7ah ](jjeh"]h$]h&]jj)jhuh1j`hjh7hMChjO7hhubj)}(hhh]h)}(h+Mark the scatterlist entry as a bus addressh]h+Mark the scatterlist entry as a bus address}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMChj8hhubah}(h]h ]h"]h$]h&]uh1jhjO7hhhjh7hMCubeh}(h]h ](jfunctioneh"]h$]h&]jjjj28jj28jjjuh1j[hhhj"hNhNubj!)}(hXD**Parameters** ``struct scatterlist *sg`` SG entry **Description** Marks the passed in sg entry to indicate that the dma_address is a bus address and doesn't need to be unmapped. This should only be used by dma_map_sg() implementations to mark bus addresses so they can be properly cleaned up in dma_unmap_sg().h](h)}(h**Parameters**h]j+)}(hj<8h]h Parameters}(hj>8hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj:8ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMGhj68ubjA)}(hhh]jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj[8h]hstruct scatterlist *sg}(hj]8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjY8ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMDhjU8ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hjt8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp8hMDhjq8ubah}(h]h ]h"]h$]h&]uh1jehjU8ubeh}(h]h ]h"]h$]h&]uh1jEhjp8hMDhjR8ubah}(h]h ]h"]h$]h&]uh1j@hj68ubh)}(h**Description**h]j+)}(hj8h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj8ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMFhj68ubj`$)}(hMarks the passed in sg entry to indicate that the dma_address is a bus address and doesn't need to be unmapped. This should only be used by dma_map_sg() implementations to mark bus addresses so they can be properly cleaned up in dma_unmap_sg().h]h)}(hMarks the passed in sg entry to indicate that the dma_address is a bus address and doesn't need to be unmapped. This should only be used by dma_map_sg() implementations to mark bus addresses so they can be properly cleaned up in dma_unmap_sg().h]hMarks the passed in sg entry to indicate that the dma_address is a bus address and doesn’t need to be unmapped. This should only be used by dma_map_sg() implementations to mark bus addresses so they can be properly cleaned up in dma_unmap_sg().}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMFhj8ubah}(h]h ]h"]h$]h&]uh1j_$hj8hMFhj68ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW&sg_dma_unmark_bus_address (C function)c.sg_dma_unmark_bus_addresshNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h7void sg_dma_unmark_bus_address (struct scatterlist *sg)h]jg)}(h6void sg_dma_unmark_bus_address(struct scatterlist *sg)h](j")}(hvoidh]hvoid}(hj8hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj8hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMRubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj8hhhj8hMRubj)}(hsg_dma_unmark_bus_addressh]j)}(hsg_dma_unmark_bus_addressh]hsg_dma_unmark_bus_address}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj8hhhj8hMRubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj"9hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj9ubj)}(h h]h }(hj/9hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj9ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj@9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=9ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjB9modnameN classnameNjj)}j]j)}jj9sbc.sg_dma_unmark_bus_addressasbuh1hhj9ubj)}(h h]h }(hj`9hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj9ubj)}(hjh]h*}(hjn9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubj)}(hsgh]hsg}(hj{9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj9ubah}(h]h ]h"]h$]h&]jjuh1jhj8hhhj8hMRubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj8hhhj8hMRubah}(h]j8ah ](jjeh"]h$]h&]jj)jhuh1j`hj8hMRhj8hhubj)}(hhh]h)}(h-Unmark the scatterlist entry as a bus addressh]h-Unmark the scatterlist entry as a bus address}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMRhj9hhubah}(h]h ]h"]h$]h&]uh1jhj8hhhj8hMRubeh}(h]h ](jfunctioneh"]h$]h&]jjjj9jj9jjjuh1j[hhhj"hNhNubj!)}(hf**Parameters** ``struct scatterlist *sg`` SG entry **Description** Clears the bus address mark.h](h)}(h**Parameters**h]j+)}(hj9h]h Parameters}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj9ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMVhj9ubjA)}(hhh]jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj9h]hstruct scatterlist *sg}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMShj9ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMShj9ubah}(h]h ]h"]h$]h&]uh1jehj9ubeh}(h]h ]h"]h$]h&]uh1jEhj9hMShj9ubah}(h]h ]h"]h$]h&]uh1j@hj9ubh)}(h**Description**h]j+)}(hj!:h]h Description}(hj#:hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj:ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMUhj9ubj`$)}(hClears the bus address mark.h]h)}(hj9:h]hClears the bus address mark.}(hj;:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMUhj7:ubah}(h]h ]h"]h$]h&]uh1j_$hjH:hMUhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_dma_is_swiotlb (C function)c.sg_dma_is_swiotlbhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h/bool sg_dma_is_swiotlb (struct scatterlist *sg)h]jg)}(h.bool sg_dma_is_swiotlb(struct scatterlist *sg)h](j")}(hj5h]hbool}(hjo:hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjk:hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM^ubj)}(h h]h }(hj}:hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjk:hhhj|:hM^ubj)}(hsg_dma_is_swiotlbh]j)}(hsg_dma_is_swiotlbh]hsg_dma_is_swiotlb}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjk:hhhj|:hM^ubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj:hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj:ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj:modnameN classnameNjj)}j]j)}jj:sbc.sg_dma_is_swiotlbasbuh1hhj:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj:ubj)}(hjh]h*}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubj)}(hsgh]hsg}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj:ubah}(h]h ]h"]h$]h&]jjuh1jhjk:hhhj|:hM^ubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjg:hhhj|:hM^ubah}(h]jb:ah ](jjeh"]h$]h&]jj)jhuh1j`hj|:hM^hjd:hhubj)}(hhh]h)}(h>Return whether the scatterlist was marked for SWIOTLB bouncingh]h>Return whether the scatterlist was marked for SWIOTLB bouncing}(hj.;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM^hj+;hhubah}(h]h ]h"]h$]h&]uh1jhjd:hhhj|:hM^ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjF;jjF;jjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct scatterlist *sg`` SG entry **Description** Returns true if the scatterlist was marked for SWIOTLB bouncing. Not all elements may have been bounced, so the caller would have to check individual SG entries with swiotlb_find_pool().h](h)}(h**Parameters**h]j+)}(hjP;h]h Parameters}(hjR;hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjN;ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMbhjJ;ubjA)}(hhh]jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hjo;h]hstruct scatterlist *sg}(hjq;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm;ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM`hji;ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hM`hj;ubah}(h]h ]h"]h$]h&]uh1jehji;ubeh}(h]h ]h"]h$]h&]uh1jEhj;hM`hjf;ubah}(h]h ]h"]h$]h&]uh1j@hjJ;ubh)}(h**Description**h]j+)}(hj;h]h Description}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj;ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMbhjJ;ubj`$)}(hReturns true if the scatterlist was marked for SWIOTLB bouncing. Not all elements may have been bounced, so the caller would have to check individual SG entries with swiotlb_find_pool().h]h)}(hReturns true if the scatterlist was marked for SWIOTLB bouncing. Not all elements may have been bounced, so the caller would have to check individual SG entries with swiotlb_find_pool().h]hReturns true if the scatterlist was marked for SWIOTLB bouncing. Not all elements may have been bounced, so the caller would have to check individual SG entries with swiotlb_find_pool().}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMbhj;ubah}(h]h ]h"]h$]h&]uh1j_$hj;hMbhjJ;ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW sg_dma_mark_swiotlb (C function)c.sg_dma_mark_swiotlbhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h1void sg_dma_mark_swiotlb (struct scatterlist *sg)h]jg)}(h0void sg_dma_mark_swiotlb(struct scatterlist *sg)h](j")}(hvoidh]hvoid}(hj;hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj;hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMmubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj;hhhj<hMmubj)}(hsg_dma_mark_swiotlbh]j)}(hsg_dma_mark_swiotlbh]hsg_dma_mark_swiotlb}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj;hhhj<hMmubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj6<hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj2<ubj)}(h h]h }(hjC<hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj2<ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjT<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ<ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjV<modnameN classnameNjj)}j]j)}jj<sbc.sg_dma_mark_swiotlbasbuh1hhj2<ubj)}(h h]h }(hjt<hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj2<ubj)}(hjh]h*}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2<ubj)}(hsgh]hsg}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2<ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.<ubah}(h]h ]h"]h$]h&]jjuh1jhj;hhhj<hMmubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj;hhhj<hMmubah}(h]j;ah ](jjeh"]h$]h&]jj)jhuh1j`hj<hMmhj;hhubj)}(hhh]h)}(h)Mark the scatterlist for SWIOTLB bouncingh]h)Mark the scatterlist for SWIOTLB bouncing}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMmhj<hhubah}(h]h ]h"]h$]h&]uh1jhj;hhhj<hMmubeh}(h]h ](jfunctioneh"]h$]h&]jjjj<jj<jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` SG entry **Description** Marks a a scatterlist for SWIOTLB bounce. Not all SG entries may be bounced.h](h)}(h**Parameters**h]j+)}(hj<h]h Parameters}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj<ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMqhj<ubjA)}(hhh]jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj<h]hstruct scatterlist *sg}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMnhj<ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hMnhj=ubah}(h]h ]h"]h$]h&]uh1jehj<ubeh}(h]h ]h"]h$]h&]uh1jEhj=hMnhj<ubah}(h]h ]h"]h$]h&]uh1j@hj<ubh)}(h**Description**h]j+)}(hj5=h]h Description}(hj7=hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj3=ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMphj<ubj`$)}(hLMarks a a scatterlist for SWIOTLB bounce. Not all SG entries may be bounced.h]h)}(hLMarks a a scatterlist for SWIOTLB bounce. Not all SG entries may be bounced.h]hLMarks a a scatterlist for SWIOTLB bounce. Not all SG entries may be bounced.}(hjO=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMphjK=ubah}(h]h ]h"]h$]h&]uh1j_$hj]=hMphj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_phys (C function) c.sg_physhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h+dma_addr_t sg_phys (struct scatterlist *sg)h]jg)}(h*dma_addr_t sg_phys(struct scatterlist *sg)h](h)}(hhh]j)}(h dma_addr_th]h dma_addr_t}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj=modnameN classnameNjj)}j]j)}jsg_physsb c.sg_physasbuh1hhj=hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj=hhhj=hMubj)}(hsg_physh]j)}(hj=h]hsg_phys}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj=hhhj=hMubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hj=hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj=ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj=ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj=modnameN classnameNjj)}j]j= c.sg_physasbuh1hhj=ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj=ubj)}(hjh]h*}(hj >hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubj)}(hsgh]hsg}(hj->hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj=ubah}(h]h ]h"]h$]h&]jjuh1jhj=hhhj=hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj|=hhhj=hMubah}(h]jw=ah ](jjeh"]h$]h&]jj)jhuh1j`hj=hMhjy=hhubj)}(hhh]h)}(h&Return physical address of an sg entryh]h&Return physical address of an sg entry}(hjW>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjT>hhubah}(h]h ]h"]h$]h&]uh1jhjy=hhhj=hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjo>jjo>jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` SG entry **Description** This calls page_to_phys() on the page in this sg entry, and adds the sg offset. The caller must know that it is legal to call page_to_phys() on the sg page.h](h)}(h**Parameters**h]j+)}(hjy>h]h Parameters}(hj{>hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjw>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjs>ubjA)}(hhh]jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj>h]hstruct scatterlist *sg}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj>ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1jehj>ubeh}(h]h ]h"]h$]h&]uh1jEhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1j@hjs>ubh)}(h**Description**h]j+)}(hj>h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj>ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjs>ubj`$)}(hThis calls page_to_phys() on the page in this sg entry, and adds the sg offset. The caller must know that it is legal to call page_to_phys() on the sg page.h]h)}(hThis calls page_to_phys() on the page in this sg entry, and adds the sg offset. The caller must know that it is legal to call page_to_phys() on the sg page.h]hThis calls page_to_phys() on the page in this sg entry, and adds the sg offset. The caller must know that it is legal to call page_to_phys() on the sg page.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj>ubah}(h]h ]h"]h$]h&]uh1j_$hj>hMhjs>ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_virt (C function) c.sg_virthNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h'void * sg_virt (struct scatterlist *sg)h]jg)}(h%void *sg_virt(struct scatterlist *sg)h](j")}(hvoidh]hvoid}(hj"?hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj?hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubj)}(h h]h }(hj1?hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj?hhhj0?hMubj)}(hjh]h*}(hj??hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?hhhj0?hMubj)}(hsg_virth]j)}(hsg_virth]hsg_virt}(hjP?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjL?ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj?hhhj0?hMubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hjl?hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjh?ubj)}(h h]h }(hjy?hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjh?ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj?modnameN classnameNjj)}j]j)}jjR?sb c.sg_virtasbuh1hhjh?ubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjh?ubj)}(hjh]h*}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh?ubj)}(hsgh]hsg}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjh?ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjd?ubah}(h]h ]h"]h$]h&]jjuh1jhj?hhhj0?hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj?hhhj0?hMubah}(h]j?ah ](jjeh"]h$]h&]jj)jhuh1j`hj0?hMhj?hhubj)}(hhh]h)}(h%Return virtual address of an sg entryh]h%Return virtual address of an sg entry}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj?hhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj0?hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj@jj@jjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` SG entry **Description** This calls page_address() on the page in this sg entry, and adds the sg offset. The caller must know that the sg page has a valid virtual mapping.h](h)}(h**Parameters**h]j+)}(hj@h]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj @ubjA)}(hhh]jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hj0@h]hstruct scatterlist *sg}(hj2@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.@ubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj*@ubjf)}(hhh]h)}(hSG entryh]hSG entry}(hjI@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE@hMhjF@ubah}(h]h ]h"]h$]h&]uh1jehj*@ubeh}(h]h ]h"]h$]h&]uh1jEhjE@hMhj'@ubah}(h]h ]h"]h$]h&]uh1j@hj @ubh)}(h**Description**h]j+)}(hjk@h]h Description}(hjm@hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hji@ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj @ubj`$)}(hThis calls page_address() on the page in this sg entry, and adds the sg offset. The caller must know that the sg page has a valid virtual mapping.h]h)}(hThis calls page_address() on the page in this sg entry, and adds the sg offset. The caller must know that the sg page has a valid virtual mapping.h]hThis calls page_address() on the page in this sg entry, and adds the sg offset. The caller must know that the sg page has a valid virtual mapping.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj@ubah}(h]h ]h"]h$]h&]uh1j_$hj@hMhj @ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_init_marker (C function)c.sg_init_markerhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hAvoid sg_init_marker (struct scatterlist *sgl, unsigned int nents)h]jg)}(h@void sg_init_marker(struct scatterlist *sgl, unsigned int nents)h](j")}(hvoidh]hvoid}(hj@hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj@hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj@hhhj@hMubj)}(hsg_init_markerh]j)}(hsg_init_markerh]hsg_init_marker}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj@hhhj@hMubj)}(h-(struct scatterlist *sgl, unsigned int nents)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hj@hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj@ubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj@ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjAmodnameN classnameNjj)}j]j)}jj@sbc.sg_init_markerasbuh1hhj@ubj)}(h h]h }(hj5AhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj@ubj)}(hjh]h*}(hjCAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubj)}(hsglh]hsgl}(hjPAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj@ubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjiAhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjeAubj)}(h h]h }(hjwAhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjeAubj")}(hinth]hint}(hjAhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjeAubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjeAubj)}(hnentsh]hnents}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeAubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj@ubeh}(h]h ]h"]h$]h&]jjuh1jhj@hhhj@hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj@hhhj@hMubah}(h]j@ah ](jjeh"]h$]h&]jj)jhuh1j`hj@hMhj@hhubj)}(hhh]h)}(hInitialize markers in sg tableh]hInitialize markers in sg table}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjAhhubah}(h]h ]h"]h$]h&]uh1jhj@hhhj@hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjAjjAjjjuh1j[hhhj"hNhNubj!)}(ho**Parameters** ``struct scatterlist *sgl`` The SG table ``unsigned int nents`` Number of entries in tableh](h)}(h**Parameters**h]j+)}(hjAh]h Parameters}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjAubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjAubjA)}(hhh](jF)}(h)``struct scatterlist *sgl`` The SG table h](jL)}(h``struct scatterlist *sgl``h]j)}(hj Bh]hstruct scatterlist *sgl}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj Bubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjBubjf)}(hhh]h)}(h The SG tableh]h The SG table}(hj%BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!BhMhj"Bubah}(h]h ]h"]h$]h&]uh1jehjBubeh}(h]h ]h"]h$]h&]uh1jEhj!BhMhjBubjF)}(h1``unsigned int nents`` Number of entries in tableh](jL)}(h``unsigned int nents``h]j)}(hjEBh]hunsigned int nents}(hjGBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCBubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj?Bubjf)}(hhh]h)}(hNumber of entries in tableh]hNumber of entries in table}(hj^BhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj[Bubah}(h]h ]h"]h$]h&]uh1jehj?Bubeh}(h]h ]h"]h$]h&]uh1jEhjZBhMhjBubeh}(h]h ]h"]h$]h&]uh1j@hjAubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW&sg_alloc_table_from_pages (C function)c.sg_alloc_table_from_pageshNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hint sg_alloc_table_from_pages (struct sg_table *sgt, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, gfp_t gfp_mask)h]jg)}(hint sg_alloc_table_from_pages(struct sg_table *sgt, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, gfp_t gfp_mask)h](j")}(hinth]hint}(hjBhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjBhhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjBhhhjBhMubj)}(hsg_alloc_table_from_pagesh]j)}(hsg_alloc_table_from_pagesh]hsg_alloc_table_from_pages}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubah}(h]h ](jjeh"]h$]h&]jjuh1jhjBhhhjBhMubj)}(hz(struct sg_table *sgt, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, gfp_t gfp_mask)h](j)}(hstruct sg_table *sgth](jm)}(hjph]hstruct}(hjBhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjBubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjBubh)}(hhh]j)}(hsg_tableh]hsg_table}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjBmodnameN classnameNjj)}j]j)}jjBsbc.sg_alloc_table_from_pagesasbuh1hhjBubj)}(h h]h }(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjBubj)}(hjh]h*}(hj(ChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(hsgth]hsgt}(hj5ChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubj)}(hstruct page **pagesh](jm)}(hjph]hstruct}(hjNChhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjJCubj)}(h h]h }(hj[ChhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjJCubh)}(hhh]j)}(hpageh]hpage}(hjlChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiCubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjnCmodnameN classnameNjj)}j]jCc.sg_alloc_table_from_pagesasbuh1hhjJCubj)}(h h]h }(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjJCubj)}(hjh]h*}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJCubj)}(hjh]h*}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJCubj)}(hpagesh]hpages}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJCubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubj)}(hunsigned int n_pagesh](j")}(hunsignedh]hunsigned}(hjChhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjCubj)}(h h]h }(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjCubj")}(hinth]hint}(hjChhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjCubj)}(h h]h }(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjCubj)}(hn_pagesh]hn_pages}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubj)}(hunsigned int offseth](j")}(hunsignedh]hunsigned}(hjDhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjDubj)}(h h]h }(hj*DhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjDubj")}(hinth]hint}(hj8DhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjDubj)}(h h]h }(hjFDhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjDubj)}(hoffseth]hoffset}(hjTDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubj)}(hunsigned long sizeh](j")}(hunsignedh]hunsigned}(hjmDhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjiDubj)}(h h]h }(hj{DhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjiDubj")}(hlongh]hlong}(hjDhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjiDubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjiDubj)}(hsizeh]hsize}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjiDubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubj)}(hgfp_t gfp_maskh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjDmodnameN classnameNjj)}j]jCc.sg_alloc_table_from_pagesasbuh1hhjDubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjDubj)}(hgfp_maskh]hgfp_mask}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubeh}(h]h ]h"]h$]h&]jjuh1jhjBhhhjBhMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjBhhhjBhMubah}(h]jBah ](jjeh"]h$]h&]jj)jhuh1j`hjBhMhjBhhubj)}(hhh]h)}(h:Allocate and initialize an sg table from an array of pagesh]h:Allocate and initialize an sg table from an array of pages}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjEhhubah}(h]h ]h"]h$]h&]uh1jhjBhhhjBhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj/Ejj/Ejjjuh1j[hhhj"hNhNubj!)}(hX **Parameters** ``struct sg_table *sgt`` The sg table header to use ``struct page **pages`` Pointer to an array of page pointers ``unsigned int n_pages`` Number of pages in the pages array ``unsigned int offset`` Offset from start of the first page to the start of a buffer ``unsigned long size`` Number of valid bytes in the buffer (after offset) ``gfp_t gfp_mask`` GFP allocation mask **Description** Allocate and initialize an sg table from a list of pages. Contiguous ranges of the pages are squashed into a single scatterlist node. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array. The returned sg table is released by sg_free_table. **Return** 0 on success, negative error on failureh](h)}(h**Parameters**h]j+)}(hj9Eh]h Parameters}(hj;EhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj7Eubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj3EubjA)}(hhh](jF)}(h4``struct sg_table *sgt`` The sg table header to use h](jL)}(h``struct sg_table *sgt``h]j)}(hjXEh]hstruct sg_table *sgt}(hjZEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVEubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjREubjf)}(hhh]h)}(hThe sg table header to useh]hThe sg table header to use}(hjqEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmEhMhjnEubah}(h]h ]h"]h$]h&]uh1jehjREubeh}(h]h ]h"]h$]h&]uh1jEhjmEhMhjOEubjF)}(h=``struct page **pages`` Pointer to an array of page pointers h](jL)}(h``struct page **pages``h]j)}(hjEh]hstruct page **pages}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjEubjf)}(hhh]h)}(h$Pointer to an array of page pointersh]h$Pointer to an array of page pointers}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMhjEubah}(h]h ]h"]h$]h&]uh1jehjEubeh}(h]h ]h"]h$]h&]uh1jEhjEhMhjOEubjF)}(h<``unsigned int n_pages`` Number of pages in the pages array h](jL)}(h``unsigned int n_pages``h]j)}(hjEh]hunsigned int n_pages}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjEubjf)}(hhh]h)}(h"Number of pages in the pages arrayh]h"Number of pages in the pages array}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMhjEubah}(h]h ]h"]h$]h&]uh1jehjEubeh}(h]h ]h"]h$]h&]uh1jEhjEhMhjOEubjF)}(hU``unsigned int offset`` Offset from start of the first page to the start of a buffer h](jL)}(h``unsigned int offset``h]j)}(hjFh]hunsigned int offset}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjEubjf)}(hhh]h)}(hFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:Fubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj6Fubjf)}(hhh]h)}(h2Number of valid bytes in the buffer (after offset)h]h2Number of valid bytes in the buffer (after offset)}(hjUFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQFhMhjRFubah}(h]h ]h"]h$]h&]uh1jehj6Fubeh}(h]h ]h"]h$]h&]uh1jEhjQFhMhjOEubjF)}(h'``gfp_t gfp_mask`` GFP allocation mask h](jL)}(h``gfp_t gfp_mask``h]j)}(hjuFh]hgfp_t gfp_mask}(hjwFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsFubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjoFubjf)}(hhh]h)}(hGFP allocation maskh]hGFP allocation mask}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhMhjFubah}(h]h ]h"]h$]h&]uh1jehjoFubeh}(h]h ]h"]h$]h&]uh1jEhjFhMhjOEubeh}(h]h ]h"]h$]h&]uh1j@hj3Eubh)}(h**Description**h]j+)}(hjFh]h Description}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjFubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj3Eubj`$)}(hX$Allocate and initialize an sg table from a list of pages. Contiguous ranges of the pages are squashed into a single scatterlist node. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array. The returned sg table is released by sg_free_table. h]h)}(hX#Allocate and initialize an sg table from a list of pages. Contiguous ranges of the pages are squashed into a single scatterlist node. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array. The returned sg table is released by sg_free_table.h]hX#Allocate and initialize an sg table from a list of pages. Contiguous ranges of the pages are squashed into a single scatterlist node. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array. The returned sg table is released by sg_free_table.}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjFubah}(h]h ]h"]h$]h&]uh1j_$hjFhMhj3Eubh)}(h **Return**h]j+)}(hjFh]hReturn}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjFubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj3Eubh)}(h'0 on success, negative error on failureh]h'0 on success, negative error on failure}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj3Eubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_page_iter_page (C function)c.sg_page_iter_pagehNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h``piter`` page iterator to hold current page, sg, sg_pgoffset h](jL)}(h ``piter``h]j)}(hjJh]hpiter}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMmhjJubjf)}(hhh]h)}(h3page iterator to hold current page, sg, sg_pgoffseth]h3page iterator to hold current page, sg, sg_pgoffset}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMmhjKubah}(h]h ]h"]h$]h&]uh1jehjJubeh}(h]h ]h"]h$]h&]uh1jEhjKhMmhjJubjF)}(h7``nents`` maximum number of sg entries to iterate over h](jL)}(h ``nents``h]j)}(hj&Kh]hnents}(hj(KhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$Kubah}(h]h ]h"]h$]h&]uh1jKh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMnhj Kubjf)}(hhh]h)}(h,maximum number of sg entries to iterate overh]h,maximum number of sg entries to iterate over}(hj?KhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;KhMnhj(struct scatterlist *sg, const void *buf, unsigned int buflen)h](j)}(hstruct scatterlist *sgh](jm)}(hjph]hstruct}(hjYhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjYubj)}(h h]h }(hj+YhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjYubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjYmodnameN classnameNjj)}j]j)}jjYsb c.sg_init_oneasbuh1hhjYubj)}(h h]h }(hj\YhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjYubj)}(hjh]h*}(hjjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubj)}(hsgh]hsg}(hjwYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjYubj)}(hconst void *bufh](jm)}(hjh]hconst}(hjYhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjYubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjYubj")}(hvoidh]hvoid}(hjYhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjYubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjYubj)}(hjh]h*}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubj)}(hbufh]hbuf}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjYubj)}(hunsigned int buflenh](j")}(hunsignedh]hunsigned}(hjYhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjYubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjYubj")}(hinth]hint}(hj ZhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjYubj)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjYubj)}(hbuflenh]hbuflen}(hj%ZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjYubeh}(h]h ]h"]h$]h&]jjuh1jhjXhhhjXhKpubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjXhhhjXhKpubah}(h]jXah ](jjeh"]h$]h&]jj)jhuh1j`hjXhKphjXhhubj)}(hhh]h)}(h!Initialize a single entry sg listh]h!Initialize a single entry sg list}(hjOZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKphjLZhhubah}(h]h ]h"]h$]h&]uh1jhjXhhhjXhKpubeh}(h]h ](jfunctioneh"]h$]h&]jjjjgZjjgZjjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sg`` SG entry ``const void *buf`` Virtual address for IO ``unsigned int buflen`` IO lengthh](h)}(h**Parameters**h]j+)}(hjqZh]h Parameters}(hjsZhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjoZubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKthjkZubjA)}(hhh](jF)}(h$``struct scatterlist *sg`` SG entry h](jL)}(h``struct scatterlist *sg``h]j)}(hjZh]hstruct scatterlist *sg}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKqhjZubjf)}(hhh]h)}(hSG entryh]hSG entry}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhKqhjZubah}(h]h ]h"]h$]h&]uh1jehjZubeh}(h]h ]h"]h$]h&]uh1jEhjZhKqhjZubjF)}(h+``const void *buf`` Virtual address for IO h](jL)}(h``const void *buf``h]j)}(hjZh]hconst void *buf}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKrhjZubjf)}(hhh]h)}(hVirtual address for IOh]hVirtual address for IO}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhKrhjZubah}(h]h ]h"]h$]h&]uh1jehjZubeh}(h]h ]h"]h$]h&]uh1jEhjZhKrhjZubjF)}(h!``unsigned int buflen`` IO lengthh](jL)}(h``unsigned int buflen``h]j)}(hj[h]hunsigned int buflen}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKthjZubjf)}(hhh]h)}(h IO lengthh]h IO length}(hjhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKshj[ubah}(h]h ]h"]h$]h&]uh1jehjZubeh}(h]h ]h"]h$]h&]uh1jEhj[hKthjZubeh}(h]h ]h"]h$]h&]uh1j@hjkZubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW__sg_free_table (C function)c.__sg_free_tablehNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hvoid __sg_free_table (struct sg_table *table, unsigned int max_ents, unsigned int nents_first_chunk, sg_free_fn *free_fn, unsigned int num_ents)h]jg)}(hvoid __sg_free_table(struct sg_table *table, unsigned int max_ents, unsigned int nents_first_chunk, sg_free_fn *free_fn, unsigned int num_ents)h](j")}(hvoidh]hvoid}(hj\[hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjX[hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKubj)}(h h]h }(hjk[hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjX[hhhjj[hKubj)}(h__sg_free_tableh]j)}(h__sg_free_tableh]h__sg_free_table}(hj}[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjy[ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjX[hhhjj[hKubj)}(h{(struct sg_table *table, unsigned int max_ents, unsigned int nents_first_chunk, sg_free_fn *free_fn, unsigned int num_ents)h](j)}(hstruct sg_table *tableh](jm)}(hjph]hstruct}(hj[hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj[ubh)}(hhh]j)}(hsg_tableh]hsg_table}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj[modnameN classnameNjj)}j]j)}jj[sbc.__sg_free_tableasbuh1hhj[ubj)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj[ubj)}(hjh]h*}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(htableh]htable}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubj)}(hunsigned int max_entsh](j")}(hunsignedh]hunsigned}(hj \hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj\ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj\ubj")}(hinth]hint}(hj'\hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj\ubj)}(h h]h }(hj5\hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj\ubj)}(hmax_entsh]hmax_ents}(hjC\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubj)}(hunsigned int nents_first_chunkh](j")}(hunsignedh]hunsigned}(hj\\hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjX\ubj)}(h h]h }(hjj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjX\ubj")}(hinth]hint}(hjx\hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjX\ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjX\ubj)}(hnents_first_chunkh]hnents_first_chunk}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjX\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubj)}(hsg_free_fn *free_fnh](h)}(hhh]j)}(h sg_free_fnh]h sg_free_fn}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj\modnameN classnameNjj)}j]j[c.__sg_free_tableasbuh1hhj\ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj\ubj)}(hjh]h*}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubj)}(hfree_fnh]hfree_fn}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubj)}(hunsigned int num_entsh](j")}(hunsignedh]hunsigned}(hj]hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj\ubj)}(h h]h }(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj\ubj")}(hinth]hint}(hj]hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj\ubj)}(h h]h }(hj,]hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj\ubj)}(hnum_entsh]hnum_ents}(hj:]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubeh}(h]h ]h"]h$]h&]jjuh1jhjX[hhhjj[hKubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjT[hhhjj[hKubah}(h]jO[ah ](jjeh"]h$]h&]jj)jhuh1j`hjj[hKhjQ[hhubj)}(hhh]h)}(h!Free a previously mapped sg tableh]h!Free a previously mapped sg table}(hjd]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhja]hhubah}(h]h ]h"]h$]h&]uh1jhjQ[hhhjj[hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj|]jj|]jjjuh1j[hhhj"hNhNubj!)}(hXP**Parameters** ``struct sg_table *table`` The sg table header to use ``unsigned int max_ents`` The maximum number of entries per single scatterlist ``unsigned int nents_first_chunk`` Number of entries int the (preallocated) first scatterlist chunk, 0 means no such preallocated first chunk ``sg_free_fn *free_fn`` Free function ``unsigned int num_ents`` Number of entries in the table **Description** Free an sg table previously allocated and setup with __sg_alloc_table(). The **max_ents** value must be identical to that previously used with __sg_alloc_table().h](h)}(h**Parameters**h]j+)}(hj]h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj]ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj]ubjA)}(hhh](jF)}(h6``struct sg_table *table`` The sg table header to use h](jL)}(h``struct sg_table *table``h]j)}(hj]h]hstruct sg_table *table}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj]ubjf)}(hhh]h)}(hThe sg table header to useh]hThe sg table header to use}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hKhj]ubah}(h]h ]h"]h$]h&]uh1jehj]ubeh}(h]h ]h"]h$]h&]uh1jEhj]hKhj]ubjF)}(hO``unsigned int max_ents`` The maximum number of entries per single scatterlist h](jL)}(h``unsigned int max_ents``@h]j)}(hj]h]hunsigned int max_ents}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj]ubjf)}(hhh]h)}(h4The maximum number of entries per single scatterlisth]h4The maximum number of entries per single scatterlist}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hKhj]ubah}(h]h ]h"]h$]h&]uh1jehj]ubeh}(h]h ]h"]h$]h&]uh1jEhj]hKhj]ubjF)}(h``unsigned int nents_first_chunk`` Number of entries int the (preallocated) first scatterlist chunk, 0 means no such preallocated first chunk h](jL)}(h"``unsigned int nents_first_chunk``h]j)}(hj^h]hunsigned int nents_first_chunk}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj^ubjf)}(hhh]h)}(hjNumber of entries int the (preallocated) first scatterlist chunk, 0 means no such preallocated first chunkh]hjNumber of entries int the (preallocated) first scatterlist chunk, 0 means no such preallocated first chunk}(hj0^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj-^ubah}(h]h ]h"]h$]h&]uh1jehj^ubeh}(h]h ]h"]h$]h&]uh1jEhj,^hKhj]ubjF)}(h&``sg_free_fn *free_fn`` Free function h](jL)}(h``sg_free_fn *free_fn``h]j)}(hjQ^h]hsg_free_fn *free_fn}(hjS^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjO^ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjK^ubjf)}(hhh]h)}(h Free functionh]h Free function}(hjj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf^hKhjg^ubah}(h]h ]h"]h$]h&]uh1jehjK^ubeh}(h]h ]h"]h$]h&]uh1jEhjf^hKhj]ubjF)}(h9``unsigned int num_ents`` Number of entries in the table h](jL)}(h``unsigned int num_ents``h]j)}(hj^h]hunsigned int num_ents}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj^ubjf)}(hhh]h)}(hNumber of entries in the tableh]hNumber of entries in the table}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hKhj^ubah}(h]h ]h"]h$]h&]uh1jehj^ubeh}(h]h ]h"]h$]h&]uh1jEhj^hKhj]ubeh}(h]h ]h"]h$]h&]uh1j@hj]ubh)}(h**Description**h]j+)}(hj^h]h Description}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj^ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj]ubj`$)}(hFree an sg table previously allocated and setup with __sg_alloc_table(). The **max_ents** value must be identical to that previously used with __sg_alloc_table().h]h)}(hFree an sg table previously allocated and setup with __sg_alloc_table(). The **max_ents** value must be identical to that previously used with __sg_alloc_table().h](hNFree an sg table previously allocated and setup with __sg_alloc_table(). The }(hj^hhhNhNubj+)}(h **max_ents**h]hmax_ents}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj^ubhI value must be identical to that previously used with __sg_alloc_table().}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj^ubah}(h]h ]h"]h$]h&]uh1j_$hj^hKhj]ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW!sg_free_append_table (C function)c.sg_free_append_tablehNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h9void sg_free_append_table (struct sg_append_table *table)h]jg)}(h8void sg_free_append_table(struct sg_append_table *table)h](j")}(hvoidh]hvoid}(hj&_hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj"_hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKubj)}(h h]h }(hj5_hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj"_hhhj4_hKubj)}(hsg_free_append_tableh]j)}(hsg_free_append_tableh]hsg_free_append_table}(hjG_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjC_ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj"_hhhj4_hKubj)}(h(struct sg_append_table *table)h]j)}(hstruct sg_append_table *tableh](jm)}(hjph]hstruct}(hjc_hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj__ubj)}(h h]h }(hjp_hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj__ubh)}(hhh]j)}(hsg_append_tableh]hsg_append_table}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~_ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj_modnameN classnameNjj)}j]j)}jjI_sbc.sg_free_append_tableasbuh1hhj__ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj__ubj)}(hjh]h*}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj__ubj)}(htableh]htable}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj__ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[_ubah}(h]h ]h"]h$]h&]jjuh1jhj"_hhhj4_hKubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj_hhhj4_hKubah}(h]j_ah ](jjeh"]h$]h&]jj)jhuh1j`hj4_hKhj_hhubj)}(hhh]h)}(h,Free a previously allocated append sg table.h]h,Free a previously allocated append sg table.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj_hhubah}(h]h ]h"]h$]h&]uh1jhj_hhhj4_hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjj_jj_jjjuh1j[hhhj"hNhNubj!)}(hU**Parameters** ``struct sg_append_table *table`` The mapped sg append table headerh](h)}(h**Parameters**h]j+)}(hj`h]h Parameters}(hj `hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj`ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj`ubjA)}(hhh]jF)}(hC``struct sg_append_table *table`` The mapped sg append table headerh](jL)}(h!``struct sg_append_table *table``h]j)}(hj'`h]hstruct sg_append_table *table}(hj)`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%`ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj!`ubjf)}(hhh]h)}(h!The mapped sg append table headerh]h!The mapped sg append table header}(hj@`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj=`ubah}(h]h ]h"]h$]h&]uh1jehj!`ubeh}(h]h ]h"]h$]h&]uh1jEhj<`hKhj`ubah}(h]h ]h"]h$]h&]uh1j@hj`ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_free_table (C function)c.sg_free_tablehNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h+void sg_free_table (struct sg_table *table)h]jg)}(h*void sg_free_table(struct sg_table *table)h](j")}(hvoidh]hvoid}(hj`hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj}`hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj}`hhhj`hKubj)}(h sg_free_tableh]j)}(h sg_free_tableh]h sg_free_table}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj}`hhhj`hKubj)}(h(struct sg_table *table)h]j)}(hstruct sg_table *tableh](jm)}(hjph]hstruct}(hj`hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj`ubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj`ubh)}(hhh]j)}(hsg_tableh]hsg_table}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj`modnameN classnameNjj)}j]j)}jj`sbc.sg_free_tableasbuh1hhj`ubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj`ubj)}(hjh]h*}(hj ahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubj)}(htableh]htable}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj`ubah}(h]h ]h"]h$]h&]jjuh1jhj}`hhhj`hKubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjy`hhhj`hKubah}(h]jt`ah ](jjeh"]h$]h&]jj)jhuh1j`hj`hKhjv`hhubj)}(hhh]h)}(h$Free a previously allocated sg tableh]h$Free a previously allocated sg table}(hjAahhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj>ahhubah}(h]h ]h"]h$]h&]uh1jhjv`hhhj`hKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjYajjYajjjuh1j[hhhj"hNhNubj!)}(hG**Parameters** ``struct sg_table *table`` The mapped sg table headerh](h)}(h**Parameters**h]j+)}(hjcah]h Parameters}(hjeahhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjaaubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj]aubjA)}(hhh]jF)}(h5``struct sg_table *table`` The mapped sg table headerh](jL)}(h``struct sg_table *table``h]j)}(hjah]hstruct sg_table *table}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj|aubjf)}(hhh]h)}(hThe mapped sg table headerh]hThe mapped sg table header}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjaubah}(h]h ]h"]h$]h&]uh1jehj|aubeh}(h]h ]h"]h$]h&]uh1jEhjahKhjyaubah}(h]h ]h"]h$]h&]uh1j@hj]aubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW__sg_alloc_table (C function)c.__sg_alloc_tablehNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hint __sg_alloc_table (struct sg_table *table, unsigned int nents, unsigned int max_ents, struct scatterlist *first_chunk, unsigned int nents_first_chunk, gfp_t gfp_mask, sg_alloc_fn *alloc_fn)h]jg)}(hint __sg_alloc_table(struct sg_table *table, unsigned int nents, unsigned int max_ents, struct scatterlist *first_chunk, unsigned int nents_first_chunk, gfp_t gfp_mask, sg_alloc_fn *alloc_fn)h](j")}(hinth]hint}(hjahhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjahhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKubj)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjahhhjahKubj)}(h__sg_alloc_tableh]j)}(h__sg_alloc_tableh]h__sg_alloc_table}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubah}(h]h ](jjeh"]h$]h&]jjuh1jhjahhhjahKubj)}(h(struct sg_table *table, unsigned int nents, unsigned int max_ents, struct scatterlist *first_chunk, unsigned int nents_first_chunk, gfp_t gfp_mask, sg_alloc_fn *alloc_fn)h](j)}(hstruct sg_table *tableh](jm)}(hjph]hstruct}(hjbhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjbubj)}(h h]h }(hj&bhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubh)}(hhh]j)}(hsg_tableh]hsg_table}(hj7bhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4bubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj9bmodnameN classnameNjj)}j]j)}jjasbc.__sg_alloc_tableasbuh1hhjbubj)}(h h]h }(hjWbhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubj)}(hjh]h*}(hjebhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(htableh]htable}(hjrbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjbhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubj")}(hinth]hint}(hjbhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubj)}(hnentsh]hnents}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubj)}(hunsigned int max_entsh](j")}(hunsignedh]hunsigned}(hjbhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjbubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubj")}(hinth]hint}(hjbhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjbubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubj)}(hmax_entsh]hmax_ents}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubj)}(hstruct scatterlist *first_chunkh](jm)}(hjph]hstruct}(hj-chhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj)cubj)}(h h]h }(hj:chhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj)cubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjKchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHcubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjMcmodnameN classnameNjj)}j]jSbc.__sg_alloc_tableasbuh1hhj)cubj)}(h h]h }(hjichhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj)cubj)}(hjh]h*}(hjwchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)cubj)}(h first_chunkh]h first_chunk}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)cubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubj)}(hunsigned int nents_first_chunkh](j")}(hunsignedh]hunsigned}(hjchhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjcubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjcubj")}(hinth]hint}(hjchhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjcubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjcubj)}(hnents_first_chunkh]hnents_first_chunk}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubj)}(hgfp_t gfp_maskh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjcmodnameN classnameNjj)}j]jSbc.__sg_alloc_tableasbuh1hhjcubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjcubj)}(hgfp_maskh]hgfp_mask}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubj)}(hsg_alloc_fn *alloc_fnh](h)}(hhh]j)}(h sg_alloc_fnh]h sg_alloc_fn}(hj9dhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6dubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj;dmodnameN classnameNjj)}j]jSbc.__sg_alloc_tableasbuh1hhj2dubj)}(h h]h }(hjWdhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj2dubj)}(hjh]h*}(hjedhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2dubj)}(halloc_fnh]halloc_fn}(hjrdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2dubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjbubeh}(h]h ]h"]h$]h&]jjuh1jhjahhhjahKubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjahhhjahKubah}(h]jaah ](jjeh"]h$]h&]jj)jhuh1j`hjahKhjahhubj)}(hhh]h)}(h8Allocate and initialize an sg table with given allocatorh]h8Allocate and initialize an sg table with given allocator}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjdhhubah}(h]h ]h"]h$]h&]uh1jhjahhhjahKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjdjjdjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct sg_table *table`` The sg table header to use ``unsigned int nents`` Number of entries in sg list ``unsigned int max_ents`` The maximum number of entries the allocator returns per call ``struct scatterlist *first_chunk`` first SGL if preallocated (may be ``NULL``) ``unsigned int nents_first_chunk`` Number of entries in the (preallocated) first scatterlist chunk, 0 means no such preallocated chunk provided by user ``gfp_t gfp_mask`` GFP allocation mask ``sg_alloc_fn *alloc_fn`` Allocator to use **Description** This function returns a **table** **nents** long. The allocator is defined to return scatterlist chunks of maximum size **max_ents**. Thus if **nents** is bigger than **max_ents**, the scatterlists will be chained in units of **max_ents**. **Notes** If this function returns non-0 (eg failure), the caller must call __sg_free_table() to cleanup any leftover allocations.h](h)}(h**Parameters**h]j+)}(hjdh]h Parameters}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjdubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjdubjA)}(hhh](jF)}(h6``struct sg_table *table`` The sg table header to use h](jL)}(h``struct sg_table *table``h]j)}(hjdh]hstruct sg_table *table}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjdubjf)}(hhh]h)}(hThe sg table header to useh]hThe sg table header to use}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhKhjdubah}(h]h ]h"]h$]h&]uh1jehjdubeh}(h]h ]h"]h$]h&]uh1jEhjdhKhjdubjF)}(h4``unsigned int nents`` Number of entries in sg list h](jL)}(h``unsigned int nents``h]j)}(hjeh]hunsigned int nents}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjeubjf)}(hhh]h)}(hNumber of entries in sg listh]hNumber of entries in sg list}(hj/ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+ehKhj,eubah}(h]h ]h"]h$]h&]uh1jehjeubeh}(h]h ]h"]h$]h&]uh1jEhj+ehKhjdubjF)}(hW``unsigned int max_ents`` The maximum number of entries the allocator returns per call h](jL)}(h``unsigned int max_ents``h]j)}(hjOeh]hunsigned int max_ents}(hjQehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMeubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjIeubjf)}(hhh]h)}(hiubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMXhj:iubjf)}(hhh]h)}(hNumber of entries in sg listh]hNumber of entries in sg list}(hjYihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUihMXhjViubah}(h]h ]h"]h$]h&]uh1jehj:iubeh}(h]h ]h"]h$]h&]uh1jEhjUihMXhjhubjF)}(h'``gfp_t gfp_mask`` GFP allocation mask h](jL)}(h``gfp_t gfp_mask``h]j)}(hjyih]hgfp_t gfp_mask}(hj{ihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwiubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMYhjsiubjf)}(hhh]h)}(hGFP allocation maskh]hGFP allocation mask}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMYhjiubah}(h]h ]h"]h$]h&]uh1jehjsiubeh}(h]h ]h"]h$]h&]uh1jEhjihMYhjhubeh}(h]h ]h"]h$]h&]uh1j@hjhubh)}(h**Description**h]j+)}(hjih]h Description}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjiubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM[hjhubj`$)}(hvAllocate and initialize an sg table. If **nents** is larger than SG_MAX_SINGLE_ALLOC a chained sg table will be setup.h]h)}(hvAllocate and initialize an sg table. If **nents** is larger than SG_MAX_SINGLE_ALLOC a chained sg table will be setup.h](h(Allocate and initialize an sg table. If }(hjihhhNhNubj+)}(h **nents**h]hnents}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjiubhE is larger than SG_MAX_SINGLE_ALLOC a chained sg table will be setup.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM[hjiubah}(h]h ]h"]h$]h&]uh1j_$hjihM[hjhubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW-sg_alloc_append_table_from_pages (C function)"c.sg_alloc_append_table_from_pageshNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hint sg_alloc_append_table_from_pages (struct sg_append_table *sgt_append, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, unsigned int max_segment, unsigned int left_pages, gfp_t gfp_mask)h]jg)}(hint sg_alloc_append_table_from_pages(struct sg_append_table *sgt_append, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, unsigned int max_segment, unsigned int left_pages, gfp_t gfp_mask)h](j")}(hinth]hint}(hjjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hj$jhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjjhhhj#jhMubj)}(h sg_alloc_append_table_from_pagesh]j)}(h sg_alloc_append_table_from_pagesh]h sg_alloc_append_table_from_pages}(hj6jhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2jubah}(h]h ](jjeh"]h$]h&]jjuh1jhjjhhhj#jhMubj)}(h(struct sg_append_table *sgt_append, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, unsigned int max_segment, unsigned int left_pages, gfp_t gfp_mask)h](j)}(h"struct sg_append_table *sgt_appendh](jm)}(hjph]hstruct}(hjRjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjNjubj)}(h h]h }(hj_jhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjNjubh)}(hhh]j)}(hsg_append_tableh]hsg_append_table}(hjpjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjrjmodnameN classnameNjj)}j]j)}jj8jsb"c.sg_alloc_append_table_from_pagesasbuh1hhjNjubj)}(h h]h }(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjNjubj)}(hjh]h*}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNjubj)}(h sgt_appendh]h sgt_append}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJjubj)}(hstruct page **pagesh](jm)}(hjph]hstruct}(hjjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjjubj)}(h h]h }(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjjubh)}(hhh]j)}(hpageh]hpage}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjjmodnameN classnameNjj)}j]jj"c.sg_alloc_append_table_from_pagesasbuh1hhjjubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjjubj)}(hjh]h*}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(hjh]h*}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(hpagesh]hpages}(hj(khhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJjubj)}(hunsigned int n_pagesh](j")}(hunsignedh]hunsigned}(hjAkhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj=kubj)}(h h]h }(hjOkhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj=kubj")}(hinth]hint}(hj]khhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj=kubj)}(h h]h }(hjkkhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj=kubj)}(hn_pagesh]hn_pages}(hjykhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=kubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJjubj)}(hunsigned int offseth](j")}(hunsignedh]hunsigned}(hjkhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjkubj")}(hinth]hint}(hjkhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjkubj)}(hoffseth]hoffset}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJjubj)}(hunsigned long sizeh](j")}(hunsignedh]hunsigned}(hjkhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjkubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjkubj")}(hlongh]hlong}(hjkhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjkubj)}(h h]h }(hj lhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjkubj)}(hsizeh]hsize}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJjubj)}(hunsigned int max_segmenth](j")}(hunsignedh]hunsigned}(hj4lhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj0lubj)}(h h]h }(hjBlhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0lubj")}(hinth]hint}(hjPlhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj0lubj)}(h h]h }(hj^lhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0lubj)}(h max_segmenth]h max_segment}(hjllhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0lubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJjubj)}(hunsigned int left_pagesh](j")}(hunsignedh]hunsigned}(hjlhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjlubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjlubj")}(hinth]hint}(hjlhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjlubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjlubj)}(h left_pagesh]h left_pages}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJjubj)}(hgfp_t gfp_maskh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjlmodnameN classnameNjj)}j]jj"c.sg_alloc_append_table_from_pagesasbuh1hhjlubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjlubj)}(hgfp_maskh]hgfp_mask}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjJjubeh}(h]h ]h"]h$]h&]jjuh1jhjjhhhj#jhMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj jhhhj#jhMubah}(h]jjah ](jjeh"]h$]h&]jj)jhuh1j`hj#jhMhj jhhubj)}(hhh]h)}(hAAllocate and initialize an append sg table from an array of pagesh]hAAllocate and initialize an append sg table from an array of pages}(hj/mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj,mhhubah}(h]h ]h"]h$]h&]uh1jhj jhhhj#jhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjGmjjGmjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct sg_append_table *sgt_append`` The sg append table to use ``struct page **pages`` Pointer to an array of page pointers ``unsigned int n_pages`` Number of pages in the pages array ``unsigned int offset`` Offset from start of the first page to the start of a buffer ``unsigned long size`` Number of valid bytes in the buffer (after offset) ``unsigned int max_segment`` Maximum size of a scatterlist element in bytes ``unsigned int left_pages`` Left pages caller have to set after this call ``gfp_t gfp_mask`` GFP allocation mask **Description** In the first call it allocate and initialize an sg table from a list of pages, else reuse the scatterlist from sgt_append. Contiguous ranges of the pages are squashed into a single scatterlist entry up to the maximum size specified in **max_segment**. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array. The returned sg table is released by sg_free_append_table **Return** 0 on success, negative error on failure **Notes** If this function returns non-0 (eg failure), the caller must call sg_free_append_table() to cleanup any leftover allocations. In the fist call, sgt_append must by initialized.h](h)}(h**Parameters**h]j+)}(hjQmh]h Parameters}(hjSmhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjOmubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjKmubjA)}(hhh](jF)}(hB``struct sg_append_table *sgt_append`` The sg append table to use h](jL)}(h&``struct sg_append_table *sgt_append``h]j)}(hjpmh]h"struct sg_append_table *sgt_append}(hjrmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnmubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjjmubjf)}(hhh]h)}(hThe sg append table to useh]hThe sg append table to use}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jehjjmubeh}(h]h ]h"]h$]h&]uh1jEhjmhMhjgmubjF)}(h=``struct page **pages`` Pointer to an array of page pointers h](jL)}(h``struct page **pages``h]j)}(hjmh]hstruct page **pages}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjmubjf)}(hhh]h)}(h$Pointer to an array of page pointersh]h$Pointer to an array of page pointers}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jehjmubeh}(h]h ]h"]h$]h&]uh1jEhjmhMhjgmubjF)}(h<``unsigned int n_pages`` Number of pages in the pages array h](jL)}(h``unsigned int n_pages``h]j)}(hjmh]hunsigned int n_pages}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjmubjf)}(hhh]h)}(h"Number of pages in the pages arrayh]h"Number of pages in the pages array}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jehjmubeh}(h]h ]h"]h$]h&]uh1jEhjmhMhjgmubjF)}(hU``unsigned int offset`` Offset from start of the first page to the start of a buffer h](jL)}(h``unsigned int offset``h]j)}(hjnh]hunsigned int offset}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjnubjf)}(hhh]h)}(hthMhj?tubah}(h]h ]h"]h$]h&]uh1jehj#tubeh}(h]h ]h"]h$]h&]uh1jEhj>thMhjsubjF)}(h'``gfp_t gfp_mask`` GFP allocation mask h](jL)}(h``gfp_t gfp_mask``h]j)}(hjbth]hgfp_t gfp_mask}(hjdthhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`tubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj\tubjf)}(hhh]h)}(hGFP allocation maskh]hGFP allocation mask}(hj{thhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwthMhjxtubah}(h]h ]h"]h$]h&]uh1jehj\tubeh}(h]h ]h"]h$]h&]uh1jEhjwthMhjsubeh}(h]h ]h"]h$]h&]uh1j@hjrubh)}(h**Description**h]j+)}(hjth]h Description}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjtubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM!hjrubj`$)}(hXYAllocate and initialize an sg table from a list of pages. Contiguous ranges of the pages are squashed into a single scatterlist node up to the maximum size specified in **max_segment**. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array. The returned sg table is released by sg_free_table. h](h)}(hX#Allocate and initialize an sg table from a list of pages. Contiguous ranges of the pages are squashed into a single scatterlist node up to the maximum size specified in **max_segment**. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array.h](hAllocate and initialize an sg table from a list of pages. Contiguous ranges of the pages are squashed into a single scatterlist node up to the maximum size specified in }(hjthhhNhNubj+)}(h**max_segment**h]h max_segment}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjtubhk. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array.}(hjthhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM!hjtubh)}(h3The returned sg table is released by sg_free_table.h]h3The returned sg table is released by sg_free_table.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM&hjtubeh}(h]h ]h"]h$]h&]uh1j_$hjthM!hjrubh)}(h **Return**h]j+)}(hjth]hReturn}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjtubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM(hjrubh)}(h'0 on success, negative error on failureh]h'0 on success, negative error on failure}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM)hjrubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsgl_alloc_order (C function)c.sgl_alloc_orderhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hstruct scatterlist * sgl_alloc_order (unsigned long long length, unsigned int order, bool chainable, gfp_t gfp, unsigned int *nent_p)h]jg)}(hstruct scatterlist *sgl_alloc_order(unsigned long long length, unsigned int order, bool chainable, gfp_t gfp, unsigned int *nent_p)h](jm)}(hjph]hstruct}(hj4uhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj0uhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMCubj)}(h h]h }(hjBuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0uhhhjAuhMCubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjSuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPuubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjUumodnameN classnameNjj)}j]j)}jsgl_alloc_ordersbc.sgl_alloc_orderasbuh1hhj0uhhhjAuhMCubj)}(h h]h }(hjtuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj0uhhhjAuhMCubj)}(hjh]h*}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0uhhhjAuhMCubj)}(hsgl_alloc_orderh]j)}(hjquh]hsgl_alloc_order}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubah}(h]h ](jjeh"]h$]h&]jjuh1jhj0uhhhjAuhMCubj)}(h`(unsigned long long length, unsigned int order, bool chainable, gfp_t gfp, unsigned int *nent_p)h](j)}(hunsigned long long lengthh](j")}(hunsignedh]hunsigned}(hjuhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjuubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjuubj")}(hlongh]hlong}(hjuhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjuubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjuubj")}(hlongh]hlong}(hjuhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjuubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjuubj)}(hlengthh]hlength}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjuubj)}(hunsigned int orderh](j")}(hunsignedh]hunsigned}(hjvhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjvubj)}(h h]h }(hj)vhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjvubj")}(hinth]hint}(hj7vhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjvubj)}(h h]h }(hjEvhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjvubj)}(horderh]horder}(hjSvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjuubj)}(hbool chainableh](j")}(hj5h]hbool}(hjlvhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjhvubj)}(h h]h }(hjyvhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjhvubj)}(h chainableh]h chainable}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhvubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjuubj)}(h gfp_t gfph](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjvmodnameN classnameNjj)}j]jouc.sgl_alloc_orderasbuh1hhjvubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjvubj)}(hgfph]hgfp}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjuubj)}(hunsigned int *nent_ph](j")}(hunsignedh]hunsigned}(hjvhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjvubj)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjvubj")}(hinth]hint}(hjwhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjvubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjvubj)}(hjh]h*}(hj whhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hnent_ph]hnent_p}(hj-whhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjuubeh}(h]h ]h"]h$]h&]jjuh1jhj0uhhhjAuhMCubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj,uhhhjAuhMCubah}(h]j'uah ](jjeh"]h$]h&]jj)jhuh1j`hjAuhMChj)uhhubj)}(hhh]h)}(h$allocate a scatterlist and its pagesh]h$allocate a scatterlist and its pages}(hjWwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMChjTwhhubah}(h]h ]h"]h$]h&]uh1jhj)uhhhjAuhMCubeh}(h]h ](jfunctioneh"]h$]h&]jjjjowjjowjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``unsigned long long length`` Length in bytes of the scatterlist. Must be at least one ``unsigned int order`` Second argument for alloc_pages() ``bool chainable`` Whether or not to allocate an extra element in the scatterlist for scatterlist chaining purposes ``gfp_t gfp`` Memory allocation flags ``unsigned int *nent_p`` [out] Number of entries in the scatterlist that have pages **Return** A pointer to an initialized scatterlist or ``NULL`` upon failure.h](h)}(h**Parameters**h]j+)}(hjywh]h Parameters}(hj{whhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjwwubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMGhjswubjA)}(hhh](jF)}(hW``unsigned long long length`` Length in bytes of the scatterlist. Must be at least one h](jL)}(h``unsigned long long length``h]j)}(hjwh]hunsigned long long length}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMDhjwubjf)}(hhh]h)}(h8Length in bytes of the scatterlist. Must be at least oneh]h8Length in bytes of the scatterlist. Must be at least one}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhMDhjwubah}(h]h ]h"]h$]h&]uh1jehjwubeh}(h]h ]h"]h$]h&]uh1jEhjwhMDhjwubjF)}(h9``unsigned int order`` Second argument for alloc_pages() h](jL)}(h``unsigned int order``h]j)}(hjwh]hunsigned int order}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMEhjwubjf)}(hhh]h)}(h!Second argument for alloc_pages()h]h!Second argument for alloc_pages()}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhMEhjwubah}(h]h ]h"]h$]h&]uh1jehjwubeh}(h]h ]h"]h$]h&]uh1jEhjwhMEhjwubjF)}(ht``bool chainable`` Whether or not to allocate an extra element in the scatterlist for scatterlist chaining purposes h](jL)}(h``bool chainable``h]j)}(hj xh]hbool chainable}(hj xhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMGhjxubjf)}(hhh]h)}(h`Whether or not to allocate an extra element in the scatterlist for scatterlist chaining purposesh]h`Whether or not to allocate an extra element in the scatterlist for scatterlist chaining purposes}(hj#xhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMFhj xubah}(h]h ]h"]h$]h&]uh1jehjxubeh}(h]h ]h"]h$]h&]uh1jEhjxhMGhjwubjF)}(h&``gfp_t gfp`` Memory allocation flags h](jL)}(h ``gfp_t gfp``h]j)}(hjDxh]h gfp_t gfp}(hjFxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBxubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMHhj>xubjf)}(hhh]h)}(hMemory allocation flagsh]hMemory allocation flags}(hj]xhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYxhMHhjZxubah}(h]h ]h"]h$]h&]uh1jehj>xubeh}(h]h ]h"]h$]h&]uh1jEhjYxhMHhjwubjF)}(hT``unsigned int *nent_p`` [out] Number of entries in the scatterlist that have pages h](jL)}(h``unsigned int *nent_p``h]j)}(hj}xh]hunsigned int *nent_p}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{xubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMIhjwxubjf)}(hhh]h)}(h:[out] Number of entries in the scatterlist that have pagesh]h:[out] Number of entries in the scatterlist that have pages}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMIhjxubah}(h]h ]h"]h$]h&]uh1jehjwxubeh}(h]h ]h"]h$]h&]uh1jEhjxhMIhjwubeh}(h]h ]h"]h$]h&]uh1j@hjswubh)}(h **Return**h]j+)}(hjxh]hReturn}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjxubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMKhjswubh)}(hAA pointer to an initialized scatterlist or ``NULL`` upon failure.h](h+A pointer to an initialized scatterlist or }(hjxhhhNhNubj)}(h``NULL``h]hNULL}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubh upon failure.}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMKhjswubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsgl_alloc (C function) c.sgl_allochNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h[struct scatterlist * sgl_alloc (unsigned long long length, gfp_t gfp, unsigned int *nent_p)h]jg)}(hYstruct scatterlist *sgl_alloc(unsigned long long length, gfp_t gfp, unsigned int *nent_p)h](jm)}(hjph]hstruct}(hjyhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj yhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM|ubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj yhhhjyhM|ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj.yhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+yubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj0ymodnameN classnameNjj)}j]j)}j sgl_allocsb c.sgl_allocasbuh1hhj yhhhjyhM|ubj)}(h h]h }(hjOyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj yhhhjyhM|ubj)}(hjh]h*}(hj]yhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj yhhhjyhM|ubj)}(h sgl_alloch]j)}(hjLyh]h sgl_alloc}(hjnyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjyubah}(h]h ](jjeh"]h$]h&]jjuh1jhj yhhhjyhM|ubj)}(h<(unsigned long long length, gfp_t gfp, unsigned int *nent_p)h](j)}(hunsigned long long lengthh](j")}(hunsignedh]hunsigned}(hjyhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjyubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjyubj")}(hlongh]hlong}(hjyhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjyubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjyubj")}(hlongh]hlong}(hjyhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjyubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjyubj)}(hlengthh]hlength}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjyubj)}(h gfp_t gfph](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjymodnameN classnameNjj)}j]jJy c.sgl_allocasbuh1hhjyubj)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjyubj)}(hgfph]hgfp}(hj%zhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjyubj)}(hunsigned int *nent_ph](j")}(hunsignedh]hunsigned}(hj>zhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj:zubj)}(h h]h }(hjLzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj:zubj")}(hinth]hint}(hjZzhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj:zubj)}(h h]h }(hjhzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj:zubj)}(hjh]h*}(hjvzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:zubj)}(hnent_ph]hnent_p}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:zubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjyubeh}(h]h ]h"]h$]h&]jjuh1jhj yhhhjyhM|ubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjyhhhjyhM|ubah}(h]jyah ](jjeh"]h$]h&]jj)jhuh1j`hjyhM|hjyhhubj)}(hhh]h)}(h$allocate a scatterlist and its pagesh]h$allocate a scatterlist and its pages}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM|hjzhhubah}(h]h ]h"]h$]h&]uh1jhjyhhhjyhM|ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjzjjzjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``unsigned long long length`` Length in bytes of the scatterlist ``gfp_t gfp`` Memory allocation flags ``unsigned int *nent_p`` [out] Number of entries in the scatterlist **Return** A pointer to an initialized scatterlist or ``NULL`` upon failure.h](h)}(h**Parameters**h]j+)}(hjzh]h Parameters}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjzubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjzubjA)}(hhh](jF)}(hA``unsigned long long length`` Length in bytes of the scatterlist h](jL)}(h``unsigned long long length``h]j)}(hjzh]hunsigned long long length}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM}hjzubjf)}(hhh]h)}(h"Length in bytes of the scatterlisth]h"Length in bytes of the scatterlist}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hM}hj{ubah}(h]h ]h"]h$]h&]uh1jehjzubeh}(h]h ]h"]h$]h&]uh1jEhj{hM}hjzubjF)}(h&``gfp_t gfp`` Memory allocation flags h](jL)}(h ``gfp_t gfp``h]j)}(hj'{h]h gfp_t gfp}(hj){hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%{ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM~hj!{ubjf)}(hhh]h)}(hMemory allocation flagsh]hMemory allocation flags}(hj@{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<{hM~hj={ubah}(h]h ]h"]h$]h&]uh1jehj!{ubeh}(h]h ]h"]h$]h&]uh1jEhj<{hM~hjzubjF)}(hD``unsigned int *nent_p`` [out] Number of entries in the scatterlist h](jL)}(h``unsigned int *nent_p``h]j)}(hj`{h]hunsigned int *nent_p}(hjb{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^{ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjZ{ubjf)}(hhh]h)}(h*[out] Number of entries in the scatterlisth]h*[out] Number of entries in the scatterlist}(hjy{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhju{hMhjv{ubah}(h]h ]h"]h$]h&]uh1jehjZ{ubeh}(h]h ]h"]h$]h&]uh1jEhju{hMhjzubeh}(h]h ]h"]h$]h&]uh1j@hjzubh)}(h **Return**h]j+)}(hj{h]hReturn}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj{ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjzubh)}(hAA pointer to an initialized scatterlist or ``NULL`` upon failure.h](h+A pointer to an initialized scatterlist or }(hj{hhhNhNubj)}(h``NULL``h]hNULL}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubh upon failure.}(hj{hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjzubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsgl_free_n_order (C function)c.sgl_free_n_orderhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hEvoid sgl_free_n_order (struct scatterlist *sgl, int nents, int order)h]jg)}(hDvoid sgl_free_n_order(struct scatterlist *sgl, int nents, int order)h](j")}(hvoidh]hvoid}(hj{hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj{hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj{hhhj|hMubj)}(hsgl_free_n_orderh]j)}(hsgl_free_n_orderh]hsgl_free_n_order}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj{hhhj|hMubj)}(h/(struct scatterlist *sgl, int nents, int order)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hj/|hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj+|ubj)}(h h]h }(hj<|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj+|ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjM|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJ|ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjO|modnameN classnameNjj)}j]j)}jj|sbc.sgl_free_n_orderasbuh1hhj+|ubj)}(h h]h }(hjm|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj+|ubj)}(hjh]h*}(hj{|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+|ubj)}(hsglh]hsgl}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'|ubj)}(h int nentsh](j")}(hinth]hint}(hj|hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj|ubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj|ubj)}(hnentsh]hnents}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'|ubj)}(h int orderh](j")}(hinth]hint}(hj|hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj|ubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj|ubj)}(horderh]horder}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'|ubeh}(h]h ]h"]h$]h&]jjuh1jhj{hhhj|hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj{hhhj|hMubah}(h]j{ah ](jjeh"]h$]h&]jj)jhuh1j`hj|hMhj{hhubj)}(hhh]h)}(h free a scatterlist and its pagesh]h free a scatterlist and its pages}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj}hhubah}(h]h ]h"]h$]h&]uh1jhj{hhhj|hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj4}jj4}jjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct scatterlist *sgl`` Scatterlist with one or more elements ``int nents`` Maximum number of elements to free ``int order`` Second argument for __free_pages() **Notes** - If several scatterlists have been chained and each chain element is freed separately then it's essential to set nents correctly to avoid that a page would get freed twice. - All pages in a chained scatterlist can be freed at once by setting **nents** to a high number.h](h)}(h**Parameters**h]j+)}(hj>}h]h Parameters}(hj@}hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj<}ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj8}ubjA)}(hhh](jF)}(hB``struct scatterlist *sgl`` Scatterlist with one or more elements h](jL)}(h``struct scatterlist *sgl``h]j)}(hj]}h]hstruct scatterlist *sgl}(hj_}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[}ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjW}ubjf)}(hhh]h)}(h%Scatterlist with one or more elementsh]h%Scatterlist with one or more elements}(hjv}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr}hMhjs}ubah}(h]h ]h"]h$]h&]uh1jehjW}ubeh}(h]h ]h"]h$]h&]uh1jEhjr}hMhjT}ubjF)}(h1``int nents`` Maximum number of elements to free h](jL)}(h ``int nents``h]j)}(hj}h]h int nents}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj}ubjf)}(hhh]h)}(h"Maximum number of elements to freeh]h"Maximum number of elements to free}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj}ubah}(h]h ]h"]h$]h&]uh1jehj}ubeh}(h]h ]h"]h$]h&]uh1jEhj}hMhjT}ubjF)}(h1``int order`` Second argument for __free_pages() h](jL)}(h ``int order``h]j)}(hj}h]h int order}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj}ubjf)}(hhh]h)}(h"Second argument for __free_pages()h]h"Second argument for __free_pages()}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj}ubah}(h]h ]h"]h$]h&]uh1jehj}ubeh}(h]h ]h"]h$]h&]uh1jEhj}hMhjT}ubeh}(h]h ]h"]h$]h&]uh1j@hj8}ubh)}(h **Notes**h]j+)}(hj ~h]hNotes}(hj ~hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj~ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj8}ubj")}(hhh](j')}(hIf several scatterlists have been chained and each chain element is freed separately then it's essential to set nents correctly to avoid that a page would get freed twice.h]h)}(hIf several scatterlists have been chained and each chain element is freed separately then it's essential to set nents correctly to avoid that a page would get freed twice.h]hIf several scatterlists have been chained and each chain element is freed separately then it’s essential to set nents correctly to avoid that a page would get freed twice.}(hj'~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj#~ubah}(h]h ]h"]h$]h&]uh1j&hj ~ubj')}(h^All pages in a chained scatterlist can be freed at once by setting **nents** to a high number.h]h)}(h^All pages in a chained scatterlist can be freed at once by setting **nents** to a high number.h](hCAll pages in a chained scatterlist can be freed at once by setting }(hj@~hhhNhNubj+)}(h **nents**h]hnents}(hjH~hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj@~ubh to a high number.}(hj@~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj<~ubah}(h]h ]h"]h$]h&]uh1j&hj ~ubeh}(h]h ]h"]h$]h&]jjuh1j!hj5~hMhj8}ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsgl_free_order (C function)c.sgl_free_orderhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h8void sgl_free_order (struct scatterlist *sgl, int order)h]jg)}(h7void sgl_free_order(struct scatterlist *sgl, int order)h](j")}(hvoidh]hvoid}(hj~hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj~hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj~hhhj~hMubj)}(hsgl_free_orderh]j)}(hsgl_free_orderh]hsgl_free_order}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj~hhhj~hMubj)}(h$(struct scatterlist *sgl, int order)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hj~hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj~ubj)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj~ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj~modnameN classnameNjj)}j]j)}jj~sbc.sgl_free_orderasbuh1hhj~ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj~ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(hsglh]hsgl}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj~ubj)}(h int orderh](j")}(hinth]hint}(hj<hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj8ubj)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj8ubj)}(horderh]horder}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj~ubeh}(h]h ]h"]h$]h&]jjuh1jhj~hhhj~hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj~hhhj~hMubah}(h]j~ah ](jjeh"]h$]h&]jj)jhuh1j`hj~hMhj~hhubj)}(hhh]h)}(h free a scatterlist and its pagesh]h free a scatterlist and its pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhj~hhhj~hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sgl`` Scatterlist with one or more elements ``int order`` Second argument for __free_pages()h](h)}(h**Parameters**h]j+)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjA)}(hhh](jF)}(hB``struct scatterlist *sgl`` Scatterlist with one or more elements h](jL)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(h%Scatterlist with one or more elementsh]h%Scatterlist with one or more elements}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubjF)}(h0``int order`` Second argument for __free_pages()h](jL)}(h ``int order``h]j)}(hjh]h int order}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(h"Second argument for __free_pages()h]h"Second argument for __free_pages()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubeh}(h]h ]h"]h$]h&]uh1j@hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsgl_free (C function) c.sgl_freehNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h'void sgl_free (struct scatterlist *sgl)h]jg)}(h&void sgl_free(struct scatterlist *sgl)h](j")}(hvoidh]hvoid}(hjVhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjRhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjRhhhjdhMubj)}(hsgl_freeh]j)}(hsgl_freeh]hsgl_free}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubah}(h]h ](jjeh"]h$]h&]jjuh1jhjRhhhjdhMubj)}(h(struct scatterlist *sgl)h]j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjysb c.sgl_freeasbuh1hhjubj)}(h h]h }(hjрhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hj߀hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjRhhhjdhMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjNhhhjdhMubah}(h]jIah ](jjeh"]h$]h&]jj)jhuh1j`hjdhMhjKhhubj)}(hhh]h)}(h free a scatterlist and its pagesh]h free a scatterlist and its pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjKhhhjdhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj.jj.jjjuh1j[hhhj"hNhNubj!)}(hS**Parameters** ``struct scatterlist *sgl`` Scatterlist with one or more elementsh](h)}(h**Parameters**h]j+)}(hj8h]h Parameters}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj6ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj2ubjA)}(hhh]jF)}(hA``struct scatterlist *sgl`` Scatterlist with one or more elementsh](jL)}(h``struct scatterlist *sgl``h]j)}(hjWh]hstruct scatterlist *sgl}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjQubjf)}(hhh]h)}(h%Scatterlist with one or more elementsh]h%Scatterlist with one or more elements}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjmubah}(h]h ]h"]h$]h&]uh1jehjQubeh}(h]h ]h"]h$]h&]uh1jEhjlhMhjNubah}(h]h ]h"]h$]h&]uh1j@hj2ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_miter_start (C function)c.sg_miter_starthNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(htvoid sg_miter_start (struct sg_mapping_iter *miter, struct scatterlist *sgl, unsigned int nents, unsigned int flags)h]jg)}(hsvoid sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, unsigned int nents, unsigned int flags)h](j")}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjhhhjhMubj)}(hsg_miter_starth]j)}(hsg_miter_starth]hsg_miter_start}(hjҁhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj΁ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMubj)}(h`(struct sg_mapping_iter *miter, struct scatterlist *sgl, unsigned int nents, unsigned int flags)h](j)}(hstruct sg_mapping_iter *miterh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(hsg_mapping_iterh]hsg_mapping_iter}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjԁsbc.sg_miter_startasbuh1hhjubj)}(h h]h }(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmiterh]hmiter}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hj`hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj\ubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj\ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j(c.sg_miter_startasbuh1hhj\ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj\ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjЂhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hĵubj)}(h h]h }(hjނhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hĵubj")}(hinth]hint}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hĵubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hĵubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhĵubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int flagsh](j")}(hunsignedh]hunsigned}(hj!hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj")}(hinth]hint}(hj=hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hflagsh]hflags}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j`hjhMhjhhubj)}(hhh]h)}(h&start mapping iteration over a sg listh]h&start mapping iteration over a sg list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(hX4**Parameters** ``struct sg_mapping_iter *miter`` sg mapping iter to be started ``struct scatterlist *sgl`` sg list to iterate over ``unsigned int nents`` number of sg entries ``unsigned int flags`` sg iterator flags **Description** Starts mapping iterator **miter**. **Context** Don't care.h](h)}(h**Parameters**h]j+)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjA)}(hhh](jF)}(h@``struct sg_mapping_iter *miter`` sg mapping iter to be started h](jL)}(h!``struct sg_mapping_iter *miter``h]j)}(hjăh]hstruct sg_mapping_iter *miter}(hjƃhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjƒubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(hsg mapping iter to be startedh]hsg mapping iter to be started}(hj݃hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjكhMhjڃubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjكhMhjubjF)}(h4``struct scatterlist *sgl`` sg list to iterate over h](jL)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(hsg list to iterate overh]hsg list to iterate over}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubjF)}(h,``unsigned int nents`` number of sg entries h](jL)}(h``unsigned int nents``h]j)}(hj6h]hunsigned int nents}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj0ubjf)}(hhh]h)}(hnumber of sg entriesh]hnumber of sg entries}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMhjLubah}(h]h ]h"]h$]h&]uh1jehj0ubeh}(h]h ]h"]h$]h&]uh1jEhjKhMhjubjF)}(h)``unsigned int flags`` sg iterator flags h](jL)}(h``unsigned int flags``h]j)}(hjoh]hunsigned int flags}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjiubjf)}(hhh]h)}(hsg iterator flagsh]hsg iterator flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjiubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubeh}(h]h ]h"]h$]h&]uh1j@hjubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubj`$)}(h#Starts mapping iterator **miter**. h]h)}(h"Starts mapping iterator **miter**.h](hStarts mapping iterator }(hjĄhhhNhNubj+)}(h **miter**h]hmiter}(hj̄hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjĄubh.}(hjĄhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubah}(h]h ]h"]h$]h&]uh1j_$hjhMhjubh)}(h **Context**h]j+)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubh)}(h Don't care.h]h Don’t care.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_miter_skip (C function)c.sg_miter_skiphNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h@bool sg_miter_skip (struct sg_mapping_iter *miter, off_t offset)h]jg)}(h?bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)h](j")}(hj5h]hbool}(hj2hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj.hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM-ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj.hhhj?hM-ubj)}(h sg_miter_skiph]j)}(h sg_miter_skiph]h sg_miter_skip}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubah}(h]h ](jjeh"]h$]h&]jjuh1jhj.hhhj?hM-ubj)}(h-(struct sg_mapping_iter *miter, off_t offset)h](j)}(hstruct sg_mapping_iter *miterh](jm)}(hjph]hstruct}(hjnhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjjubj)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjjubh)}(hhh]j)}(hsg_mapping_iterh]hsg_mapping_iter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjTsbc.sg_miter_skipasbuh1hhjjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(hmiterh]hmiter}(hjDžhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjfubj)}(h off_t offseth](h)}(hhh]j)}(hoff_th]hoff_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.sg_miter_skipasbuh1hhj܅ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj܅ubj)}(hoffseth]hoffset}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj܅ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjfubeh}(h]h ]h"]h$]h&]jjuh1jhj.hhhj?hM-ubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj*hhhj?hM-ubah}(h]j%ah ](jjeh"]h$]h&]jj)jhuh1j`hj?hM-hj'hhubj)}(hhh]h)}(hreposition mapping iteratorh]hreposition mapping iterator}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM-hj6hhubah}(h]h ]h"]h$]h&]uh1jhj'hhhj?hM-ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjQjjQjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct sg_mapping_iter *miter`` sg mapping iter to be skipped ``off_t offset`` number of bytes to plus the current location **Description** Sets the offset of **miter** to its current location plus **offset** bytes. If mapping iterator **miter** has been proceeded by sg_miter_next(), this stops **miter**. **Context** Don't care. **Return** true if **miter** contains the valid mapping. false if end of sg list is reached.h](h)}(h**Parameters**h]j+)}(hj[h]h Parameters}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjYubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM1hjUubjA)}(hhh](jF)}(h@``struct sg_mapping_iter *miter`` sg mapping iter to be skipped h](jL)}(h!``struct sg_mapping_iter *miter``h]j)}(hjzh]hstruct sg_mapping_iter *miter}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM.hjtubjf)}(hhh]h)}(hsg mapping iter to be skippedh]hsg mapping iter to be skipped}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM.hjubah}(h]h ]h"]h$]h&]uh1jehjtubeh}(h]h ]h"]h$]h&]uh1jEhjhM.hjqubjF)}(h>``off_t offset`` number of bytes to plus the current location h](jL)}(h``off_t offset``h]j)}(hjh]h off_t offset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM/hjubjf)}(hhh]h)}(h,number of bytes to plus the current locationh]h,number of bytes to plus the current location}(hj̆hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjȆhM/hjɆubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjȆhM/hjqubeh}(h]h ]h"]h$]h&]uh1j@hjUubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM1hjUubj`$)}(hSets the offset of **miter** to its current location plus **offset** bytes. If mapping iterator **miter** has been proceeded by sg_miter_next(), this stops **miter**. h]h)}(hSets the offset of **miter** to its current location plus **offset** bytes. If mapping iterator **miter** has been proceeded by sg_miter_next(), this stops **miter**.h](hSets the offset of }(hjhhhNhNubj+)}(h **miter**h]hmiter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubh to its current location plus }(hjhhhNhNubj+)}(h **offset**h]hoffset}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubh bytes. If mapping iterator }(hjhhhNhNubj+)}(h **miter**h]hmiter}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubh3 has been proceeded by sg_miter_next(), this stops }(hjhhhNhNubj+)}(h **miter**h]hmiter}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM1hjubah}(h]h ]h"]h$]h&]uh1j_$hj^hM1hjUubh)}(h **Context**h]j+)}(hjgh]hContext}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjeubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM5hjUubh)}(h Don't care.h]h Don’t care.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM6hjUubh)}(h **Return**h]j+)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM8hjUubh)}(hRtrue if **miter** contains the valid mapping. false if end of sg list is reached.h](htrue if }(hjhhhNhNubj+)}(h **miter**h]hmiter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubhA contains the valid mapping. false if end of sg list is reached.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM9hjUubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_miter_next (C function)c.sg_miter_nexthNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h2bool sg_miter_next (struct sg_mapping_iter *miter)h]jg)}(h1bool sg_miter_next(struct sg_mapping_iter *miter)h](j")}(hj5h]hbool}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMRubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjhhhjhMRubj)}(h sg_miter_nexth]j)}(h sg_miter_nexth]h sg_miter_next}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMRubj)}(h(struct sg_mapping_iter *miter)h]j)}(hstruct sg_mapping_iter *miterh](jm)}(hjph]hstruct}(hj!hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(hsg_mapping_iterh]hsg_mapping_iter}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjAmodnameN classnameNjj)}j]j)}jjsbc.sg_miter_nextasbuh1hhjubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmiterh]hmiter}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMRubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj݇hhhjhMRubah}(h]j؇ah ](jjeh"]h$]h&]jj)jhuh1j`hjhMRhjڇhhubj)}(hhh]h)}(h,proceed mapping iterator to the next mappingh]h,proceed mapping iterator to the next mapping}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMRhjhhubah}(h]h ]h"]h$]h&]uh1jhjڇhhhjhMRubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct sg_mapping_iter *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**, **miter->addr** and **miter->length** point to the current mapping. **Context** May sleep if !SG_MITER_ATOMIC && !SG_MITER_LOCAL. **Return** true if **miter** contains the next mapping. false if end of sg list is reached.h](h)}(h**Parameters**h]j+)}(hjƈh]h Parameters}(hjȈhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjĈubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMVhjubjA)}(hhh]jF)}(h=``struct sg_mapping_iter *miter`` sg mapping iter to proceed h](jL)}(h!``struct sg_mapping_iter *miter``h]j)}(hjh]hstruct sg_mapping_iter *miter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMShj߈ubjf)}(hhh]h)}(hsg mapping iter to proceedh]hsg mapping iter to proceed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMShjubah}(h]h ]h"]h$]h&]uh1jehj߈ubeh}(h]h ]h"]h$]h&]uh1jEhjhMShj܈ubah}(h]h ]h"]h$]h&]uh1j@hjubh)}(h**Description**h]j+)}(hj h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMUhjubj`$)}(hProceeds **miter** to the next mapping. **miter** should have been started using sg_miter_start(). On successful return, **miter->page**, **miter->addr** and **miter->length** point to the current mapping. h]h)}(hProceeds **miter** to the next mapping. **miter** should have been started using sg_miter_start(). On successful return, **miter->page**, **miter->addr** and **miter->length** point to the current mapping.h](h Proceeds }(hj:hhhNhNubj+)}(h **miter**h]hmiter}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj:ubh to the next mapping. }(hj:hhhNhNubj+)}(h **miter**h]hmiter}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj:ubhI should have been started using sg_miter_start(). On successful return, }(hj:hhhNhNubj+)}(h**miter->page**h]h miter->page}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj:ubh, }(hj:hhhNhNubj+)}(h**miter->addr**h]h miter->addr}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj:ubh and }(hj:hhhNhNubj+)}(h**miter->length**h]h miter->length}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj:ubh point to the current mapping.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMUhj6ubah}(h]h ]h"]h$]h&]uh1j_$hjhMUhjubh)}(h **Context**h]j+)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMYhjubh)}(h1May sleep if !SG_MITER_ATOMIC && !SG_MITER_LOCAL.h]h1May sleep if !SG_MITER_ATOMIC && !SG_MITER_LOCAL.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMZhjubh)}(h **Return**h]j+)}(hj҉h]hReturn}(hjԉhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjЉubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM\hjubh)}(hQtrue if **miter** contains the next mapping. false if end of sg list is reached.h](htrue if }(hjhhhNhNubj+)}(h **miter**h]hmiter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubh@ contains the next mapping. false if end of sg list is reached.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM]hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_miter_stop (C function)c.sg_miter_stophNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h2void sg_miter_stop (struct sg_mapping_iter *miter)h]jg)}(h1void sg_miter_stop(struct sg_mapping_iter *miter)h](j")}(hvoidh]hvoid}(hj)hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj%hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM{ubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj%hhhj7hM{ubj)}(h sg_miter_stoph]j)}(h sg_miter_stoph]h sg_miter_stop}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubah}(h]h ](jjeh"]h$]h&]jjuh1jhj%hhhj7hM{ubj)}(h(struct sg_mapping_iter *miter)h]j)}(hstruct sg_mapping_iter *miterh](jm)}(hjph]hstruct}(hjfhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjbubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubh)}(hhh]j)}(hsg_mapping_iterh]hsg_mapping_iter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjLsbc.sg_miter_stopasbuh1hhjbubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjbubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubj)}(hmiterh]hmiter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj^ubah}(h]h ]h"]h$]h&]jjuh1jhj%hhhj7hM{ubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj!hhhj7hM{ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j`hj7hM{hjhhubj)}(hhh]h)}(hstop mapping iterationh]hstop mapping iteration}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM{hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj7hM{ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct sg_mapping_iter *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. This is useful when resources (kmap) need to be released during iteration. **Context** Don't care otherwise.h](h)}(h**Parameters**h]j+)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjA)}(hhh]jF)}(h@``struct sg_mapping_iter *miter`` sg mapping iter to be stopped h](jL)}(h!``struct sg_mapping_iter *miter``h]j)}(hj*h]hstruct sg_mapping_iter *miter}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM|hj$ubjf)}(hhh]h)}(hsg mapping iter to be stoppedh]hsg mapping iter to be stopped}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hM|hj@ubah}(h]h ]h"]h$]h&]uh1jehj$ubeh}(h]h ]h"]h$]h&]uh1jEhj?hM|hj!ubah}(h]h ]h"]h$]h&]uh1j@hjubh)}(h**Description**h]j+)}(hjeh]h Description}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjcubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM~hjubj`$)}(hStops 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. This is useful when resources (kmap) need to be released during iteration. h]h)}(hStops 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. This is useful when resources (kmap) need to be released during iteration.h](hStops mapping iterator }(hjhhhNhNubj+)}(h **miter**h]hmiter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubh. }(hjhhhNhNubj+)}(h **miter**h]hmiter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubh should have been started using sg_miter_start(). A stopped iteration can be resumed by calling sg_miter_next() on it. This is useful when resources (kmap) need to be released during iteration.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM~hj{ubah}(h]h ]h"]h$]h&]uh1j_$hjhM~hjubh)}(h **Context**h]j+)}(hjh]hContext}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubh)}(hDon't care otherwise.h]hDon’t care otherwise.}(hjЋhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_copy_buffer (C function)c.sg_copy_bufferhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hysize_t sg_copy_buffer (struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip, bool to_buffer)h]jg)}(hxsize_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip, bool to_buffer)h](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jsg_copy_buffersbc.sg_copy_bufferasbuh1hhjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjhhhj#hMubj)}(hsg_copy_bufferh]j)}(hj h]hsg_copy_buffer}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhj#hMubj)}(hc(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip, bool to_buffer)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hjQhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjMubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjMubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjqmodnameN classnameNjj)}j]jc.sg_copy_bufferasbuh1hhjMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjMubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjIubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hjόhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj")}(hinth]hint}(hj݌hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjIubj)}(h void *bufh](j")}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hbufh]hbuf}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjIubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjYmodnameN classnameNjj)}j]jc.sg_copy_bufferasbuh1hhjPubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjPubj)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjIubj)}(h off_t skiph](h)}(hhh]j)}(hoff_th]hoff_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.sg_copy_bufferasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hskiph]hskip}(hjˍhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjIubj)}(hbool to_bufferh](j")}(hj5h]hbool}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(h to_bufferh]h to_buffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjIubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj#hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjhhhj#hMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j`hj#hMhjhhubj)}(hhh]h)}(h0Copy data between a linear buffer and an SG listh]h0Copy data between a linear buffer and an SG list}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj&hhubah}(h]h ]h"]h$]h&]uh1jhjhhhj#hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjAjjAjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct scatterlist *sgl`` The SG list ``unsigned int nents`` Number of SG entries ``void *buf`` Where to copy from ``size_t buflen`` The number of bytes to copy ``off_t skip`` Number of bytes to skip before copying ``bool to_buffer`` transfer direction (true == from an sg list to a buffer, false == from a buffer to an sg list) **Description** Returns the number of copied bytes.h](h)}(h**Parameters**h]j+)}(hjKh]h Parameters}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjIubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjEubjA)}(hhh](jF)}(h(``struct scatterlist *sgl`` The SG list h](jL)}(h``struct scatterlist *sgl``h]j)}(hjjh]hstruct scatterlist *sgl}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjdubjf)}(hhh]h)}(h The SG listh]h The SG list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjdubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjaubjF)}(h,``unsigned int nents`` Number of SG entries h](jL)}(h``unsigned int nents``h]j)}(hjh]hunsigned int nents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjaubjF)}(h!``void *buf`` Where to copy from h](jL)}(h ``void *buf``h]j)}(hj܎h]h void *buf}(hjގhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjڎubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj֎ubjf)}(hhh]h)}(hWhere to copy fromh]hWhere to copy from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehj֎ubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjaubjF)}(h.``size_t buflen`` The number of bytes to copy h](jL)}(h``size_t buflen``h]j)}(hjh]h size_t buflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(hThe number of bytes to copyh]hThe number of bytes to copy}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hMhj+ubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhj*hMhjaubjF)}(h6``off_t skip`` Number of bytes to skip before copying h](jL)}(h``off_t skip``h]j)}(hjNh]h off_t skip}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjHubjf)}(hhh]h)}(h&Number of bytes to skip before copyingh]h&Number of bytes to skip before copying}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchMhjdubah}(h]h ]h"]h$]h&]uh1jehjHubeh}(h]h ]h"]h$]h&]uh1jEhjchMhjaubjF)}(hr``bool to_buffer`` transfer direction (true == from an sg list to a buffer, false == from a buffer to an sg list) h](jL)}(h``bool to_buffer``h]j)}(hjh]hbool to_buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(h^transfer direction (true == from an sg list to a buffer, false == from a buffer to an sg list)h]h^transfer direction (true == from an sg list to a buffer, false == from a buffer to an sg list)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjaubeh}(h]h ]h"]h$]h&]uh1j@hjEubh)}(h**Description**h]j+)}(hjÏh]h Description}(hjŏhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjEubh)}(h#Returns the number of copied bytes.h]h#Returns the number of copied bytes.}(hjُhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjEubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW sg_copy_from_buffer (C function)c.sg_copy_from_bufferhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hhsize_t sg_copy_from_buffer (struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen)h]jg)}(hgsize_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen)h](h)}(hhh]j)}(hsize_th]hsize_t}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jsg_copy_from_buffersbc.sg_copy_from_bufferasbuh1hhjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjhhhj,hMubj)}(hsg_copy_from_bufferh]j)}(hj)h]hsg_copy_from_buffer}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhj,hMubj)}(hM(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hjZhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjVubj)}(h h]h }(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjVubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjzmodnameN classnameNjj)}j]j'c.sg_copy_from_bufferasbuh1hhjVubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjVubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjRubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjʐhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjƐubj)}(h h]h }(hjؐhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjƐubj")}(hinth]hint}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjƐubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjƐubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjƐubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjRubj)}(hconst void *bufh](jm)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj")}(hvoidh]hvoid}(hj6hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hbufh]hbuf}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjRubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj}modnameN classnameNjj)}j]j'c.sg_copy_from_bufferasbuh1hhjtubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjtubj)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjRubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj,hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjhhhj,hMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j`hj,hMhjhhubj)}(hhh]h)}(h'Copy from a linear buffer to an SG listh]h'Copy from a linear buffer to an SG list}(hjёhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjΑhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj,hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sgl`` The SG list ``unsigned int nents`` Number of SG entries ``const void *buf`` Where to copy from ``size_t buflen`` The number of bytes to copy **Description** Returns the number of copied bytes.h](h)}(h**Parameters**h]j+)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjA)}(hhh](jF)}(h(``struct scatterlist *sgl`` The SG list h](jL)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj ubjf)}(hhh]h)}(h The SG listh]h The SG list}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj(ubah}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]uh1jEhj'hMhj ubjF)}(h,``unsigned int nents`` Number of SG entries h](jL)}(h``unsigned int nents``h]j)}(hjKh]hunsigned int nents}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjEubjf)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hMhjaubah}(h]h ]h"]h$]h&]uh1jehjEubeh}(h]h ]h"]h$]h&]uh1jEhj`hMhj ubjF)}(h'``const void *buf`` Where to copy from h](jL)}(h``const void *buf``h]j)}(hjh]hconst void *buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj~ubjf)}(hhh]h)}(hWhere to copy fromh]hWhere to copy from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehj~ubeh}(h]h ]h"]h$]h&]uh1jEhjhMhj ubjF)}(h.``size_t buflen`` The number of bytes to copy h](jL)}(h``size_t buflen``h]j)}(hjh]h size_t buflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(hThe number of bytes to copyh]hThe number of bytes to copy}(hj֒hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjҒhMhjӒubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjҒhMhj ubeh}(h]h ]h"]h$]h&]uh1j@hjubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubh)}(h#Returns the number of copied bytes.h]h#Returns the number of copied bytes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_copy_to_buffer (C function)c.sg_copy_to_bufferhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h`size_t sg_copy_to_buffer (struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen)h]jg)}(h_size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen)h](h)}(hhh]j)}(hsize_th]hsize_t}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjBmodnameN classnameNjj)}j]j)}jsg_copy_to_buffersbc.sg_copy_to_bufferasbuh1hhj9hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj9hhhjahMubj)}(hsg_copy_to_bufferh]j)}(hj^h]hsg_copy_to_buffer}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjpubah}(h]h ](jjeh"]h$]h&]jjuh1jhj9hhhjahMubj)}(hG(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j\c.sg_copy_to_bufferasbuh1hhjubj)}(h h]h }(hj˓hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjٓhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj")}(hinth]hint}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hnentsh]hnents}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h void *bufh](j")}(hvoidh]hvoid}(hjPhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjLubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjLubj)}(hjh]h*}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubj)}(hbufh]hbuf}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j\c.sg_copy_to_bufferasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhj9hhhjahMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhj5hhhjahMubah}(h]j0ah ](jjeh"]h$]h&]jj)jhuh1j`hjahMhj2hhubj)}(hhh]h)}(h'Copy from an SG list to a linear bufferh]h'Copy from an SG list to a linear buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhj2hhhjahMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(h**Parameters** ``struct scatterlist *sgl`` The SG list ``unsigned int nents`` Number of SG entries ``void *buf`` Where to copy to ``size_t buflen`` The number of bytes to copy **Description** Returns the number of copied bytes.h](h)}(h**Parameters**h]j+)}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjA)}(hhh](jF)}(h(``struct scatterlist *sgl`` The SG list h](jL)}(h``struct scatterlist *sgl``h]j)}(hj,h]hstruct scatterlist *sgl}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj&ubjf)}(hhh]h)}(h The SG listh]h The SG list}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjBubah}(h]h ]h"]h$]h&]uh1jehj&ubeh}(h]h ]h"]h$]h&]uh1jEhjAhMhj#ubjF)}(h,``unsigned int nents`` Number of SG entries h](jL)}(h``unsigned int nents``h]j)}(hjeh]hunsigned int nents}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj_ubjf)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhMhj{ubah}(h]h ]h"]h$]h&]uh1jehj_ubeh}(h]h ]h"]h$]h&]uh1jEhjzhMhj#ubjF)}(h``void *buf`` Where to copy to h](jL)}(h ``void *buf``h]j)}(hjh]h void *buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(hWhere to copy toh]hWhere to copy to}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhj#ubjF)}(h.``size_t buflen`` The number of bytes to copy h](jL)}(h``size_t buflen``h]j)}(hjוh]h size_t buflen}(hjٕhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjՕubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjѕubjf)}(hhh]h)}(hThe number of bytes to copyh]hThe number of bytes to copy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjѕubeh}(h]h ]h"]h$]h&]uh1jEhjhMhj#ubeh}(h]h ]h"]h$]h&]uh1j@hjubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubh)}(h#Returns the number of copied bytes.h]h#Returns the number of copied bytes.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jW!sg_pcopy_from_buffer (C function)c.sg_pcopy_from_bufferhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(husize_t sg_pcopy_from_buffer (struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen, off_t skip)h]jg)}(htsize_t sg_pcopy_from_buffer(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen, off_t skip)h](h)}(hhh]j)}(hsize_th]hsize_t}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj\modnameN classnameNjj)}j]j)}jsg_pcopy_from_buffersbc.sg_pcopy_from_bufferasbuh1hhjShhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjShhhj{hMubj)}(hsg_pcopy_from_bufferh]j)}(hjxh]hsg_pcopy_from_buffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjShhhj{hMubj)}(hY(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen, off_t skip)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjǖhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjĖubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjɖmodnameN classnameNjj)}j]jvc.sg_pcopy_from_bufferasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj")}(hinth]hint}(hj5hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hnentsh]hnents}(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst void *bufh](jm)}(hjh]hconst}(hjjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjfubj)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjfubj")}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjfubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjfubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(hbufh]hbuf}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjʗhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjǗubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj̗modnameN classnameNjj)}j]jvc.sg_pcopy_from_bufferasbuh1hhj×ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj×ubj)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj×ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h off_t skiph](h)}(hhh]j)}(hoff_th]hoff_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jvc.sg_pcopy_from_bufferasbuh1hhj ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj ubj)}(hskiph]hskip}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjShhhj{hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjOhhhj{hMubah}(h]jJah ](jjeh"]h$]h&]jj)jhuh1j`hj{hMhjLhhubj)}(hhh]h)}(h'Copy from a linear buffer to an SG listh]h'Copy from a linear buffer to an SG list}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjehhubah}(h]h ]h"]h$]h&]uh1jhjLhhhj{hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(hX2**Parameters** ``struct scatterlist *sgl`` The SG list ``unsigned int nents`` Number of SG entries ``const void *buf`` Where to copy from ``size_t buflen`` The number of bytes to copy ``off_t skip`` Number of bytes to skip before copying **Description** Returns the number of copied bytes.h](h)}(h**Parameters**h]j+)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjA)}(hhh](jF)}(h(``struct scatterlist *sgl`` The SG list h](jL)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(h The SG listh]h The SG list}(hj˜hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubjF)}(h,``unsigned int nents`` Number of SG entries h](jL)}(h``unsigned int nents``h]j)}(hjh]hunsigned int nents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjܘubjf)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjܘubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubjF)}(h'``const void *buf`` Where to copy from h](jL)}(h``const void *buf``h]j)}(hjh]hconst void *buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(hWhere to copy fromh]hWhere to copy from}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hMhj1ubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhj0hMhjubjF)}(h.``size_t buflen`` The number of bytes to copy h](jL)}(h``size_t buflen``h]j)}(hjTh]h size_t buflen}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjNubjf)}(hhh]h)}(hThe number of bytes to copyh]hThe number of bytes to copy}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhjjubah}(h]h ]h"]h$]h&]uh1jehjNubeh}(h]h ]h"]h$]h&]uh1jEhjihMhjubjF)}(h6``off_t skip`` Number of bytes to skip before copying h](jL)}(h``off_t skip``h]j)}(hjh]h off_t skip}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(h&Number of bytes to skip before copyingh]h&Number of bytes to skip before copying}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubeh}(h]h ]h"]h$]h&]uh1j@hjubh)}(h**Description**h]j+)}(hjșh]h Description}(hjʙhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjƙubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubh)}(h#Returns the number of copied bytes.h]h#Returns the number of copied bytes.}(hjޙhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_pcopy_to_buffer (C function)c.sg_pcopy_to_bufferhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hmsize_t sg_pcopy_to_buffer (struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip)h]jg)}(hlsize_t sg_pcopy_to_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip)h](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jsg_pcopy_to_buffersbc.sg_pcopy_to_bufferasbuh1hhj hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM ubj)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj hhhj1hM ubj)}(hsg_pcopy_to_bufferh]j)}(hj.h]hsg_pcopy_to_buffer}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj1hM ubj)}(hS(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hj_hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj[ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj[ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j,c.sg_pcopy_to_bufferasbuh1hhj[ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj[ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjϚhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj˚ubj)}(h h]h }(hjݚhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj˚ubj")}(hinth]hint}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj˚ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj˚ubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj˚ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubj)}(h void *bufh](j")}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hbufh]hbuf}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjgmodnameN classnameNjj)}j]j,c.sg_pcopy_to_bufferasbuh1hhj^ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj^ubj)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubj)}(h off_t skiph](h)}(hhh]j)}(hoff_th]hoff_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j,c.sg_pcopy_to_bufferasbuh1hhjubj)}(h h]h }(hj˛hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hskiph]hskip}(hjٛhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj1hM ubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjhhhj1hM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j`hj1hM hjhhubj)}(hhh]h)}(h'Copy from an SG list to a linear bufferh]h'Copy from an SG list to a linear buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj1hM ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(hX***Parameters** ``struct scatterlist *sgl`` The SG list ``unsigned int nents`` Number of SG entries ``void *buf`` Where to copy to ``size_t buflen`` The number of bytes to copy ``off_t skip`` Number of bytes to skip before copying **Description** Returns the number of copied bytes.h](h)}(h**Parameters**h]j+)}(hj%h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj#ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjubjA)}(hhh](jF)}(h(``struct scatterlist *sgl`` The SG list h](jL)}(h``struct scatterlist *sgl``h]j)}(hjDh]hstruct scatterlist *sgl}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hj>ubjf)}(hhh]h)}(h The SG listh]h The SG list}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhM hjZubah}(h]h ]h"]h$]h&]uh1jehj>ubeh}(h]h ]h"]h$]h&]uh1jEhjYhM hj;ubjF)}(h,``unsigned int nents`` Number of SG entries h](jL)}(h``unsigned int nents``h]j)}(hj}h]hunsigned int nents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjwubjf)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jehjwubeh}(h]h ]h"]h$]h&]uh1jEhjhM hj;ubjF)}(h``void *buf`` Where to copy to h](jL)}(h ``void *buf``h]j)}(hjh]h void *buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjubjf)}(hhh]h)}(hWhere to copy toh]hWhere to copy to}(hjϜhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj˜hM hj̜ubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhj˜hM hj;ubjF)}(h.``size_t buflen`` The number of bytes to copy h](jL)}(h``size_t buflen``h]j)}(hjh]h size_t buflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjubjf)}(hhh]h)}(hThe number of bytes to copyh]hThe number of bytes to copy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhM hj;ubjF)}(h6``off_t skip`` Number of bytes to skip before copying h](jL)}(h``off_t skip``h]j)}(hj(h]h off_t skip}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj"ubjf)}(hhh]h)}(h&Number of bytes to skip before copyingh]h&Number of bytes to skip before copying}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hMhj>ubah}(h]h ]h"]h$]h&]uh1jehj"ubeh}(h]h ]h"]h$]h&]uh1jEhj=hMhj;ubeh}(h]h ]h"]h$]h&]uh1j@hjubh)}(h**Description**h]j+)}(hjch]h Description}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjaubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubh)}(h#Returns the number of copied bytes.h]h#Returns the number of copied bytes.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWsg_zero_buffer (C function)c.sg_zero_bufferhNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(h^size_t sg_zero_buffer (struct scatterlist *sgl, unsigned int nents, size_t buflen, off_t skip)h]jg)}(h]size_t sg_zero_buffer(struct scatterlist *sgl, unsigned int nents, size_t buflen, off_t skip)h](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jsg_zero_buffersbc.sg_zero_bufferasbuh1hhjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hj͝hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjhhhj̝hMubj)}(hsg_zero_bufferh]j)}(hjɝh]hsg_zero_buffer}(hjߝhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj۝ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhj̝hMubj)}(hH(struct scatterlist *sgl, unsigned int nents, size_t buflen, off_t skip)h](j)}(hstruct scatterlist *sglh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jǝc.sg_zero_bufferasbuh1hhjubj)}(h h]h }(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsglh]hsgl}(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int nentsh](j")}(hunsignedh]hunsigned}(hjjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjfubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjfubj")}(hinth]hint}(hjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjfubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjfubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jǝc.sg_zero_bufferasbuh1hhjubj)}(h h]h }(hjܞhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h off_t skiph](h)}(hhh]j)}(hoff_th]hoff_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jǝc.sg_zero_bufferasbuh1hhjubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hskiph]hskip}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj̝hMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjhhhj̝hMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j`hj̝hMhjhhubj)}(hhh]h)}(hZero-out a part of a SG listh]hZero-out a part of a SG list}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjYhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj̝hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjtjjtjjjuh1j[hhhj"hNhNubj!)}(hX **Parameters** ``struct scatterlist *sgl`` The SG list ``unsigned int nents`` Number of SG entries ``size_t buflen`` The number of bytes to zero out ``off_t skip`` Number of bytes to skip before zeroing **Description** Returns the number of bytes zeroed.h](h)}(h**Parameters**h]j+)}(hj~h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj|ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjxubjA)}(hhh](jF)}(h(``struct scatterlist *sgl`` The SG list h](jL)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjf)}(hhh]h)}(h The SG listh]h The SG list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubjF)}(h,``unsigned int nents`` Number of SG entries h](jL)}(h``unsigned int nents``h]j)}(hj֟h]hunsigned int nents}(hj؟hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjԟubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjПubjf)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jehjПubeh}(h]h ]h"]h$]h&]uh1jEhjhMhjubjF)}(h2``size_t buflen`` The number of bytes to zero out h](jL)}(h``size_t buflen``h]j)}(hjh]h size_t buflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj ubjf)}(hhh]h)}(hThe number of bytes to zero outh]hThe number of bytes to zero out}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj%ubah}(h]h ]h"]h$]h&]uh1jehj ubeh}(h]h ]h"]h$]h&]uh1jEhj$hMhjubjF)}(h6``off_t skip`` Number of bytes to skip before zeroing h](jL)}(h``off_t skip``h]j)}(hjHh]h off_t skip}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjBubjf)}(hhh]h)}(h&Number of bytes to skip before zeroingh]h&Number of bytes to skip before zeroing}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hMhj^ubah}(h]h ]h"]h$]h&]uh1jehjBubeh}(h]h ]h"]h$]h&]uh1jEhj]hMhjubeh}(h]h ]h"]h$]h&]uh1j@hjxubh)}(h**Description**h]j+)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM!hjxubh)}(h#Returns the number of bytes zeroed.h]h#Returns the number of bytes zeroed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjxubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubjK)}(hhh]h}(h]h ]h"]h$]h&]entries](jWextract_iter_to_sg (C function)c.extract_iter_to_sghNtauh1jJhj"hhhNhNubj\)}(hhh](ja)}(hssize_t extract_iter_to_sg (struct iov_iter *iter, size_t maxsize, struct sg_table *sgtable, unsigned int sg_max, iov_iter_extraction_t extraction_flags)h]jg)}(hssize_t extract_iter_to_sg(struct iov_iter *iter, size_t maxsize, struct sg_table *sgtable, unsigned int sg_max, iov_iter_extraction_t extraction_flags)h](h)}(hhh]j)}(hssize_th]hssize_t}(hjˠhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjȠubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj͠modnameN classnameNjj)}j]j)}jextract_iter_to_sgsbc.extract_iter_to_sgasbuh1hhjĠhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjĠhhhjhMMubj)}(hextract_iter_to_sgh]j)}(hjh]hextract_iter_to_sg}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjĠhhhjhMMubj)}(h~(struct iov_iter *iter, size_t maxsize, struct sg_table *sgtable, unsigned int sg_max, iov_iter_extraction_t extraction_flags)h](j)}(hstruct iov_iter *iterh](jm)}(hjph]hstruct}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubh)}(hhh]j)}(hiov_iterh]hiov_iter}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj:modnameN classnameNjj)}j]jc.extract_iter_to_sgasbuh1hhjubj)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hjh]h*}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hiterh]hiter}(hjqhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsize_t maxsizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.extract_iter_to_sgasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hmaxsizeh]hmaxsize}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct sg_table *sgtableh](jm)}(hjph]hstruct}(hjҡhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjΡubj)}(h h]h }(hjߡhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjΡubh)}(hhh]j)}(hsg_tableh]hsg_table}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.extract_iter_to_sgasbuh1hhjΡubj)}(h h7]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjΡubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjΡubj)}(hsgtableh]hsgtable}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjΡubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int sg_maxh](j")}(hunsignedh]hunsigned}(hjBhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj>ubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj>ubj")}(hinth]hint}(hj^hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj>ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hj>ubj)}(hsg_maxh]hsg_max}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h&iov_iter_extraction_t extraction_flagsh](h)}(hhh]j)}(hiov_iter_extraction_th]hiov_iter_extraction_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.extract_iter_to_sgasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j~hjubj)}(hextraction_flagsh]hextraction_flags}(hj¢hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjĠhhhjhMMubeh}(h]h ]h"]h$]h&]jjjuh1jfjjhjhhhjhMMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j`hjhMMhjhhubj)}(hhh]h)}(h3Extract pages from an iterator and add to an sglisth]h3Extract pages from an iterator and add to an sglist}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1j[hhhj"hNhNubj!)}(hX**Parameters** ``struct iov_iter *iter`` The iterator to extract from ``size_t maxsize`` The amount of iterator to copy ``struct sg_table *sgtable`` The scatterlist table to fill in ``unsigned int sg_max`` Maximum number of elements in **sgtable** that may be filled ``iov_iter_extraction_t extraction_flags`` Flags to qualify the request **Description** Extract the page fragments from the given amount of the source iterator and add them to a scatterlist that refers to all of those bits, to a maximum addition of **sg_max** elements. The pages referred to by UBUF- and IOVEC-type iterators are extracted and pinned; BVEC-, KVEC-, FOLIOQ- and XARRAY-type are extracted but aren't pinned; DISCARD-type is not supported. No end mark is placed on the scatterlist; that's left to the caller. **extraction_flags** can have ITER_ALLOW_P2PDMA set to request peer-to-peer DMA be allowed on the pages extracted. If successful, **sgtable->nents** is updated to include the number of elements added and the number of bytes added is returned. **sgtable->orig_nents** is left unaltered. The iov_iter_extract_mode() function should be used to query how cleanup should be performed.h](h)}(h**Parameters**h]j+)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hj ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMQhjubjA)}(hhh](jF)}(h7``struct iov_iter *iter`` The iterator to extract from h](jL)}(h``struct iov_iter *iter``h]j)}(hj-h]hstruct iov_iter *iter}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMNhj'ubjf)}(hhh]h)}(hThe iterator to extract fromh]hThe iterator to extract from}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMNhjCubah}(h]h ]h"]h$]h&]uh1jehj'ubeh}(h]h ]h"]h$]h&]uh1jEhjBhMNhj$ubjF)}(h2``size_t maxsize`` The amount of iterator to copy h](jL)}(h``size_t maxsize``h]j)}(hjfh]hsize_t maxsize}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMOhj`ubjf)}(hhh]h)}(hThe amount of iterator to copyh]hThe amount of iterator to copy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hMOhj|ubah}(h]h ]h"]h$]h&]uh1jehj`ubeh}(h]h ]h"]h$]h&]uh1jEhj{hMOhj$ubjF)}(h>``struct sg_table *sgtable`` The scatterlist table to fill in h](jL)}(h``struct sg_table *sgtable``h]j)}(hjh]hstruct sg_table *sgtable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMPhjubjf)}(hhh]h)}(h The scatterlist table to fill inh]h The scatterlist table to fill in}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMPhjubah}(h]h ]h"]h$]h&]uh1jehjubeh}(h]h ]h"]h$]h&]uh1jEhjhMPhj$ubjF)}(hU``unsigned int sg_max`` Maximum number of elements in **sgtable** that may be filled h](jL)}(h``unsigned int sg_max``h]j)}(hjأh]hunsigned int sg_max}(hjڣhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj֣ubah}(h]h ]h"]h$]h&]uh1jKhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMQhjңubjf)}(hhh]h)}(hnents** is updated to include the number of elements added and the number of bytes added is returned. **sgtable->orig_nents** is left unaltered.h](hIf successful, }(hjФhhhNhNubj+)}(h**sgtable->nents**h]hsgtable->nents}(hjؤhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjФubh` is updated to include the number of elements added and the number of bytes added is returned. }(hjФhhhNhNubj+)}(h**sgtable->orig_nents**h]hsgtable->orig_nents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j*hjФubh is left unaltered.}(hjФhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM`hjubh)}(h]The iov_iter_extract_mode() function should be used to query how cleanup should be performed.h]h]The iov_iter_extract_mode() function should be used to query how cleanup should be performed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMdhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hj"hhhNhNubeh}(h]functions-and-structuresah ]h"]functions and structuresah$]h&]uh1hhjhhhhhMaubeh}(h])part-iii-debug-drivers-use-of-the-dma-apiah ]h"]+part iii - debug drivers use of the dma apiah$]h&]uh1hhhhhhhhMubeh}(h],dynamic-dma-mapping-using-the-generic-deviceah ]h"],dynamic dma mapping using the generic deviceah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksj}footnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjSerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j.j+j]jZjjj[jXjjj%j"jxjujjj&j#jju nametypes}(j.j]jj[jj%jxjj&juh}(j+hjZj+jj`jXjjYjbjbjgj j j j j6j;jDjIjjjj^j"jjuj(jj{j#jjj"j"j"j$j$j&j&j*j *jQ-jV-j/j/j2j2j84j=4j5j5jM7jR7j8j8jb:jg:j;j;jw=j|=j?j?j@j@jBjBjGjGjHjHjJj"JjKjKjMjMjOj OjPjPjRjRj*Tj/TjVjVjXjXjO[jT[j_j_jt`jy`jajaj`gjegjjj jjojoj'uj,ujyjyj{j{j~j~jIjNjjj%j*j؇j݇jj!jjjjj0j5jJjOjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.