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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/pt_BR/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.}(hj#hhhNhNubah}(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.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hPart I - DMA APIh]hPart I - DMA API}(hjBhhhNhNubah}(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.}(hjPhhhNhNubah}(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.}(hj^hhhNhNubah}(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}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthhhhhKubh 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)}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK hjthhubh)}(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$hjthhubh)}(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*hjthhubh)}(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,hjthhubh)}(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/hjthhubh)}(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&]uh1hhhhK3hjthhubh)}(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&]uh1hhhhK8hjthhubj)}(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&]jjuh1jhhhK>hjthhubh)}(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().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjthhubh)}(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&]uh1hhhhKFhjthhubeh}(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}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hhhhhKKubh)}(hDTo get this part of the DMA API, you must #include h]hDTo get this part of the DMA API, you must #include }(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhj1hhubh)}(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.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhj1hhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](single!dma_pool_create_node (C function)c.dma_pool_create_nodehNtauh1j^hj1hhhNhNubhdesc)}(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}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhj|hhhM/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&]uh1jhj|hhhjhKubh)}(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_nodeasbuh1hhj|hhhjhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|hhhjhKubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhj|hhhjhKubh 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&]jjuh1jhj|hhhjhKubhdesc_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](j)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubhdesc_sig_keyword_type)}(hcharh]hchar}(hj7hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j5hjubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnameh]hname}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct device *devh](j)}(hjh]hstruct}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubh)}(hhh]j)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.dma_pool_create_nodeasbuh1hhjvubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hdevh]hdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubeh}(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 }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(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}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj7modnameN classnameNjj)}j]jc.dma_pool_create_nodeasbuh1hhj.ubj)}(h h]h }(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(halignh]halign}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsize_t boundaryh](h)}(hhh]j)}(hsize_th]hsize_t}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.dma_pool_create_nodeasbuh1hhjvubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hboundaryh]hboundary}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint nodeh](j6)}(hinth]hint}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnodeh]hnode}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1j hj|hhhjhKubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1jzsphinx_line_type declaratorhjvhhhjhKubah}(h]jmah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jthjhKhjqhhubh 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&]uh1j hjqhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypej*desctypej*noindex noindexentrynocontentsentryuh1johhhj1hNhNubh 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.chKhj6ubhdefinition_list)}(hhh](hdefinition_list_item)}(h3``const char *name`` name of pool, for diagnostics h](hterm)}(h``const char *name``h]j)}(hjch]hconst char *name}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj[ubh definition)}(hhh]h)}(hname of pool, for diagnosticsh]hname of pool, for diagnostics}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhKhj{ubah}(h]h ]h"]h$]h&]uh1jyhj[ubeh}(h]h ]h"]h$]h&]uh1jYhjxhKhjVubjZ)}(h9``struct device *dev`` device that will be doing the DMA h](j`)}(h``struct device *dev``h]j)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhKhjVubjZ)}(h1``size_t size`` size of the blocks in this pool. h](j`)}(h``size_t size``h]j)}(hjh]h size_t size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhKhjVubjZ)}(hJ``size_t align`` alignment requirement for blocks; must be a power of two h](j`)}(h``size_t align``h]j)}(hjh]h size_t align}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj ubjz)}(hhh]h)}(h8alignment requirement for blocks; must be a power of twoh]h8alignment requirement for blocks; must be a power of two}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj%hKhj&ubah}(h]h ]h"]h$]h&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jYhj%hKhjVubjZ)}(hK``size_t boundary`` returned blocks won't cross this power of two boundary h](j`)}(h``size_t boundary``h]j)}(hjIh]hsize_t boundary}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhjCubjz)}(hhh]h)}(h6returned blocks won't cross this power of two boundaryh]h8returned blocks won’t cross this power of two boundary}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hKhj_ubah}(h]h ]h"]h$]h&]uh1jyhjCubeh}(h]h ]h"]h$]h&]uh1jYhj^hKhjVubjZ)}(hQ``int node`` optional NUMA node to allocate structs 'dma_pool' and 'dma_page' on h](j`)}(h ``int node``h]j)}(hjh]hint node}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj|ubjz)}(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&]uh1jyhj|ubeh}(h]h ]h"]h$]h&]uh1jYhjhKhjVubeh}(h]h ]h"]h$]h&]uh1jThj6ubh)}(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.chKhj6ubh)}(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.chKhj6ubh)}(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.chKhj6ubh)}(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.chKhj6ubh)}(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 }(hj hhhNhNubj?)}(h **boundary**h]hboundary}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj ubh 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.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj6ubh)}(h **Return**h]j?)}(hj,h]hReturn}(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.chKhj6ubh)}(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 }(hjBhhhNhNubj)}(h``NULL``h]hNULL}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh if one can’t be created.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chKhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj1hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkdma_pool_destroy (C function)c.dma_pool_destroyhNtauh1j^hj1hhhNhNubjp)}(hhh](ju)}(h-void dma_pool_destroy (struct dma_pool *pool)h]j{)}(h,void dma_pool_destroy(struct dma_pool *pool)h](j6)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjhhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMdubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMdubj)}(hdma_pool_destroyh]j)}(hdma_pool_destroyh]hdma_pool_destroy}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]h$]h&]jjuh1jhjhhhjhMdubj)}(h(struct dma_pool *pool)h]j)}(hstruct dma_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(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&]uh1jhjubj)}(hjh]h*}(hj hhhNhNubah}(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&]jjuh1j hjhhhjhMdubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj{hhhjhMdubah}(h]jvah ](jjeh"]h$]h&]j j )j huh1jthjhMdhjxhhubj)}(hhh]h)}(h%destroys a pool of dma memory blocks.h]h%destroys a pool of dma memory blocks.}(hjChhhNhNubah}(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&]uh1j hjxhhhjhMdubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j[j0j[j1j2j3uh1johhhj1hNhNubj5)}(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?)}(hjeh]h Parameters}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjcubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhhj_ubjU)}(hhh]jZ)}(h:``struct dma_pool *pool`` dma pool that will be destroyed h](j`)}(h``struct dma_pool *pool``h]j)}(hjh]hstruct dma_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMehj~ubjz)}(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&]uh1jyhj~ubeh}(h]h ]h"]h$]h&]uh1jYhjhMehj{ubah}(h]h ]h"]h$]h&]uh1jThj_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.chMghj_ubh)}(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.chMfhj_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.chMhhj_ubh)}(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.chMghj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj1hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkdma_pool_alloc (C function)c.dma_pool_allochNtauh1j^hj1hhhNhNubjp)}(hhh](ju)}(hRvoid * dma_pool_alloc (struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h]j{)}(hPvoid *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h](j6)}(hvoidh]hvoid}(hj+ hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj' 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&]uh1jhj' hhhj9 hMubj)}(hjh]h*}(hjH hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj' hhhj9 hMubj)}(hdma_pool_alloch]j)}(hdma_pool_alloch]hdma_pool_alloc}(hjY hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj' hhhj9 hMubj)}(h<(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h](j)}(hstruct dma_pool *poolh](j)}(hjh]hstruct}(hju hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq 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_allocasbuh1hhjq ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq ubj)}(hpoolh]hpool}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjm 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&]uh1jhj ubj)}(h mem_flagsh]h mem_flags}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjm ubj)}(hdma_addr_t *handleh](h)}(hhh]j)}(h dma_addr_th]h dma_addr_t}(hj2 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj4 modnameN classnameNjj)}j]j c.dma_pool_allocasbuh1hhj+ ubj)}(h h]h }(hjP hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ ubj)}(hjh]h*}(hj^ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ ubj)}(hhandleh]hhandle}(hjk hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjm ubeh}(h]h ]h"]h$]h&]jjuh1j hj' hhhj9 hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj# hhhj9 hMubah}(h]j ah ](jjeh"]h$]h&]j j )j huh1jthj9 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&]uh1j hj hhhj9 hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j j0j j1j2j3uh1johhhj1hNhNubj5)}(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 ubjU)}(hhh](jZ)}(h?``struct dma_pool *pool`` dma pool that will produce the block h](j`)}(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&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjz)}(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&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jYhj hMhj ubjZ)}(h"``gfp_t mem_flags`` GFP_* bitmask h](j`)}(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&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjz)}(hhh]h)}(h GFP_* bitmaskh]h GFP_* bitmask}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ hMhj% ubah}(h]h ]h"]h$]h&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jYhj$ hMhj ubjZ)}(h7``dma_addr_t *handle`` pointer to dma address of block h](j`)}(h``dma_addr_t *handle``h]j)}(hjH h]hdma_addr_t *handle}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF ubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjB ubjz)}(hhh]h)}(hpointer to dma address of blockh]hpointer to dma address of block}(hja hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj] hMhj^ ubah}(h]h ]h"]h$]h&]uh1jyhjB ubeh}(h]h ]h"]h$]h&]uh1jYhj] hMhj ubeh}(h]h ]h"]h$]h&]uh1jThj ubh)}(h **Return**h]j?)}(hj h]hReturn}(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 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&]uh1j4hj1hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkdma_pool_free (C function)c.dma_pool_freehNtauh1j^hj1hhhNhNubjp)}(hhh](ju)}(hGvoid dma_pool_free (struct dma_pool *pool, void *vaddr, dma_addr_t dma)h]j{)}(hFvoid dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)h](j6)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj 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&]uh1jhj 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 ](jj eh"]h$]h&]jjuh1jhj hhhj hMubj)}(h4(struct dma_pool *pool, void *vaddr, dma_addr_t dma)h](j)}(hstruct dma_pool *poolh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(h h]h }(hj$ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hj5 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2 ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj7 modnameN classnameNjj)}j]j)}jj sbc.dma_pool_freeasbuh1hhj ubj)}(h h]h }(hjU hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hjh]h*}(hjc hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hpoolh]hpool}(hjp hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h void *vaddrh](j6)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hvaddrh]hvaddr}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 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]jQ c.dma_pool_freeasbuh1hhj ubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hdmah]hdma}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1j hj hhhj hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj hhhj hMubah}(h]j ah ](jjeh"]h$]h&]j j )j huh1jthj 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&]uh1j hj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j< j0j< j1j2j3uh1johhhj1hNhNubj5)}(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?)}(hjF h]h Parameters}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjD ubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj@ ubjU)}(hhh](jZ)}(h9``struct dma_pool *pool`` the dma pool holding the block h](j`)}(h``struct dma_pool *pool``h]j)}(hje h]hstruct dma_pool *pool}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjc ubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj_ ubjz)}(hhh]h)}(hthe dma pool holding the blockh]hthe dma pool holding the block}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjz hMhj{ ubah}(h]h ]h"]h$]h&]uh1jyhj_ ubeh}(h]h ]h"]h$]h&]uh1jYhjz hMhj\ ubjZ)}(h)``void *vaddr`` virtual address of block h](j`)}(h``void *vaddr``h]j)}(hj h]h void *vaddr}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjz)}(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&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jYhj hMhj\ ubjZ)}(h(``dma_addr_t dma`` dma address of block h](j`)}(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&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj ubjz)}(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&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jYhj hMhj\ ubeh}(h]h ]h"]h$]h&]uh1jThj@ 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)}(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.}(hj(hhhNhNubah}(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&]uh1j4hj1hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkdmam_pool_create (C function)c.dmam_pool_createhNtauh1j^hj1hhhNhNubjp)}(hhh](ju)}(hwstruct dma_pool * dmam_pool_create (const char *name, struct device *dev, size_t size, size_t align, size_t allocation)h]j{)}(hustruct dma_pool *dmam_pool_create(const char *name, struct device *dev, size_t size, size_t align, size_t allocation)h](j)}(hjh]hstruct}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhjdhMubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjxmodnameN classnameNjj)}j]j)}jdmam_pool_createsbc.dmam_pool_createasbuh1hhjShhhjdhMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhjdhMubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjShhhjdhMubj)}(hdmam_pool_createh]j)}(hjh]hdmam_pool_create}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]h$]h&]jjuh1jhjShhhjdhMubj)}(hT(const char *name, struct device *dev, size_t size, size_t align, size_t allocation)h](j)}(hconst char *nameh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(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](j)}(hjh]hstruct}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(h h]h }(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubh)}(hhh]j)}(hdeviceh]hdevice}(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjNmodnameN classnameNjj)}j]jc.dmam_pool_createasbuh1hhj*ubj)}(h h]h }(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(hjh]h*}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(hdevh]hdev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(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.dmam_pool_createasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(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]jc.dmam_pool_createasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(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}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3modnameN classnameNjj)}j]jc.dmam_pool_createasbuh1hhj*ubj)}(h h]h }(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(h allocationh]h allocation}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1j hjShhhjdhMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjOhhhjdhMubah}(h]jJah ](jjeh"]h$]h&]j j )j huh1jthjdhMhjLhhubj)}(hhh]h)}(hManaged dma_pool_create()h]hManaged dma_pool_create()}(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&]uh1j hjLhhhjdhMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jj0jj1j2j3uh1johhhj1hNhNubj5)}(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.chMhjubjU)}(hhh](jZ)}(h3``const char *name`` name of pool, for diagnostics h](j`)}(h``const char *name``h]j)}(hjh]hconst char *name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubjz)}(hhh]h)}(hname of pool, for diagnosticsh]hname of pool, for diagnostics}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(h9``struct device *dev`` device that will be doing the DMA h](j`)}(h``struct device *dev``h]j)}(hjh]hstruct device *dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(h1``size_t size`` size of the blocks in this pool. h](j`)}(h``size_t size``h]j)}(hj:h]h size_t size}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj4ubjz)}(hhh]h)}(h size of the blocks in this pool.h]h size of the blocks in this pool.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjPubah}(h]h ]h"]h$]h&]uh1jyhj4ubeh}(h]h ]h"]h$]h&]uh1jYhjOhMhjubjZ)}(hJ``size_t align`` alignment requirement for blocks; must be a power of two h](j`)}(h``size_t align``h]j)}(hjsh]h size_t align}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjmubjz)}(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&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjmubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(hJ``size_t allocation`` returned blocks won't cross this boundary (or zero) h](j`)}(h``size_t allocation``h]j)}(hjh]hsize_t allocation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubeh}(h]h ]h"]h$]h&]uh1jThjubh)}(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>hj ubah}(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 }(hj$hhhNhNubj)}(h``NULL``h]hNULL}(hj,hhhNhNubah}(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.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj1hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkdmam_pool_destroy (C function)c.dmam_pool_destroyhNtauh1j^hj1hhhNhNubjp)}(hhh](ju)}(h.void dmam_pool_destroy (struct dma_pool *pool)h]j{)}(h-void dmam_pool_destroy(struct dma_pool *pool)h](j6)}(hvoidh]hvoid}(hjehhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjahhhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjahhhjshMubj)}(hdmam_pool_destroyh]j)}(hdmam_pool_destroyh]hdmam_pool_destroy}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]h$]h&]jjuh1jhjahhhjshMubj)}(h(struct dma_pool *pool)h]j)}(hstruct dma_pool *poolh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.dmam_pool_destroyasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(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&]jjuh1j hjahhhjshMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj]hhhjshMubah}(h]jXah ](jjeh"]h$]h&]j j )j huh1jthjshMhjZhhubj)}(hhh]h)}(hManaged dma_pool_destroy()h]hManaged dma_pool_destroy()}(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&]uh1j hjZhhhjshMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j=j0j=j1j2j3uh1johhhj1hNhNubj5)}(hy**Parameters** ``struct dma_pool *pool`` dma pool that will be destroyed **Description** Managed dma_pool_destroy().h](h)}(h**Parameters**h]j?)}(hjGh]h Parameters}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjEubah}(h]h ]h"]h$]h&]uh1hhM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhjAubjU)}(hhh]jZ)}(h:``struct dma_pool *pool`` dma pool that will be destroyed h](j`)}(h``struct dma_pool *pool``h]j)}(hjfh]hstruct dma_pool *pool}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1j_hM/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:86: ./mm/dmapool.chMhj`ubjz)}(hhh]h)}(hdma pool that will be destroyedh]hdma pool that will be destroyed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hMhj|ubah}(h]h ]h"]h$]h&]uh1jyhj`ubeh}(h]h ]h"]h$]h&]uh1jYhj{hMhj]ubah}(h]h ]h"]h$]h&]uh1jThjAubh)}(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.chMhjAubh)}(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.chMhjAubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj1hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkdma_pool_zalloc (C function)c.dma_pool_zallochNtauh1j^hj1hhhNhNubjp)}(hhh](ju)}(hSvoid * dma_pool_zalloc (struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h]j{)}(hQvoid *dma_pool_zalloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h](j6)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjhhhX/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&]uh1jhjhhhjhK@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 ](jj eh"]h$]h&]jjuh1jhjhhhjhK@ubj)}(h<(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)h](j)}(hstruct dma_pool *poolh](j)}(hjh]hstruct}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubh)}(hhh]j)}(hdma_poolh]hdma_pool}(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjPmodnameN classnameNjj)}j]j)}jjsbc.dma_pool_zallocasbuh1hhj,ubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(hjh]h*}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubj)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj(ubj)}(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]jjc.dma_pool_zallocasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h mem_flagsh]h mem_flags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj(ubj)}(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]jjc.dma_pool_zallocasbuh1hhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hhandleh]hhandle}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj(ubeh}(h]h ]h"]h$]h&]jjuh1j hjhhhjhK@ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjhhhjhK@ubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jthjhK@hjhhubj)}(hhh]h)}(h4Get a zero-initialized block of DMA coherent memory.h]h4Get a zero-initialized block of DMA coherent memory.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhK@hjMhhubah}(h]h ]h"]h$]h&]uh1j hjhhhjhK@ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jhj0jhj1j2j3uh1johhhj1hNhNubj5)}(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?)}(hjrh]h Parameters}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjpubah}(h]h ]h"]h$]h&]uh1hhX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKDhjlubjU)}(hhh](jZ)}(h?``struct dma_pool *pool`` dma pool that will produce the block h](j`)}(h``struct dma_pool *pool``h]j)}(hjh]hstruct dma_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKAhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhKAhjubjZ)}(h"``gfp_t mem_flags`` GFP_* bitmask h](j`)}(h``gfp_t mem_flags``h]j)}(hjh]hgfp_t mem_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKBhjubjz)}(hhh]h)}(h GFP_* bitmaskh]h GFP_* bitmask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKBhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhKBhjubjZ)}(h7``dma_addr_t *handle`` pointer to dma address of block h](j`)}(h``dma_addr_t *handle``h]j)}(hjh]hdma_addr_t *handle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hX/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:89: ./include/linux/dmapool.hhKChjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhKChjubeh}(h]h ]h"]h$]h&]uh1jThjlubh)}(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.hhKEhjlubh)}(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 refdomainj reftypedoc 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.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(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&]jjuh1jhhhKhjhhubh)}(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.}(hjKhhhNhNubah}(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:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jqhjnubjr)}(hhh]h}(h]h ]h"]h$]h&]colwidthK-uh1jqhjnubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hDMA_NONEh]hDMA_NONE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h DMA_TO_DEVICEh]h DMA_TO_DEVICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hDMA_FROM_DEVICEh]hDMA_FROM_DEVICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hDMA_BIDIRECTIONALh]hDMA_BIDIRECTIONAL}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(hhh]h)}(hdirection isn't knownh]hdirection isn’t known}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjnubeh}(h]h ]h"]h$]h&]colsKuh1jlhjiubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubj)}(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).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(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&]uh1jhjhhhhhNubj)}(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&]jjuh1jhhhMhjhhubh)}(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&]uh1hhhhMhjhhubj)}(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&]jjuh1jhhhMhjhhubh)}(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 hjhhubj)}(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&]jjuh1jhhhM(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&]uh1hhhhM0hjhhubj)}(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)}hj/sbah}(h]h ]h"]h$]h&]jjuh1jhhhM6hjhhubh)}(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&]uh1hhhhM9hjhhubj)}(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)}hjKsbah}(h]h ]h"]h$]h&]jjuh1jhhhMAhjhhubh)}(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).}(hjYhhhNhNubah}(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.}(hjghhhNhNubah}(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.}(hjuhhhNhNubah}(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&]uh1hhhhMchjhhubj)}(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&]jjuh1jhhhMihjhhubh)}(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&]uh1hhhhMqhjhhubj)}(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&]jjuh1jhhhMvhjhhubh)}(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:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubh 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:hj7ubj;)}(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}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjTubah}(h]h ]h"]h$]h&]uh1j:hj7ubj;)}(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 }(hjphhhNhNubj)}(h*and*h]hand}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubhF after handing memory to the device if the memory is DMA_BIDIRECTIONAL}(hjphhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjlubah}(h]h ]h"]h$]h&]uh1j:hj7ubeh}(h]h ]h"]h$]h&]bullet-uh1j5hhhMhj#ubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hSee also dma_map_single().h]hSee also dma_map_single().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(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&]jjuh1jhhhMhjhhubh)}(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&]uh1hhhhMhjhhubj)}(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); ....}hj sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubh)}(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&]uh1hhhhMhjhhubj)}(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 */ .... }}hj&sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubeh}(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.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubj)}(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);}hj[sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj<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 }(hjihhhNhNubj)}(h``struct dma_iova_state``h]hstruct dma_iova_state}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubhE is allocated by the driver and must be kept around until unmap time.}(hjihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubj)}(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)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj<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<hhubj)}(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&]jjuh1jhhhMhj<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<hhubj)}(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&]jjuh1jhhhMhj<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<hhubj)}(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&]jjuh1jhhhMhj<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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubj)}(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);}hj+sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhj<hhubh)}(h/is used to unmap a range previously mapped, andh]h/is used to unmap a range previously mapped, and}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<hhubj)}(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);}hjGsbah}(h]h ]h"]h$]h&]jjuh1jhhhM!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 }(hjUhhhNhNubj)}(h``dma_iova_unlink()``h]hdma_iova_unlink()}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubh before calling }(hjUhhhNhNubj)}(h``dma_iova_free()``h]hdma_iova_free()}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubh.}(hjUhhhNhNubeh}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM'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)hjhhubh)}(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-hjhhubj)}(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&]jjuh1jhhhM2hjhhubh)}(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&]uh1hhhhM6hjhhubh)}(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;hjhhubh)}(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?hjhhubh)}(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&]uh1hhhhMBhjhhubh)}(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&]uh1hhhhMFhjhhubj)}(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)}hj"sbah}(h]h ]h"]h$]h&]jjuh1jhhhMMhjhhubh)}(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().}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjhhubj)}(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&]jjuh1jhhhMWhjhhubh)}(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().}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjhhubj)}(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)}hjZsbah}(h]h ]h"]h$]h&]jjuh1jhhhMahjhhubh)}(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.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjhhubj)}(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)}hjvsbah}(h]h ]h"]h$]h&]jjuh1jhhhMkhjhhubh)}(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().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjhhubj)}(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);}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMvhjhhubh)}(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{hjhhubh)}(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&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubj)}(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&]jjuh1jhhhMhjhhubh)}(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&]uh1hhhhMhjhhubj)}(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)}hj"sbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubh)}(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().}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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&]uh1hhhhMhjhhubj)}(h>void dma_vunmap_noncontiguous(struct device *dev, void *vaddr)h]h>void dma_vunmap_noncontiguous(struct device *dev, void *vaddr)}hjLsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubh)}(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().}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(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)}hjhsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubh)}(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().}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(h!int dma_get_cache_alignment(void)h]h!int dma_get_cache_alignment(void)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhMhjhhubh)}(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 }(hjhhhNhNubj)}(h*and*h]hand}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhQ width that you must observe when either mapping memory or doing partial flushes.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(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&]uh1jhjhhhhhNubeh}(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.}(hj hhhNhNubah}(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:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj)}(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_phys+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_phys+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&]jjuh1jhhhMhjhhubh)}(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:}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjh)}(hhh]jm)}(hhh](jr)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jqhjZ ubjr)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jqhjZ ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hdma-api/all_errorsh]hdma-api/all_errors}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw ubah}(h]h ]h"]h$]h&]uh1jhjt 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&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjt ubeh}(h]h ]h"]h$]h&]uh1jhjq ubj)}(hhh](j)}(hhh]h)}(hdma-api/disabledh]hdma-api/disabled}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhj 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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjq ubj)}(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&]uh1jhj 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&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjq ubj)}(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&]uh1jhj!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.}(hj6!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj3!ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhjq ubj)}(hhh](j)}(hhh]h)}(hdma-api/num_errorsh]hdma-api/num_errors}(hjV!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjS!ubah}(h]h ]h"]h$]h&]uh1jhjP!ubj)}(hhh]h)}(hThe number in this file shows how many warnings will be printed to the kernel log before it stops. This number is initialized to one at system boot and be set by writing into this fileh]hThe number in this file shows how many warnings will be printed to the kernel log before it stops. This number is initialized to one at system boot and be set by writing into this file}(hjm!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjj!ubah}(h]h ]h"]h$]h&]uh1jhjP!ubeh}(h]h ]h"]h$]h&]uh1jhjq ubj)}(hhh](j)}(hhh]h)}(hdma-api/min_free_entriesh]hdma-api/min_free_entries}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(hThis read-only file can be read to get the minimum number of free dma_debug_entries the allocator has ever seen. If this value goes down to zero the code will attempt to increase nr_total_entries to compensate.h]hThis read-only file can be read to get the minimum number of free dma_debug_entries the allocator has ever seen. If this value goes down to zero the code will attempt to increase nr_total_entries to compensate.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhjq ubj)}(hhh](j)}(hhh]h)}(hdma-api/num_free_entriesh]hdma-api/num_free_entries}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(h>The 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&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhjq ubj)}(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&]uh1jhj!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&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhjq ubj)}(hhh](j)}(hhh]h)}(hdma-api/driver_filterh]hdma-api/driver_filter}(hj2"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj/"ubah}(h]h ]h"]h$]h&]uh1jhj,"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.}(hjI"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjF"ubah}(h]h ]h"]h$]h&]uh1jhj,"ubeh}(h]h ]h"]h$]h&]uh1jhjq ubeh}(h]h ]h"]h$]h&]uh1jhjZ ubeh}(h]h ]h"]h$]h&]colsKuh1jlhjW ubah}(h]h ]h"]h$]h&]uh1jghjhhhhhNubh)}(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.}(hjv"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.}(hj"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&]uh1hhhhMGhjhhubj)}(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&]jjuh1jhhhMThjhhubh)}(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_phys() 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_phys() 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"hhhhhMaubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_next (C function) c.sg_nexthNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h5struct scatterlist * sg_next (struct scatterlist *sg)h]j{)}(h3struct scatterlist *sg_next(struct scatterlist *sg)h](j)}(hjh]hstruct}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"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&]uh1jhj"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&]uh1jhj"hhhj"hKbubj)}(hjh]h*}(hj4#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"hhhj"hKbubj)}(hsg_nexth]j)}(hj##h]hsg_next}(hjE#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA#ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj"hhhj"hKbubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj`#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\#ubj)}(h h]h }(hjm#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\#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_nextasbuh1hhj\#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\#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&]noemphjjuh1jhjX#ubah}(h]h ]h"]h$]h&]jjuh1j hj"hhhj"hKbubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj"hhhj"hKbubah}(h]j"ah ](jjeh"]h$]h&]j j )j huh1jthj"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&]uh1j hj"hhhj"hKbubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j#j0j#j1j2j3uh1johhhj"hNhNubj5)}(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#ubjU)}(hhh]jZ)}(h0``struct scatterlist *sg`` The current sg entry h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKchj$ubjz)}(hhh]h)}(hThe current sg entryh]hThe current sg entry}(hj;$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7$hKchj8$ubah}(h]h ]h"]h$]h&]uh1jyhj$ubeh}(h]h ]h"]h$]h&]uh1jYhj7$hKchj$ubah}(h]h ]h"]h$]h&]uh1jThj#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.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 }(hjy$hhhNhNubj?)}(h**sg**h]hsg}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjy$ubhu + 1, but if this sg element is part of a chained scatterlist, it could jump to the start of a new scatterlist array.}(hjy$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKehju$ubah}(h]h ]h"]h$]h&]uh1js$hj$hKehj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_assign_page (C function)c.sg_assign_pagehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h?void sg_assign_page (struct scatterlist *sg, struct page *page)h]j{)}(h>void sg_assign_page(struct scatterlist *sg, struct page *page)h](j6)}(hvoidh]hvoid}(hj$hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj$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&]uh1jhj$hhhj$hKxubj)}(hsg_assign_pageh]j)}(hsg_assign_pageh]hsg_assign_page}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj$hhhj$hKxubj)}(h+(struct scatterlist *sg, struct page *page)h](j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ubj)}(h h]h }(hj %hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$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&]uh1jhj$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](j)}(hjh]hstruct}(hjo%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjk%ubj)}(h h]h }(hj|%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjk%ubh)}(hhh]j)}(hpageh]hpage}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj%modnameN classnameNjj)}j]j7%c.sg_assign_pageasbuh1hhjk%ubj)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjk%ubj)}(hjh]h*}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjk%ubj)}(hpageh]hpage}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjk%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$ubeh}(h]h ]h"]h$]h&]jjuh1j hj$hhhj$hKxubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj$hhhj$hKxubah}(h]j$ah ](jjeh"]h$]h&]j j )j huh1jthj$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&]uh1j hj$hhhj$hKxubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j&j0j&j1j2j3uh1johhhj"hNhNubj5)}(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 &ubjU)}(hhh](jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(h``struct scatterlist *sg``h]j)}(hj1&h]hstruct scatterlist *sg}(hj3&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/&ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKyhj+&ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hjJ&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF&hKyhjG&ubah}(h]h ]h"]h$]h&]uh1jyhj+&ubeh}(h]h ]h"]h$]h&]uh1jYhjF&hKyhj(&ubjZ)}(h``struct page *page`` The page h](j`)}(h``struct page *page``h]j)}(hjj&h]hstruct page *page}(hjl&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh&ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKzhjd&ubjz)}(hhh]h)}(hThe pageh]hThe page}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKzhj&ubah}(h]h ]h"]h$]h&]uh1jyhjd&ubeh}(h]h ]h"]h$]h&]uh1jYhj&hKzhj(&ubeh}(h]h ]h"]h$]h&]uh1jThj &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 &ubjt$)}(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&]uh1js$hj&hK|hj &ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_set_page (C function) c.sg_set_pagehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hcvoid sg_set_page (struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset)h]j{)}(hbvoid sg_set_page(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset)h](j6)}(hvoidh]hvoid}(hj&hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj&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&]uh1jhj&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 ](jj eh"]h$]h&]jjuh1jhj&hhhj'hKubj)}(hR(struct scatterlist *sg, struct page *page, unsigned int len, unsigned int offset)h](j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj1'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-'ubj)}(h h]h }(hj>'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-'ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjO'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjL'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjQ'modnameN classnameNjj)}j]j)}jj'sb c.sg_set_pageasbuh1hhj-'ubj)}(h h]h }(hjo'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-'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)}(hstruct page *pageh](j)}(hjh]hstruct}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubh)}(hhh]j)}(hpageh]hpage}(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj'modnameN classnameNjj)}j]jk' c.sg_set_pageasbuh1hhj'ubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'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](j6)}(hunsignedh]hunsigned}(hj(hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj(ubj)}(h h]h }(hj!(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj6)}(hinth]hint}(hj/(hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj(ubj)}(h h]h }(hj=(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubj)}(hlenh]hlen}(hjK(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj)'ubj)}(hunsigned int offseth](j6)}(hunsignedh]hunsigned}(hjd(hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj`(ubj)}(h h]h }(hjr(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`(ubj6)}(hinth]hint}(hj(hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj`(ubj)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`(ubj)}(hoffseth]hoffset}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`(ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj)'ubeh}(h]h ]h"]h$]h&]jjuh1j hj&hhhj'hKubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj&hhhj'hKubah}(h]j&ah ](jjeh"]h$]h&]j j )j huh1jthj'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&]uh1j hj&hhhj'hKubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j(j0j(j1j2j3uh1johhhj"hNhNubj5)}(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(ubjU)}(hhh](jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj)ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj )hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKhj)ubah}(h]h ]h"]h$]h&]uh1jyhj)ubeh}(h]h ]h"]h$]h&]uh1jYhj)hKhj(ubjZ)}(h``struct page *page`` The page h](j`)}(h``struct page *page``h]j)}(hj@)h]hstruct page *page}(hjB)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>)ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj:)ubjz)}(hhh]h)}(hThe pageh]hThe page}(hjY)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU)hKhjV)ubah}(h]h ]h"]h$]h&]uh1jyhj:)ubeh}(h]h ]h"]h$]h&]uh1jYhjU)hKhj(ubjZ)}(h$``unsigned int len`` Length of data h](j`)}(h``unsigned int len``h]j)}(hjy)h]hunsigned int len}(hj{)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjw)ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhjs)ubjz)}(hhh]h)}(hLength of datah]hLength of data}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKhj)ubah}(h]h ]h"]h$]h&]uh1jyhjs)ubeh}(h]h ]h"]h$]h&]uh1jYhj)hKhj(ubjZ)}(h)``unsigned int offset`` Offset into page h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj)ubjz)}(hhh]h)}(hOffset into pageh]hOffset into page}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKhj)ubah}(h]h ]h"]h$]h&]uh1jyhj)ubeh}(h]h ]h"]h$]h&]uh1jYhj)hKhj(ubeh}(h]h ]h"]h$]h&]uh1jThj(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(ubjt$)}(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&]uh1js$hj*hKhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_set_folio (C function)c.sg_set_foliohNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hZvoid sg_set_folio (struct scatterlist *sg, struct folio *folio, size_t len, size_t offset)h]j{)}(hYvoid sg_set_folio(struct scatterlist *sg, struct folio *folio, size_t len, size_t offset)h](j6)}(hvoidh]hvoid}(hj<*hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj8*hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKubj)}(h h]h }(hjK*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8*hhhjJ*hKubj)}(h sg_set_folioh]j)}(h sg_set_folioh]h sg_set_folio}(hj]*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjY*ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj8*hhhjJ*hKubj)}(hH(struct scatterlist *sg, struct folio *folio, size_t len, size_t offset)h](j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hjy*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju*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_set_folioasbuh1hhju*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju*ubj)}(hjh]h*}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju*ubj)}(hsgh]hsg}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjq*ubj)}(hstruct folio *folioh](j)}(hjh]hstruct}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*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&]uh1jhj*ubj)}(hjh]h*}(hj5+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(hfolioh]hfolio}(hjB+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjq*ubj)}(h size_t lenh](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_folioasbuh1hhjW+ubj)}(h h]h }(hj|+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW+ubj)}(hlenh]hlen}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjq*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&]uh1jhj+ubj)}(hoffseth]hoffset}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjq*ubeh}(h]h ]h"]h$]h&]jjuh1j hj8*hhhjJ*hKubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj4*hhhjJ*hKubah}(h]j/*ah ](jjeh"]h$]h&]j j )j huh1jthjJ*hKhj1*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&]uh1j hj1*hhhjJ*hKubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j,j0j,j1j2j3uh1johhhj"hNhNubj5)}(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,ubjU)}(hhh](jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj7,ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hjV,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjR,hKhjS,ubah}(h]h ]h"]h$]h&]uh1jyhj7,ubeh}(h]h ]h"]h$]h&]uh1jYhjR,hKhj4,ubjZ)}(h"``struct folio *folio`` The folio h](j`)}(h``struct folio *folio``h]j)}(hjv,h]hstruct folio *folio}(hjx,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjt,ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhjp,ubjz)}(hhh]h)}(h The folioh]h The folio}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj,ubah}(h]h ]h"]h$]h&]uh1jyhjp,ubeh}(h]h ]h"]h$]h&]uh1jYhj,hKhj4,ubjZ)}(h``size_t len`` Length of data h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj,ubjz)}(hhh]h)}(hLength of datah]hLength of data}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj,ubah}(h]h ]h"]h$]h&]uh1jyhj,ubeh}(h]h ]h"]h$]h&]uh1jYhj,hKhj4,ubjZ)}(h$``size_t offset`` Offset into folio h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj,ubjz)}(hhh]h)}(hOffset into folioh]hOffset into folio}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj,ubah}(h]h ]h"]h$]h&]uh1jyhj,ubeh}(h]h ]h"]h$]h&]uh1jYhj,hKhj4,ubeh}(h]h ]h"]h$]h&]uh1jThj,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,ubjt$)}(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.hhKhj9-ubah}(h]h ]h"]h$]h&]uh1js$hjK-hKhj,ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_set_buf (C function) c.sg_set_bufhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hNvoid sg_set_buf (struct scatterlist *sg, const void *buf, unsigned int buflen)h]j{)}(hMvoid sg_set_buf(struct scatterlist *sg, const void *buf, unsigned int buflen)h](j6)}(hvoidh]hvoid}(hjr-hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjn-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&]uh1jhjn-hhhj-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 ](jj eh"]h$]h&]jjuh1jhjn-hhhj-hKubj)}(h>(struct scatterlist *sg, const void *buf, unsigned int buflen)h](j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-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&]uh1jhj-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](j)}(hjh]hconst}(hj!.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(h h]h }(hj..hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj6)}(hvoidh]hvoid}(hj<.hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj.ubj)}(h h]h }(hjJ.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(hjh]h*}(hjX.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubj)}(hbufh]hbuf}(hje.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj-ubj)}(hunsigned int buflenh](j6)}(hunsignedh]hunsigned}(hj~.hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjz.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjz.ubj6)}(hinth]hint}(hj.hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjz.ubj)}(h h]h }(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjz.ubj)}(hbuflenh]hbuflen}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjz.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj-ubeh}(h]h ]h"]h$]h&]jjuh1j hjn-hhhj-hKubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjj-hhhj-hKubah}(h]je-ah ](jjeh"]h$]h&]j j )j huh1jthj-hKhjg-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&]uh1j hjg-hhhj-hKubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j.j0j.j1j2j3uh1johhhj"hNhNubj5)}(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.ubjU)}(hhh](jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj/ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj:/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6/hKhj7/ubah}(h]h ]h"]h$]h&]uh1jyhj/ubeh}(h]h ]h"]h$]h&]uh1jYhj6/hKhj/ubjZ)}(h``const void *buf`` Data h](j`)}(h``const void *buf``h]j)}(hjZ/h]hconst void *buf}(hj\/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX/ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhjT/ubjz)}(hhh]h)}(hDatah]hData}(hjs/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo/hKhjp/ubah}(h]h ]h"]h$]h&]uh1jyhjT/ubeh}(h]h ]h"]h$]h&]uh1jYhjo/hKhj/ubjZ)}(h#``unsigned int buflen`` Data lengthh](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj/ubjz)}(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&]uh1jyhj/ubeh}(h]h ]h"]h$]h&]uh1jYhj/hKhj/ubeh}(h]h ]h"]h$]h&]uh1jThj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_chain (C function) c.sg_chainhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hXvoid sg_chain (struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl)h]j{)}(hWvoid sg_chain(struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl)h](j6)}(hvoidh]hvoid}(hj/hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj/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&]uh1jhj/hhhj/hKubj)}(hsg_chainh]j)}(hsg_chainh]hsg_chain}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj 0ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj/hhhj/hKubj)}(hJ(struct scatterlist *prv, unsigned int prv_nents, struct scatterlist *sgl)h](j)}(hstruct scatterlist *prvh](j)}(hjh]hstruct}(hj*0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&0ubj)}(h h]h }(hj70hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&0ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjH0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjE0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjJ0modnameN classnameNjj)}j]j)}jj0sb c.sg_chainasbuh1hhj&0ubj)}(h h]h }(hjh0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&0ubj)}(hjh]h*}(hjv0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&0ubj)}(hprvh]hprv}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"0ubj)}(hunsigned int prv_nentsh](j6)}(hunsignedh]hunsigned}(hj0hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj6)}(hinth]hint}(hj0hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(h prv_nentsh]h prv_nents}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"0ubj)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(h h]h }(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj 1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj 1modnameN classnameNjj)}j]jd0 c.sg_chainasbuh1hhj0ubj)}(h h]h }(hj)1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(hjh]h*}(hj71hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubj)}(hsglh]hsgl}(hjD1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"0ubeh}(h]h ]h"]h$]h&]jjuh1j hj/hhhj/hKubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj/hhhj/hKubah}(h]j/ah ](jjeh"]h$]h&]j j )j huh1jthj/hKhj/hhubj)}(hhh]h)}(hChain two sglists togetherh]hChain two sglists together}(hjn1hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhjk1hhubah}(h]h ]h"]h$]h&]uh1j hj/hhhj/hKubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j1j0j1j1j2j3uh1johhhj"hNhNubj5)}(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?)}(hj1h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj1ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj1ubjU)}(hhh](jZ)}(h.``struct scatterlist *prv`` First scatterlist h](j`)}(h``struct scatterlist *prv``h]j)}(hj1h]hstruct scatterlist *prv}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj1ubjz)}(hhh]h)}(hFirst scatterlisth]hFirst scatterlist}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKhj1ubah}(h]h ]h"]h$]h&]uh1jyhj1ubeh}(h]h ]h"]h$]h&]uh1jYhj1hKhj1ubjZ)}(h4``unsigned int prv_nents`` Number of entries in prv h](j`)}(h``unsigned int prv_nents``h]j)}(hj1h]hunsigned int prv_nents}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj1ubjz)}(hhh]h)}(hNumber of entries in prvh]hNumber of entries in prv}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hKhj1ubah}(h]h ]h"]h$]h&]uh1jyhj1ubeh}(h]h ]h"]h$]h&]uh1jYhj1hKhj1ubjZ)}(h/``struct scatterlist *sgl`` Second scatterlist h](j`)}(h``struct scatterlist *sgl``h]j)}(hj!2h]hstruct scatterlist *sgl}(hj#2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhKhj2ubjz)}(hhh]h)}(hSecond scatterlisth]hSecond scatterlist}(hj:2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj62hKhj72ubah}(h]h ]h"]h$]h&]uh1jyhj2ubeh}(h]h ]h"]h$]h&]uh1jYhj62hKhj1ubeh}(h]h ]h"]h$]h&]uh1jThj1ubh)}(h**Description**h]j?)}(hj\2h]h Description}(hj^2hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjZ2ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj1ubjt$)}(hALinks **prv** and **sgl** together, to form a longer scatterlist.h]h)}(hjt2h](hLinks }(hjv2hhhNhNubj?)}(h**prv**h]hprv}(hj}2hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjv2ubh and }(hjv2hhhNhNubj?)}(h**sgl**h]hsgl}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjv2ubh( together, to form a longer scatterlist.}(hjv2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjr2ubah}(h]h ]h"]h$]h&]uh1js$hj2hMhj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_mark_end (C function) c.sg_mark_endhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h)void sg_mark_end (struct scatterlist *sg)h]j{)}(h(void sg_mark_end(struct scatterlist *sg)h](j6)}(hvoidh]hvoid}(hj2hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj2hhh]/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&]uh1jhj2hhhj2hM ubj)}(h sg_mark_endh]j)}(h sg_mark_endh]h sg_mark_end}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj2hhhj2hM ubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj 3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(h h]h }(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj)3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&3ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj+3modnameN classnameNjj)}j]j)}jj2sb c.sg_mark_endasbuh1hhj3ubj)}(h h]h }(hjI3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(hjh]h*}(hjW3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubj)}(hsgh]hsg}(hjd3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj3ubah}(h]h ]h"]h$]h&]jjuh1j hj2hhhj2hM ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj2hhhj2hM ubah}(h]j2ah ](jjeh"]h$]h&]j j )j huh1jthj2hM hj2hhubj)}(hhh]h)}(hMark the end of the scatterlisth]hMark the end of the scatterlist}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM hj3hhubah}(h]h ]h"]h$]h&]uh1j hj2hhhj2hM ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j3j0j3j1j2j3uh1johhhj"hNhNubj5)}(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.hhMhj3ubjU)}(hhh]jZ)}(h/``struct scatterlist *sg`` SG entryScatterlist h](j`)}(h``struct scatterlist *sg``h]j)}(hj3h]hstruct scatterlist *sg}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM hj3ubjz)}(hhh]h)}(hSG entryScatterlisth]hSG entryScatterlist}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hM hj3ubah}(h]h ]h"]h$]h&]uh1jyhj3ubeh}(h]h ]h"]h$]h&]uh1jYhj3hM hj3ubah}(h]h ]h"]h$]h&]uh1jThj3ubh)}(h**Description**h]j?)}(hj 4h]h Description}(hj 4hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj4ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj3ubjt$)}(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.}(hj$4hhhNhNubah}(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&]uh1js$hj24hMhj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_unmark_end (C function)c.sg_unmark_endhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h+void sg_unmark_end (struct scatterlist *sg)h]j{)}(h*void sg_unmark_end(struct scatterlist *sg)h](j6)}(hvoidh]hvoid}(hjY4hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjU4hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubj)}(h h]h }(hjh4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjU4hhhjg4hMubj)}(h sg_unmark_endh]j)}(h sg_unmark_endh]h sg_unmark_end}(hjz4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjv4ubah}(h]h ](jj eh"]h$]h&]jjuh1jhjU4hhhjg4hMubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj4modnameN classnameNjj)}j]j)}jj|4sbc.sg_unmark_endasbuh1hhj4ubj)}(h h]h }(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(hjh]h*}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(hsgh]hsg}(hj4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj4ubah}(h]h ]h"]h$]h&]jjuh1j hjU4hhhjg4hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjQ4hhhjg4hMubah}(h]jL4ah ](jjeh"]h$]h&]j j )j huh1jthjg4hMhjN4hhubj)}(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&]uh1j hjN4hhhjg4hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j15j0j15j1j2j3uh1johhhj"hNhNubj5)}(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>hj95ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM"hj55ubjU)}(hhh]jZ)}(h/``struct scatterlist *sg`` SG entryScatterlist h](j`)}(h``struct scatterlist *sg``h]j)}(hjZ5h]hstruct scatterlist *sg}(hj\5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX5ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjT5ubjz)}(hhh]h)}(hSG entryScatterlisth]hSG entryScatterlist}(hjs5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjo5hMhjp5ubah}(h]h ]h"]h$]h&]uh1jyhjT5ubeh}(h]h ]h"]h$]h&]uh1jYhjo5hMhjQ5ubah}(h]h ]h"]h$]h&]uh1jThj55ubh)}(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!hj55ubjt$)}(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&]uh1js$hj5hM!hj55ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk"sg_dma_is_bus_address (C function)c.sg_dma_is_bus_addresshNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h3bool sg_dma_is_bus_address (struct scatterlist *sg)h]j{)}(h2bool sg_dma_is_bus_address(struct scatterlist *sg)h](j6)}(hboolh]hbool}(hj5hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj5hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM6ubj)}(h h]h }(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5hhhj5hM6ubj)}(hsg_dma_is_bus_addressh]j)}(hsg_dma_is_bus_addressh]hsg_dma_is_bus_address}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj5hhhj5hM6ubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj 6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(h h]h }(hj-6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubh)}(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)}jj6sbc.sg_dma_is_bus_addressasbuh1hhj6ubj)}(h h]h }(hj^6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(hjh]h*}(hjl6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj)}(hsgh]hsg}(hjy6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj6ubah}(h]h ]h"]h$]h&]jjuh1j hj5hhhj5hM6ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj5hhhj5hM6ubah}(h]j5ah ](jjeh"]h$]h&]j j )j huh1jthj5hM6hj5hhubj)}(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.hhM6hj6hhubah}(h]h ]h"]h$]h&]uh1j hj5hhhj5hM6ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j6j0j6j1j2j3uh1johhhj"hNhNubj5)}(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.hhM:hj6ubjU)}(hhh]jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(h``struct scatterlist *sg``h]j)}(hj6h]hstruct scatterlist *sg}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM8hj6ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hM8hj6ubah}(h]h ]h"]h$]h&]uh1jyhj6ubeh}(h]h ]h"]h$]h&]uh1jYhj6hM8hj6ubah}(h]h ]h"]h$]h&]uh1jThj6ubh)}(h**Description**h]j?)}(hj7h]h Description}(hj!7hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj7ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM:hj6ubjt$)}(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.}(hj97hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM:hj57ubah}(h]h ]h"]h$]h&]uh1js$hjG7hM:hj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk$sg_dma_mark_bus_address (C function)c.sg_dma_mark_bus_addresshNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h5void sg_dma_mark_bus_address (struct scatterlist *sg)h]j{)}(h4void sg_dma_mark_bus_address(struct scatterlist *sg)h](j6)}(hvoidh]hvoid}(hjn7hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjj7hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMDubj)}(h h]h }(hj}7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj7hhhj|7hMDubj)}(hsg_dma_mark_bus_addressh]j)}(hsg_dma_mark_bus_addressh]hsg_dma_mark_bus_address}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubah}(h]h ](jj eh"]h$]h&]jjuh1jhjj7hhhj|7hMDubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj7modnameN classnameNjj)}j]j)}jj7sbc.sg_dma_mark_bus_addressasbuh1hhj7ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(hjh]h*}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(hsgh]hsg}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj7ubah}(h]h ]h"]h$]h&]jjuh1j hjj7hhhj|7hMDubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjf7hhhj|7hMDubah}(h]ja7ah ](jjeh"]h$]h&]j j )j huh1jthj|7hMDhjc7hhubj)}(hhh]h)}(h+Mark the scatterlist entry as a bus addressh]h+Mark the scatterlist entry as a bus address}(hj.8hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMDhj+8hhubah}(h]h ]h"]h$]h&]uh1j hjc7hhhj|7hMDubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jF8j0jF8j1j2j3uh1johhhj"hNhNubj5)}(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?)}(hjP8h]h Parameters}(hjR8hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjN8ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMHhjJ8ubjU)}(hhh]jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(h``struct scatterlist *sg``h]j)}(hjo8h]hstruct scatterlist *sg}(hjq8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm8ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMEhji8ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMEhj8ubah}(h]h ]h"]h$]h&]uh1jyhji8ubeh}(h]h ]h"]h$]h&]uh1jYhj8hMEhjf8ubah}(h]h ]h"]h$]h&]uh1jThjJ8ubh)}(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.hhMGhjJ8ubjt$)}(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.hhMGhj8ubah}(h]h ]h"]h$]h&]uh1js$hj8hMGhjJ8ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk&sg_dma_unmark_bus_address (C function)c.sg_dma_unmark_bus_addresshNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h7void sg_dma_unmark_bus_address (struct scatterlist *sg)h]j{)}(h6void sg_dma_unmark_bus_address(struct scatterlist *sg)h](j6)}(hvoidh]hvoid}(hj8hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj8hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMSubj)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8hhhj9hMSubj)}(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 ](jj eh"]h$]h&]jjuh1jhj8hhhj9hMSubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj69hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj29ubj)}(h h]h }(hjC9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj29ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjT9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ9ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjV9modnameN classnameNjj)}j]j)}jj9sbc.sg_dma_unmark_bus_addressasbuh1hhj29ubj)}(h h]h }(hjt9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj29ubj)}(hjh]h*}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj29ubj)}(hsgh]hsg}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj29ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj.9ubah}(h]h ]h"]h$]h&]jjuh1j hj8hhhj9hMSubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj8hhhj9hMSubah}(h]j8ah ](jjeh"]h$]h&]j j )j huh1jthj9hMShj8hhubj)}(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.hhMShj9hhubah}(h]h ]h"]h$]h&]uh1j hj8hhhj9hMSubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j9j0j9j1j2j3uh1johhhj"hNhNubj5)}(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.hhMWhj9ubjU)}(hhh]jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(h``struct scatterlist *sg``h]j)}(hj9h]hstruct scatterlist *sg}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMThj9ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hMThj:ubah}(h]h ]h"]h$]h&]uh1jyhj9ubeh}(h]h ]h"]h$]h&]uh1jYhj:hMThj9ubah}(h]h ]h"]h$]h&]uh1jThj9ubh)}(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.hhMVhj9ubjt$)}(hClears the bus address mark.h]h)}(hjM:h]hClears the bus address mark.}(hjO:hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMVhjK:ubah}(h]h ]h"]h$]h&]uh1js$hj\:hMVhj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_dma_is_swiotlb (C function)c.sg_dma_is_swiotlbhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h/bool sg_dma_is_swiotlb (struct scatterlist *sg)h]j{)}(h.bool sg_dma_is_swiotlb(struct scatterlist *sg)h](j6)}(hj5h]hbool}(hj:hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj: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&]uh1jhj: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 ](jj eh"]h$]h&]jjuh1jhj:hhhj:hM_ubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubj)}(h h]h }(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj: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&]uh1jhj: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&]jjuh1j hj:hhhj:hM_ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj{:hhhj:hM_ubah}(h]jv:ah ](jjeh"]h$]h&]j j )j huh1jthj:hM_hjx:hhubj)}(hhh]h)}(h>Return whether the scatterlist was marked for SWIOTLB bouncingh]h>Return whether the scatterlist was marked for SWIOTLB bouncing}(hjB;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&]uh1j hjx:hhhj:hM_ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jZ;j0jZ;j1j2j3uh1johhhj"hNhNubj5)}(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?)}(hjd;h]h Parameters}(hjf;hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjb;ubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMchj^;ubjU)}(hhh]jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMahj};ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMahj;ubah}(h]h ]h"]h$]h&]uh1jyhj};ubeh}(h]h ]h"]h$]h&]uh1jYhj;hMahjz;ubah}(h]h ]h"]h$]h&]uh1jThj^;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.hhMchj^;ubjt$)}(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.hhMchj;ubah}(h]h ]h"]h$]h&]uh1js$hj;hMchj^;ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk sg_dma_mark_swiotlb (C function)c.sg_dma_mark_swiotlbhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h1void sg_dma_mark_swiotlb (struct scatterlist *sg)h]j{)}(h0void sg_dma_mark_swiotlb(struct scatterlist *sg)h](j6)}(hvoidh]hvoid}(hj <hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj <hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMnubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj <hhhj<hMnubj)}(hsg_dma_mark_swiotlbh]j)}(hsg_dma_mark_swiotlbh]hsg_dma_mark_swiotlb}(hj.<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*<ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj <hhhj<hMnubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hjJ<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF<ubj)}(h h]h }(hjW<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF<ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjh<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje<ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjj<modnameN classnameNjj)}j]j)}jj0<sbc.sg_dma_mark_swiotlbasbuh1hhjF<ubj)}(h h]h }(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF<ubj)}(hjh]h*}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF<ubj)}(hsgh]hsg}(hj<hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjF<ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjB<ubah}(h]h ]h"]h$]h&]jjuh1j hj <hhhj<hMnubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj<hhhj<hMnubah}(h]j<ah ](jjeh"]h$]h&]j j )j huh1jthj<hMnhj<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.hhMnhj<hhubah}(h]h ]h"]h$]h&]uh1j hj<hhhj<hMnubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j<j0j<j1j2j3uh1johhhj"hNhNubj5)}(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.hhMrhj<ubjU)}(hhh]jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMohj=ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj'=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#=hMohj$=ubah}(h]h ]h"]h$]h&]uh1jyhj=ubeh}(h]h ]h"]h$]h&]uh1jYhj#=hMohj=ubah}(h]h ]h"]h$]h&]uh1jThj<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.hhMqhj<ubjt$)}(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.}(hjc=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMqhj_=ubah}(h]h ]h"]h$]h&]uh1js$hjq=hMqhj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_phys (C function) c.sg_physhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h+dma_addr_t sg_phys (struct scatterlist *sg)h]j{)}(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&]uh1jhj=hhhj=hMubj)}(hsg_physh]j)}(hj=h]hsg_phys}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj=hhhj=hMubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubj)}(h h]h }(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=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&]uh1jhj=ubj)}(hjh]h*}(hj4>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubj)}(hsgh]hsg}(hjA>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj=ubah}(h]h ]h"]h$]h&]jjuh1j hj=hhhj=hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj=hhhj=hMubah}(h]j=ah ](jjeh"]h$]h&]j j )j huh1jthj=hMhj=hhubj)}(hhh]h)}(h&Return physical address of an sg entryh]h&Return physical address of an sg entry}(hjk>hhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjh>hhubah}(h]h ]h"]h$]h&]uh1j hj=hhhj=hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j>j0j>j1j2j3uh1johhhj"hNhNubj5)}(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?)}(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>ubjU)}(hhh]jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(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&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj>ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1jyhj>ubeh}(h]h ]h"]h$]h&]uh1jYhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1jThj>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.hhMhj>ubjt$)}(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&]uh1js$hj?hMhj>ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_virt (C function) c.sg_virthNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h'void * sg_virt (struct scatterlist *sg)h]j{)}(h%void *sg_virt(struct scatterlist *sg)h](j6)}(hvoidh]hvoid}(hj6?hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj2?hhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubj)}(h h]h }(hjE?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2?hhhjD?hMubj)}(hjh]h*}(hjS?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2?hhhjD?hMubj)}(hsg_virth]j)}(hsg_virth]hsg_virt}(hjd?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`?ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj2?hhhjD?hMubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|?ubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|?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)}jjf?sb c.sg_virtasbuh1hhj|?ubj)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|?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&]noemphjjuh1jhjx?ubah}(h]h ]h"]h$]h&]jjuh1j hj2?hhhjD?hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj.?hhhjD?hMubah}(h]j)?ah ](jjeh"]h$]h&]j j )j huh1jthjD?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&]uh1j hj+?hhhjD?hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j@j0j@j1j2j3uh1johhhj"hNhNubj5)}(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@ubjU)}(hhh]jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(h``struct scatterlist *sg``h]j)}(hjD@h]hstruct scatterlist *sg}(hjF@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB@ubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj>@ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj]@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjY@hMhjZ@ubah}(h]h ]h"]h$]h&]uh1jyhj>@ubeh}(h]h ]h"]h$]h&]uh1jYhjY@hMhj;@ubah}(h]h ]h"]h$]h&]uh1jThj@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.hhMhj@ubjt$)}(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&]uh1js$hj@hMhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_init_marker (C function)c.sg_init_markerhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hAvoid sg_init_marker (struct scatterlist *sgl, unsigned int nents)h]j{)}(h@void sg_init_marker(struct scatterlist *sgl, unsigned int nents)h](j6)}(hvoidh]hvoid}(hj@hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj@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&]uh1jhj@hhhj@hMubj)}(hsg_init_markerh]j)}(hsg_init_markerh]hsg_init_marker}(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj@hhhj@hMubj)}(h-(struct scatterlist *sgl, unsigned int nents)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hj AhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj)AhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&Aubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj+AmodnameN classnameNjj)}j]j)}jj@sbc.sg_init_markerasbuh1hhjAubj)}(h h]h }(hjIAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubj)}(hjh]h*}(hjWAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubj)}(hsglh]hsgl}(hjdAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hj}AhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjyAubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyAubj6)}(hinth]hint}(hjAhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjyAubj)}(h h]h }(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyAubj)}(hnentsh]hnents}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyAubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjAubeh}(h]h ]h"]h$]h&]jjuh1j hj@hhhj@hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj@hhhj@hMubah}(h]j@ah ](jjeh"]h$]h&]j j )j huh1jthj@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&]uh1j hj@hhhj@hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jAj0jAj1j2j3uh1johhhj"hNhNubj5)}(ho**Parameters** ``struct scatterlist *sgl`` The SG table ``unsigned int nents`` Number of entries in tableh](h)}(h**Parameters**h]j?)}(hjBh]h Parameters}(hjBhhhNhNubah}(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.hhMhjAubjU)}(hhh](jZ)}(h)``struct scatterlist *sgl`` The SG table h](j`)}(h``struct scatterlist *sgl``h]j)}(hj Bh]hstruct scatterlist *sgl}(hj"BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjBubjz)}(hhh]h)}(h The SG tableh]h The SG table}(hj9BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5BhMhj6Bubah}(h]h ]h"]h$]h&]uh1jyhjBubeh}(h]h ]h"]h$]h&]uh1jYhj5BhMhjBubjZ)}(h1``unsigned int nents`` Number of entries in tableh](j`)}(h``unsigned int nents``h]j)}(hjYBh]hunsigned int nents}(hj[BhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWBubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjSBubjz)}(hhh]h)}(hNumber of entries in tableh]hNumber of entries in table}(hjrBhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjoBubah}(h]h ]h"]h$]h&]uh1jyhjSBubeh}(h]h ]h"]h$]h&]uh1jYhjnBhMhjBubeh}(h]h ]h"]h$]h&]uh1jThjAubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk&sg_alloc_table_from_pages (C function)c.sg_alloc_table_from_pageshNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(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{)}(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](j6)}(hinth]hint}(hjBhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjBhhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhjBhMubj)}(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 ](jj eh"]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](j)}(hjh]hstruct}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubh)}(hhh]j)}(hsg_tableh]hsg_table}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj Cubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjCmodnameN classnameNjj)}j]j)}jjBsbc.sg_alloc_table_from_pagesasbuh1hhjBubj)}(h h]h }(hj.ChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubj)}(hjh]h*}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,Dubj6)}(hinth]hint}(hjLDhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj,Dubj)}(h h]h }(hjZDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,Dubj)}(hoffseth]hoffset}(hjhDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,Dubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubj)}(hunsigned long sizeh](j6)}(hunsignedh]hunsigned}(hjDhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj}Dubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}Dubj6)}(hlongh]hlong}(hjDhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj}Dubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}Dubj)}(hsizeh]hsize}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}Dubeh}(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]j*Cc.sg_alloc_table_from_pagesasbuh1hhjDubj)}(h h]h }(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubj)}(hgfp_maskh]hgfp_mask}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjBubeh}(h]h ]h"]h$]h&]jjuh1j hjBhhhjBhMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjBhhhjBhMubah}(h]jBah ](jjeh"]h$]h&]j j )j huh1jthjBhMhjBhhubj)}(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}(hj+EhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj(Ehhubah}(h]h ]h"]h$]h&]uh1j hjBhhhjBhMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jCEj0jCEj1j2j3uh1johhhj"hNhNubj5)}(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?)}(hjMEh]h Parameters}(hjOEhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjKEubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjGEubjU)}(hhh](jZ)}(h4``struct sg_table *sgt`` The sg table header to use h](j`)}(h``struct sg_table *sgt``h]j)}(hjlEh]hstruct sg_table *sgt}(hjnEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjEubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjfEubjz)}(hhh]h)}(hThe sg table header to useh]hThe sg table header to use}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMhjEubah}(h]h ]h"]h$]h&]uh1jyhjfEubeh}(h]h ]h"]h$]h&]uh1jYhjEhMhjcEubjZ)}(h=``struct page **pages`` Pointer to an array of page pointers h](j`)}(h``struct page **pages``h]j)}(hjEh]hstruct page **pages}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjEubjz)}(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&]uh1jyhjEubeh}(h]h ]h"]h$]h&]uh1jYhjEhMhjcEubjZ)}(h<``unsigned int n_pages`` Number of pages in the pages array h](j`)}(h``unsigned int n_pages``h]j)}(hjEh]hunsigned int n_pages}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjEubjz)}(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&]uh1jyhjEubeh}(h]h ]h"]h$]h&]uh1jYhjEhMhjcEubjZ)}(hU``unsigned int offset`` Offset from start of the first page to the start of a buffer h](j`)}(h``unsigned int offset``h]j)}(hjFh]hunsigned int offset}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjFubjz)}(hhh]h)}(hhjFubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjGEubjt$)}(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&]uh1js$hjFhMhjGEubh)}(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.hhMhjGEubh)}(h'0 on success, negative error on failureh]h'0 on success, negative error on failure}(hj GhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjGEubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_page_iter_page (C function)c.sg_page_iter_pagehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hhjUHubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM]hjQHubjU)}(hhh]jZ)}(h=``struct sg_page_iter *piter`` page iterator holding the pageh](j`)}(h``struct sg_page_iter *piter``h]j)}(hjvHh]hstruct sg_page_iter *piter}(hjxHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtHubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM_hjpHubjz)}(hhh]h)}(hpage iterator holding the pageh]hpage iterator holding the page}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMZhjHubah}(h]h ]h"]h$]h&]uh1jyhjpHubeh}(h]h ]h"]h$]h&]uh1jYhjHhM_hjmHubah}(h]h ]h"]h$]h&]uh1jThjQHubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk%sg_page_iter_dma_address (C function)c.sg_page_iter_dma_addresshNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hGdma_addr_t sg_page_iter_dma_address (struct sg_dma_page_iter *dma_iter)h]j{)}(hFdma_addr_t sg_page_iter_dma_address(struct sg_dma_page_iter *dma_iter)h](h)}(hhh]j)}(h dma_addr_th]h dma_addr_t}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjHmodnameN classnameNjj)}j]j)}jsg_page_iter_dma_addresssbc.sg_page_iter_dma_addressasbuh1hhjHhhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMbubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHhhhjHhMbubj)}(hsg_page_iter_dma_addressh]j)}(hjHh]hsg_page_iter_dma_address}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubah}(h]h ](jj eh"]h$]h&]jjuh1jhjHhhhjHhMbubj)}(h#(struct sg_dma_page_iter *dma_iter)h]j)}(h!struct sg_dma_page_iter *dma_iterh](j)}(hjh]hstruct}(hj"IhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubj)}(h h]h }(hj/IhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubh)}(hhh]j)}(hsg_dma_page_iterh]hsg_dma_page_iter}(hj@IhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=Iubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjBImodnameN classnameNjj)}j]jHc.sg_page_iter_dma_addressasbuh1hhjIubj)}(h h]h }(hj^IhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubj)}(hjh]h*}(hjlIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubj)}(hdma_iterh]hdma_iter}(hjyIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjIubah}(h]h ]h"]h$]h&]jjuh1j hjHhhhjHhMbubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjHhhhjHhMbubah}(h]jHah ](jjeh"]h$]h&]j j )j huh1jthjHhMbhjHhhubj)}(hhh]h)}(hBget the dma address of the current page held by the page iterator.h]hBget the dma address of the current page held by the page iterator.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMbhjIhhubah}(h]h ]h"]h$]h&]uh1j hjHhhhjHhMbubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jIj0jIj1j2j3uh1johhhj"hNhNubj5)}(hV**Parameters** ``struct sg_dma_page_iter *dma_iter`` page iterator holding the pageh](h)}(h**Parameters**h]j?)}(hjIh]h Parameters}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjIubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMfhjIubjU)}(hhh]jZ)}(hD``struct sg_dma_page_iter *dma_iter`` page iterator holding the pageh](j`)}(h%``struct sg_dma_page_iter *dma_iter``h]j)}(hjIh]h!struct sg_dma_page_iter *dma_iter}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhhjIubjz)}(hhh]h)}(hpage iterator holding the pageh]hpage iterator holding the page}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMdhjIubah}(h]h ]h"]h$]h&]uh1jyhjIubeh}(h]h ]h"]h$]h&]uh1jYhjIhMhhjIubah}(h]h ]h"]h$]h&]uh1jThjIubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkfor_each_sg_page (C macro)c.for_each_sg_pagehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hfor_each_sg_pageh]j{)}(hfor_each_sg_pageh]j)}(hfor_each_sg_pageh]j)}(hj8Jh]hfor_each_sg_page}(hjBJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>Jubah}(h]h ](jj eh"]h$]h&]jjuh1jhj:Jhhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMnubah}(h]h ]h"]h$]h&]jjjuh1jzjjhj6JhhhjUJhMnubah}(h]j1Jah ](jjeh"]h$]h&]j j )j huh1jthjUJhMnhj3Jhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1j hj3JhhhjUJhMnubeh}(h]h ](jmacroeh"]h$]h&]j.jj/jnJj0jnJj1j2j3uh1johhhj"hNhNubh)}(h5``for_each_sg_page (sglist, piter, nents, pgoffset)``h]j)}(hjtJh]h1for_each_sg_page (sglist, piter, nents, pgoffset)}(hjvJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrJubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMphj"hhubjt$)}(h,iterate over the pages of the given sg list h]h)}(h+iterate over the pages of the given sg listh]h+iterate over the pages of the given sg list}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMnhjJubah}(h]h ]h"]h$]h&]uh1js$hjJhMnhj"hhubj5)}(hXZ**Parameters** ``sglist`` sglist to iterate over ``piter`` page iterator to hold current page, sg, sg_pgoffset ``nents`` maximum number of sg entries to iterate over ``pgoffset`` starting page offset (in pages) **Description** Callers may use sg_page_iter_page() to get each page pointer. In each loop it operates on PAGE_SIZE unit.h](h)}(h**Parameters**h]j?)}(hjJh]h Parameters}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjJubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMrhjJubjU)}(hhh](jZ)}(h"``sglist`` sglist to iterate over h](j`)}(h ``sglist``h]j)}(hjJh]hsglist}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMohjJubjz)}(hhh]h)}(hsglist to iterate overh]hsglist to iterate over}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhMohjJubah}(h]h ]h"]h$]h&]uh1jyhjJubeh}(h]h ]h"]h$]h&]uh1jYhjJhMohjJubjZ)}(h>``piter`` page iterator to hold current page, sg, sg_pgoffset h](j`)}(h ``piter``h]j)}(hjKh]hpiter}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMphjJubjz)}(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&]uh1hhjKhMphjKubah}(h]h ]h"]h$]h&]uh1jyhjJubeh}(h]h ]h"]h$]h&]uh1jYhjKhMphjJubjZ)}(h7``nents`` maximum number of sg entries to iterate over h](j`)}(h ``nents``h]j)}(hj:Kh]hnents}(hjhjKubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMthjJubh)}(hiCallers may use sg_page_iter_page() to get each page pointer. In each loop it operates on PAGE_SIZE unit.h]hiCallers may use sg_page_iter_page() to get each page pointer. In each loop it operates on PAGE_SIZE unit.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMshjJubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkfor_each_sg_dma_page (C macro)c.for_each_sg_dma_pagehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hfor_each_sg_dma_pageh]j{)}(hfor_each_sg_dma_pageh]j)}(hfor_each_sg_dma_pageh]j)}(hjKh]hfor_each_sg_dma_page}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubah}(h]h ](jj eh"]h$]h&]jjuh1jhjKhhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM|ubah}(h]h ]h"]h$]h&]jjjuh1jzjjhjKhhhj LhM|ubah}(h]jKah ](jjeh"]h$]h&]j j )j huh1jthj LhM|hjKhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1j hjKhhhj LhM|ubeh}(h]h ](jmacroeh"]h$]h&]j.jj/j#Lj0j#Lj1j2j3uh1johhhj"hNhNubh)}(h@``for_each_sg_dma_page (sglist, dma_iter, dma_nents, pgoffset)``h]j)}(hj)Lh]hhj\Lubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjXLubjU)}(hhh](jZ)}(h"``sglist`` sglist to iterate over h](j`)}(h ``sglist``h]j)}(hj}Lh]hsglist}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{Lubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM}hjwLubjz)}(hhh]h)}(hsglist to iterate overh]hsglist to iterate over}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhM}hjLubah}(h]h ]h"]h$]h&]uh1jyhjwLubeh}(h]h ]h"]h$]h&]uh1jYhjLhM}hjtLubjZ)}(h4``dma_iter`` DMA page iterator to hold current page h](j`)}(h ``dma_iter``h]j)}(hjLh]hdma_iter}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhM~hjLubjz)}(hhh]h)}(h&DMA page iterator to hold current pageh]h&DMA page iterator to hold current page}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhM~hjLubah}(h]h ]h"]h$]h&]uh1jyhjLubeh}(h]h ]h"]h$]h&]uh1jYhjLhM~hjtLubjZ)}(hg``dma_nents`` maximum number of sg entries to iterate over, this is the value returned from dma_map_sg h](j`)}(h ``dma_nents``h]j)}(hjLh]h dma_nents}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjLubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjLubjz)}(hhh]h)}(hXmaximum number of sg entries to iterate over, this is the value returned from dma_map_sgh]hXmaximum number of sg entries to iterate over, this is the value returned from dma_map_sg}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjMubah}(h]h ]h"]h$]h&]uh1jyhjLubeh}(h]h ]h"]h$]h&]uh1jYhjMhMhjtLubjZ)}(h-``pgoffset`` starting page offset (in pages) h](j`)}(h ``pgoffset``h]j)}(hj)Mh]hpgoffset}(hj+MhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'Mubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj#Mubjz)}(hhh]h)}(hstarting page offset (in pages)h]hstarting page offset (in pages)}(hjBMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>MhMhj?Mubah}(h]h ]h"]h$]h&]uh1jyhj#Mubeh}(h]h ]h"]h$]h&]uh1jYhj>MhMhjtLubeh}(h]h ]h"]h$]h&]uh1jThjXLubh)}(h**Description**h]j?)}(hjdMh]h Description}(hjfMhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjbMubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjXLubh)}(hvCallers may use sg_page_iter_dma_address() to get each page's DMA address. In each loop it operates on PAGE_SIZE unit.h]hxCallers may use sg_page_iter_dma_address() to get each page’s DMA address. In each loop it operates on PAGE_SIZE unit.}(hjzMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjXLubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkfor_each_sgtable_page (C macro)c.for_each_sgtable_pagehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hfor_each_sgtable_pageh]j{)}(hfor_each_sgtable_pageh]j)}(hfor_each_sgtable_pageh]j)}(hjMh]hfor_each_sgtable_page}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubah}(h]h ](jj eh"]h$]h&]jjuh1jhjMhhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubah}(h]h ]h"]h$]h&]jjjuh1jzjjhjMhhhjMhMubah}(h]jMah ](jjeh"]h$]h&]j j )j huh1jthjMhMhjMhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1j hjMhhhjMhMubeh}(h]h ](jmacroeh"]h$]h&]j.jj/jMj0jMj1j2j3uh1johhhj"hNhNubh)}(h0``for_each_sgtable_page (sgt, piter, pgoffset)``h]j)}(hjMh]h,for_each_sgtable_page (sgt, piter, pgoffset)}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj"hhubjt$)}(h.iterate over all pages in the sg_table object h]h)}(h-iterate over all pages in the sg_table objecth]h-iterate over all pages in the sg_table object}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjMubah}(h]h ]h"]h$]h&]uh1js$hjNhMhj"hhubj5)}(hXe**Parameters** ``sgt`` sg_table object to iterate over ``piter`` page iterator to hold current page ``pgoffset`` starting page offset (in pages) **Description** Iterates over the all memory pages in the buffer described by a scatterlist stored in the given sg_table object. See also for_each_sg_page(). In each loop it operates on PAGE_SIZE unit.h](h)}(h**Parameters**h]j?)}(hjNh]h Parameters}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjNubjU)}(hhh](jZ)}(h(``sgt`` sg_table object to iterate over h](j`)}(h``sgt``h]j)}(hj3Nh]hsgt}(hj5NhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1Nubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhj-Nubjz)}(hhh]h)}(hsg_table object to iterate overh]hsg_table object to iterate over}(hjLNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHNhMhjINubah}(h]h ]h"]h$]h&]uh1jyhj-Nubeh}(h]h ]h"]h$]h&]uh1jYhjHNhMhj*NubjZ)}(h-``piter`` page iterator to hold current page h](j`)}(h ``piter``h]j)}(hjlNh]hpiter}(hjnNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjNubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjfNubjz)}(hhh]h)}(h"page iterator to hold current pageh]h"page iterator to hold current page}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhMhjNubah}(h]h ]h"]h$]h&]uh1jyhjfNubeh}(h]h ]h"]h$]h&]uh1jYhjNhMhj*NubjZ)}(h-``pgoffset`` starting page offset (in pages) h](j`)}(h ``pgoffset``h]j)}(hjNh]hpgoffset}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjNubjz)}(hhh]h)}(hstarting page offset (in pages)h]hstarting page offset (in pages)}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhMhjNubah}(h]h ]h"]h$]h&]uh1jyhjNubeh}(h]h ]h"]h$]h&]uh1jYhjNhMhj*Nubeh}(h]h ]h"]h$]h&]uh1jThjNubh)}(h**Description**h]j?)}(hjNh]h Description}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjNubh)}(hIterates over the all memory pages in the buffer described by a scatterlist stored in the given sg_table object. See also for_each_sg_page(). In each loop it operates on PAGE_SIZE unit.h]hIterates over the all memory pages in the buffer described by a scatterlist stored in the given sg_table object. See also for_each_sg_page(). In each loop it operates on PAGE_SIZE unit.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjNubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk#for_each_sgtable_dma_page (C macro)c.for_each_sgtable_dma_pagehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hfor_each_sgtable_dma_pageh]j{)}(hfor_each_sgtable_dma_pageh]j)}(hfor_each_sgtable_dma_pageh]j)}(hjOh]hfor_each_sgtable_dma_page}(hj)OhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%Oubah}(h]h ](jj eh"]h$]h&]jjuh1jhj!Ohhh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMubah}(h]h ]h"]h$]h&]jjjuh1jzjjhjOhhhjhjOubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjOubjU)}(hhh](jZ)}(h(``sgt`` sg_table object to iterate over h](j`)}(h``sgt``h]j)}(hjOh]hsgt}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjOubjz)}(hhh]h)}(hsg_table object to iterate overh]hsg_table object to iterate over}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jyhjOubeh}(h]h ]h"]h$]h&]uh1jYhjOhMhjOubjZ)}(h4``dma_iter`` DMA page iterator to hold current page h](j`)}(h ``dma_iter``h]j)}(hjOh]hdma_iter}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjOubjz)}(hhh]h)}(h&DMA page iterator to hold current pageh]h&DMA page iterator to hold current page}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jyhjOubeh}(h]h ]h"]h$]h&]uh1jYhjOhMhjOubjZ)}(h-``pgoffset`` starting page offset (in pages) h](j`)}(h ``pgoffset``h]j)}(hj!Ph]hpgoffset}(hj#PhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1j_h]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjPubjz)}(hhh]h)}(hstarting page offset (in pages)h]hstarting page offset (in pages)}(hj:PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6PhMhj7Pubah}(h]h ]h"]h$]h&]uh1jyhjPubeh}(h]h ]h"]h$]h&]uh1jYhj6PhMhjOubeh}(h]h ]h"]h$]h&]uh1jThjOubh)}(h**Description**h]j?)}(hj\Ph]h Description}(hj^PhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjZPubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjOubh)}(hIterates over the all DMA mapped pages in the buffer described by a scatterlist stored in the given sg_table object. See also for_each_sg_dma_page(). In each loop it operates on PAGE_SIZE unit.h]hIterates over the all DMA mapped pages in the buffer described by a scatterlist stored in the given sg_table object. See also for_each_sg_dma_page(). In each loop it operates on PAGE_SIZE unit.}(hjrPhhhNhNubah}(h]h ]h"]h$]h&]uh1hh]/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:867: ./include/linux/scatterlist.hhMhjOubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_nents (C function) c.sg_nentshNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h%int sg_nents (struct scatterlist *sg)h]j{)}(h$int sg_nents(struct scatterlist *sg)h](j6)}(hinth]hint}(hjPhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjPhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPhhhjPhKubj)}(hsg_nentsh]j)}(hsg_nentsh]hsg_nents}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubah}(h]h ](jj eh"]h$]h&]jjuh1jhjPhhhjPhKubj)}(h(struct scatterlist *sg)h]j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjPmodnameN classnameNjj)}j]j)}jjPsb c.sg_nentsasbuh1hhjPubj)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(hjh]h*}(hj*QhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubj)}(hsgh]hsg}(hj7QhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjPubah}(h]h ]h"]h$]h&]jjuh1j hjPhhhjPhKubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjPhhhjPhKubah}(h]jPah ](jjeh"]h$]h&]j j )j huh1jthjPhKhjPhhubj)}(hhh]h)}(h,return total count of entries in scatterlisth]h,return total count of entries in scatterlist}(hjaQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj^Qhhubah}(h]h ]h"]h$]h&]uh1j hjPhhhjPhKubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jyQj0jyQj1j2j3uh1johhhj"hNhNubj5)}(h**Parameters** ``struct scatterlist *sg`` The scatterlist **Description** Allows to know how many entries are in sg, taking into account chaining as wellh](h)}(h**Parameters**h]j?)}(hjQh]h Parameters}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjQubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj}QubjU)}(hhh]jZ)}(h+``struct scatterlist *sg`` The scatterlist h](j`)}(h``struct scatterlist *sg``h]j)}(hjQh]hstruct scatterlist *sg}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjQubjz)}(hhh]h)}(hThe scatterlisth]hThe scatterlist}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhKhjQubah}(h]h ]h"]h$]h&]uh1jyhjQubeh}(h]h ]h"]h$]h&]uh1jYhjQhKhjQubah}(h]h ]h"]h$]h&]uh1jThj}Qubh)}(h**Description**h]j?)}(hjQh]h Description}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjQubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj}Qubh)}(hOAllows to know how many entries are in sg, taking into account chaining as wellh]hOAllows to know how many entries are in sg, taking into account chaining as well}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj}Qubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_nents_for_len (C function)c.sg_nents_for_lenhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h6int sg_nents_for_len (struct scatterlist *sg, u64 len)h]j{)}(h5int sg_nents_for_len(struct scatterlist *sg, u64 len)h](j6)}(hinth]hint}(hj"RhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjRhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK#ubj)}(h h]h }(hj1RhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRhhhj0RhK#ubj)}(hsg_nents_for_lenh]j)}(hsg_nents_for_lenh]hsg_nents_for_len}(hjCRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?Rubah}(h]h ](jj eh"]h$]h&]jjuh1jhjRhhhj0RhK#ubj)}(h!(struct scatterlist *sg, u64 len)h](j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj_RhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[Rubj)}(h h]h }(hjlRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[Rubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj}RhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzRubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjRmodnameN classnameNjj)}j]j)}jjERsbc.sg_nents_for_lenasbuh1hhj[Rubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[Rubj)}(hjh]h*}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[Rubj)}(hsgh]hsg}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[Rubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWRubj)}(hu64 lenh](h)}(hhh]j)}(hu64h]hu64}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjRmodnameN classnameNjj)}j]jRc.sg_nents_for_lenasbuh1hhjRubj)}(h h]h }(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubj)}(hlenh]hlen}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWRubeh}(h]h ]h"]h$]h&]jjuh1j hjRhhhj0RhK#ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjRhhhj0RhK#ubah}(h]jRah ](jjeh"]h$]h&]j j )j huh1jthj0RhK#hjRhhubj)}(hhh]h)}(hRreturn total count of entries in scatterlist needed to satisfy the supplied lengthh]hRreturn total count of entries in scatterlist needed to satisfy the supplied length}(hj*ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK#hj'Shhubah}(h]h ]h"]h$]h&]uh1j hjRhhhj0RhK#ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jBSj0jBSj1j2j3uh1johhhj"hNhNubj5)}(hX:**Parameters** ``struct scatterlist *sg`` The scatterlist ``u64 len`` The total required length **Description** Determines the number of entries in sg that are required to meet the supplied length, taking into account chaining as well **Return** the number of sg entries needed, negative error on failureh](h)}(h**Parameters**h]j?)}(hjLSh]h Parameters}(hjNShhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjJSubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK'hjFSubjU)}(hhh](jZ)}(h+``struct scatterlist *sg`` The scatterlist h](j`)}(h``struct scatterlist *sg``h]j)}(hjkSh]hstruct scatterlist *sg}(hjmShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiSubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK%hjeSubjz)}(hhh]h)}(hThe scatterlisth]hThe scatterlist}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShK%hjSubah}(h]h ]h"]h$]h&]uh1jyhjeSubeh}(h]h ]h"]h$]h&]uh1jYhjShK%hjbSubjZ)}(h&``u64 len`` The total required length h](j`)}(h ``u64 len``h]j)}(hjSh]hu64 len}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK&hjSubjz)}(hhh]h)}(hThe total required lengthh]hThe total required length}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShK&hjSubah}(h]h ]h"]h$]h&]uh1jyhjSubeh}(h]h ]h"]h$]h&]uh1jYhjShK&hjbSubeh}(h]h ]h"]h$]h&]uh1jThjFSubh)}(h**Description**h]j?)}(hjSh]h Description}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjSubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK(hjFSubh)}(hzDetermines the number of entries in sg that are required to meet the supplied length, taking into account chaining as wellh]hzDetermines the number of entries in sg that are required to meet the supplied length, taking into account chaining as well}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK(hjFSubh)}(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.chK+hjFSubh)}(h:the number of sg entries needed, negative error on failureh]h:the number of sg entries needed, negative error on failure}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK,hjFSubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_nents_for_dma (C function)c.sg_nents_for_dmahNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hNint sg_nents_for_dma (struct scatterlist *sgl, unsigned int sglen, size_t len)h]j{)}(hMint sg_nents_for_dma(struct scatterlist *sgl, unsigned int sglen, size_t len)h](j6)}(hinth]hint}(hjKThhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjGThhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKDubj)}(h h]h }(hjZThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGThhhjYThKDubj)}(hsg_nents_for_dmah]j)}(hsg_nents_for_dmah]hsg_nents_for_dma}(hjlThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhTubah}(h]h ](jj eh"]h$]h&]jjuh1jhjGThhhjYThKDubj)}(h9(struct scatterlist *sgl, unsigned int sglen, size_t len)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjTmodnameN classnameNjj)}j]j)}jjnTsbc.sg_nents_for_dmaasbuh1hhjTubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj)}(hjh]h*}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj)}(hsglh]hsgl}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjTubj)}(hunsigned int sglenh](j6)}(hunsignedh]hunsigned}(hjThhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjTubj)}(h h]h }(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj6)}(hinth]hint}(hjUhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjTubj)}(h h]h }(hj$UhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubj)}(hsglenh]hsglen}(hj2UhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjTubj)}(h size_t lenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjNUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKUubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjPUmodnameN classnameNjj)}j]jTc.sg_nents_for_dmaasbuh1hhjGUubj)}(h h]h }(hjlUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGUubj)}(hlenh]hlen}(hjzUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGUubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjTubeh}(h]h ]h"]h$]h&]jjuh1j hjGThhhjYThKDubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjCThhhjYThKDubah}(h]j>Tah ](jjeh"]h$]h&]j j )j huh1jthjYThKDhj@Thhubj)}(hhh]h)}(h6return the count of DMA-capable entries in scatterlisth]h6return the count of DMA-capable entries in scatterlist}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKDhjUhhubah}(h]h ]h"]h$]h&]uh1j hj@ThhhjYThKDubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jUj0jUj1j2j3uh1johhhj"hNhNubj5)}(hX**Parameters** ``struct scatterlist *sgl`` The scatterlist ``unsigned int sglen`` The current number of entries ``size_t len`` The maximum length of DMA-capable block **Description** Determines the number of entries in **sgl** which would be permitted in DMA-capable transfer if list had been split accordingly, taking into account chaining as well. **Return** the number of sgl entries neededh](h)}(h**Parameters**h]j?)}(hjUh]h Parameters}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjUubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKHhjUubjU)}(hhh](jZ)}(h,``struct scatterlist *sgl`` The scatterlist h](j`)}(h``struct scatterlist *sgl``h]j)}(hjUh]hstruct scatterlist *sgl}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKEhjUubjz)}(hhh]h)}(hThe scatterlisth]hThe scatterlist}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhKEhjUubah}(h]h ]h"]h$]h&]uh1jyhjUubeh}(h]h ]h"]h$]h&]uh1jYhjUhKEhjUubjZ)}(h5``unsigned int sglen`` The current number of entries h](j`)}(h``unsigned int sglen``h]j)}(hjVh]hunsigned int sglen}(hj VhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjVubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKFhjVubjz)}(hhh]h)}(hThe current number of entriesh]hThe current number of entries}(hj7VhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3VhKFhj4Vubah}(h]h ]h"]h$]h&]uh1jyhjVubeh}(h]h ]h"]h$]h&]uh1jYhj3VhKFhjUubjZ)}(h7``size_t len`` The maximum length of DMA-capable block h](j`)}(h``size_t len``h]j)}(hjWVh]h size_t len}(hjYVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUVubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKGhjQVubjz)}(hhh]h)}(h'The maximum length of DMA-capable blockh]h'The maximum length of DMA-capable block}(hjpVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlVhKGhjmVubah}(h]h ]h"]h$]h&]uh1jyhjQVubeh}(h]h ]h"]h$]h&]uh1jYhjlVhKGhjUubeh}(h]h ]h"]h$]h&]uh1jThjUubh)}(h**Description**h]j?)}(hjVh]h Description}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjVubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKIhjUubh)}(hDetermines the number of entries in **sgl** which would be permitted in DMA-capable transfer if list had been split accordingly, taking into account chaining as well.h](h$Determines the number of entries in }(hjVhhhNhNubj?)}(h**sgl**h]hsgl}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjVubh{ which would be permitted in DMA-capable transfer if list had been split accordingly, taking into account chaining as well.}(hjVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKIhjUubh)}(h **Return**h]j?)}(hjVh]hReturn}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjVubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKMhjUubh)}(h the number of sgl entries neededh]h the number of sgl entries needed}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKNhjUubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_last (C function) c.sg_lasthNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hJstruct scatterlist * sg_last (struct scatterlist *sgl, unsigned int nents)h]j{)}(hHstruct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents)h](j)}(hjh]hstruct}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj WhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK^ubj)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj WhhhjWhK^ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj/WhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,Wubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj1WmodnameN classnameNjj)}j]j)}jsg_lastsb c.sg_lastasbuh1hhj WhhhjWhK^ubj)}(h h]h }(hjPWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj WhhhjWhK^ubj)}(hjh]h*}(hj^WhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj WhhhjWhK^ubj)}(hsg_lasth]j)}(hjMWh]hsg_last}(hjoWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkWubah}(h]h ](jj eh"]h$]h&]jjuh1jhj WhhhjWhK^ubj)}(h-(struct scatterlist *sgl, unsigned int nents)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubj)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjWmodnameN classnameNjj)}j]jKW c.sg_lastasbuh1hhjWubj)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubj)}(hjh]h*}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubj)}(hsglh]hsgl}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjWhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjWubj)}(h h]h }(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubj6)}(hinth]hint}(hjXhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjWubj)}(h h]h }(hj$XhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubj)}(hnentsh]hnents}(hj2XhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjWubeh}(h]h ]h"]h$]h&]jjuh1j hj WhhhjWhK^ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjWhhhjWhK^ubah}(h]jWah ](jjeh"]h$]h&]j j )j huh1jthjWhK^hjWhhubj)}(hhh]h)}(h+return the last scatterlist entry in a listh]h+return the last scatterlist entry in a list}(hj\XhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK^hjYXhhubah}(h]h ]h"]h$]h&]uh1j hjWhhhjWhK^ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jtXj0jtXj1j2j3uh1johhhj"hNhNubj5)}(hX**Parameters** ``struct scatterlist *sgl`` First entry in the scatterlist ``unsigned int nents`` Number of entries in the scatterlist **Description** Should only be used casually, it (currently) scans the entire list to get the last entry. Note that the **sgl** pointer passed in need not be the first one, the important bit is that **nents** denotes the number of entries that exist from **sgl**.h](h)}(h**Parameters**h]j?)}(hj~Xh]h Parameters}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj|Xubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKbhjxXubjU)}(hhh](jZ)}(h;``struct scatterlist *sgl`` First entry in the scatterlist h](j`)}(h``struct scatterlist *sgl``h]j)}(hjXh]hstruct scatterlist *sgl}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK_hjXubjz)}(hhh]h)}(hFirst entry in the scatterlisth]hFirst entry in the scatterlist}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhK_hjXubah}(h]h ]h"]h$]h&]uh1jyhjXubeh}(h]h ]h"]h$]h&]uh1jYhjXhK_hjXubjZ)}(h<``unsigned int nents`` Number of entries in the scatterlist h](j`)}(h``unsigned int nents``h]j)}(hjXh]hunsigned int nents}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK`hjXubjz)}(hhh]h)}(h$Number of entries in the scatterlisth]h$Number of entries in the scatterlist}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhK`hjXubah}(h]h ]h"]h$]h&]uh1jyhjXubeh}(h]h ]h"]h$]h&]uh1jYhjXhK`hjXubeh}(h]h ]h"]h$]h&]uh1jThjxXubh)}(h**Description**h]j?)}(hjYh]h Description}(hjYhhhNhNubah}(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.chKbhjxXubjt$)}(hShould only be used casually, it (currently) scans the entire list to get the last entry. Note that the **sgl** pointer passed in need not be the first one, the important bit is that **nents** denotes the number of entries that exist from **sgl**.h](h)}(hYShould only be used casually, it (currently) scans the entire list to get the last entry.h]hYShould only be used casually, it (currently) scans the entire list to get the last entry.}(hj+YhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKbhj'Yubh)}(hNote that the **sgl** pointer passed in need not be the first one, the important bit is that **nents** denotes the number of entries that exist from **sgl**.h](hNote that the }(hj:YhhhNhNubj?)}(h**sgl**h]hsgl}(hjBYhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj:YubhH pointer passed in need not be the first one, the important bit is that }(hj:YhhhNhNubj?)}(h **nents**h]hnents}(hjTYhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj:Yubh/ denotes the number of entries that exist from }(hj:YhhhNhNubj?)}(h**sgl**h]hsgl}(hjfYhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj:Yubh.}(hj:YhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKehj'Yubeh}(h]h ]h"]h$]h&]uh1js$hj9YhKbhjxXubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_init_table (C function)c.sg_init_tablehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h@void sg_init_table (struct scatterlist *sgl, unsigned int nents)h]j{)}(h?void sg_init_table(struct scatterlist *sgl, unsigned int nents)h](j6)}(hvoidh]hvoid}(hjYhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjYhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKyubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYhhhjYhKyubj)}(h sg_init_tableh]j)}(h sg_init_tableh]h sg_init_table}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubah}(h]h ](jj eh"]h$]h&]jjuh1jhjYhhhjYhKyubj)}(h-(struct scatterlist *sgl, unsigned int nents)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubj)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjZmodnameN classnameNjj)}j]j)}jjYsbc.sg_init_tableasbuh1hhjYubj)}(h h]h }(hj ZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubj)}(hjh]h*}(hj.ZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubj)}(hsglh]hsgl}(hj;ZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjYubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjTZhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjPZubj)}(h h]h }(hjbZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPZubj6)}(hinth]hint}(hjpZhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjPZubj)}(h h]h }(hj~ZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPZubj)}(hnentsh]hnents}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjPZubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjYubeh}(h]h ]h"]h$]h&]jjuh1j hjYhhhjYhKyubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjYhhhjYhKyubah}(h]jYah ](jjeh"]h$]h&]j j )j huh1jthjYhKyhjYhhubj)}(hhh]h)}(hInitialize SG tableh]hInitialize SG table}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKyhjZhhubah}(h]h ]h"]h$]h&]uh1j hjYhhhjYhKyubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jZj0jZj1j2j3uh1johhhj"hNhNubj5)}(h**Parameters** ``struct scatterlist *sgl`` The SG table ``unsigned int nents`` Number of entries in table **Notes** If this is part of a chained sg table, sg_mark_end() should be used only on the last table part.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.chK}hjZubjU)}(hhh](jZ)}(h)``struct scatterlist *sgl`` The SG table h](j`)}(h``struct scatterlist *sgl``h]j)}(hjZh]hstruct scatterlist *sgl}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKzhjZubjz)}(hhh]h)}(h The SG tableh]h The SG table}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj [hKzhj [ubah}(h]h ]h"]h$]h&]uh1jyhjZubeh}(h]h ]h"]h$]h&]uh1jYhj [hKzhjZubjZ)}(h2``unsigned int nents`` Number of entries in table h](j`)}(h``unsigned int nents``h]j)}(hj0[h]hunsigned int nents}(hj2[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.[ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK{hj*[ubjz)}(hhh]h)}(hNumber of entries in tableh]hNumber of entries in table}(hjI[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE[hK{hjF[ubah}(h]h ]h"]h$]h&]uh1jyhj*[ubeh}(h]h ]h"]h$]h&]uh1jYhjE[hK{hjZubeh}(h]h ]h"]h$]h&]uh1jThjZubh)}(h **Notes**h]j?)}(hjk[h]hNotes}(hjm[hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hji[ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK}hjZubjt$)}(h`If this is part of a chained sg table, sg_mark_end() should be used only on the last table part.h]h)}(h`If this is part of a chained sg table, sg_mark_end() should be used only on the last table part.h]h`If this is part of a chained sg table, sg_mark_end() should be used only on the last table part.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chK}hj[ubah}(h]h ]h"]h$]h&]uh1js$hj[hK}hjZubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_init_one (C function) c.sg_init_onehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hOvoid sg_init_one (struct scatterlist *sg, const void *buf, unsigned int buflen)h]j{)}(hNvoid sg_init_one(struct scatterlist *sg, const void *buf, unsigned int buflen)h](j6)}(hvoidh]hvoid}(hj[hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj[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&]uh1jhj[hhhj[hKubj)}(h sg_init_oneh]j)}(h sg_init_oneh]h sg_init_one}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj[hhhj[hKubj)}(h>(struct scatterlist *sg, const void *buf, unsigned int buflen)h](j)}(hstruct scatterlist *sgh](j)}(hjh]hstruct}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[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_init_oneasbuh1hhj[ubj)}(h h]h }(hj5\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(hjh]h*}(hjC\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubj)}(hsgh]hsg}(hjP\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubj)}(hconst void *bufh](j)}(hjh]hconst}(hji\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje\ubj)}(h h]h }(hjv\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje\ubj6)}(hvoidh]hvoid}(hj\hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hje\ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje\ubj)}(hjh]h*}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje\ubj)}(hbufh]hbuf}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhje\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubj)}(hunsigned int buflenh](j6)}(hunsignedh]hunsigned}(hj\hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj\ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubj6)}(hinth]hint}(hj\hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj\ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubj)}(hbuflenh]hbuflen}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[ubeh}(h]h ]h"]h$]h&]jjuh1j hj[hhhj[hKubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj[hhhj[hKubah}(h]j[ah ](jjeh"]h$]h&]j j )j huh1jthj[hKhj[hhubj)}(hhh]h)}(h!Initialize a single entry sg listh]h!Initialize a single entry sg list}(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&]uh1j hj[hhhj[hKubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j@]j0j@]j1j2j3uh1johhhj"hNhNubj5)}(h**Parameters** ``struct scatterlist *sg`` SG entry ``const void *buf`` Virtual address for IO ``unsigned int buflen`` IO lengthh](h)}(h**Parameters**h]j?)}(hjJ]h]h Parameters}(hjL]hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjH]ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjD]ubjU)}(hhh](jZ)}(h$``struct scatterlist *sg`` SG entry h](j`)}(h``struct scatterlist *sg``h]j)}(hji]h]hstruct scatterlist *sg}(hjk]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg]ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjc]ubjz)}(hhh]h)}(hSG entryh]hSG entry}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~]hKhj]ubah}(h]h ]h"]h$]h&]uh1jyhjc]ubeh}(h]h ]h"]h$]h&]uh1jYhj~]hKhj`]ubjZ)}(h+``const void *buf`` Virtual address for IO h](j`)}(h``const void *buf``h]j)}(hj]h]hconst void *buf}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj]ubjz)}(hhh]h)}(hVirtual address for IOh]hVirtual address for IO}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hKhj]ubah}(h]h ]h"]h$]h&]uh1jyhj]ubeh}(h]h ]h"]h$]h&]uh1jYhj]hKhj`]ubjZ)}(h!``unsigned int buflen`` IO lengthh](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj]ubjz)}(hhh]h)}(h IO lengthh]h IO length}(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&]uh1jyhj]ubeh}(h]h ]h"]h$]h&]uh1jYhj]hKhj`]ubeh}(h]h ]h"]h$]h&]uh1jThjD]ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk__sg_free_table (C function)c.__sg_free_tablehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(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{)}(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](j6)}(hvoidh]hvoid}(hj5^hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj1^hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKubj)}(h h]h }(hjD^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1^hhhjC^hKubj)}(h__sg_free_tableh]j)}(h__sg_free_tableh]h__sg_free_table}(hjV^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR^ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj1^hhhjC^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](j)}(hjh]hstruct}(hjr^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn^ubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn^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)}jjX^sbc.__sg_free_tableasbuh1hhjn^ubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn^ubj)}(hjh]h*}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn^ubj)}(htableh]htable}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjn^ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjj^ubj)}(hunsigned int max_entsh](j6)}(hunsignedh]hunsigned}(hj^hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj^ubj)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubj6)}(hinth]hint}(hj_hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj^ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubj)}(hmax_entsh]hmax_ents}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjj^ubj)}(hunsigned int nents_first_chunkh](j6)}(hunsignedh]hunsigned}(hj5_hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj1_ubj)}(h h]h }(hjC_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1_ubj6)}(hinth]hint}(hjQ_hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj1_ubj)}(h h]h }(hj__hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1_ubj)}(hnents_first_chunkh]hnents_first_chunk}(hjm_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjj^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&]uh1jhj_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&]noemphjjuh1jhjj^ubj)}(hunsigned int num_entsh](j6)}(hunsignedh]hunsigned}(hj_hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj_ubj)}(h h]h }(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj6)}(hinth]hint}(hj_hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj_ubj)}(h h]h }(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(hnum_entsh]hnum_ents}(hj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjj^ubeh}(h]h ]h"]h$]h&]jjuh1j hj1^hhhjC^hKubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj-^hhhjC^hKubah}(h]j(^ah ](jjeh"]h$]h&]j j )j huh1jthjC^hKhj*^hhubj)}(hhh]h)}(h!Free a previously mapped sg tableh]h!Free a previously mapped 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&]uh1j hj*^hhhjC^hKubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jU`j0jU`j1j2j3uh1johhhj"hNhNubj5)}(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}(hja`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.chKhjY`ubjU)}(hhh](jZ)}(h6``struct sg_table *table`` The sg table header to use h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjx`ubjz)}(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&]uh1jyhjx`ubeh}(h]h ]h"]h$]h&]uh1jYhj`hKhju`ubjZ)}(hO``unsigned int max_ents`` The maximum number of entries per single scatterlist h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj`ubjz)}(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&]uh1jyhj`ubeh}(h]h ]h"]h$]h&]uh1jYhj`hKhju`ubjZ)}(h``unsigned int nents_first_chunk`` Number of entries int the (preallocated) first scatterlist chunk, 0 means no such preallocated first chunk h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj`ubjz)}(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}(hj ahhhNhNubah}(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&]uh1jyhj`ubeh}(h]h ]h"]h$]h&]uh1jYhjahKhju`ubjZ)}(h&``sg_free_fn *free_fn`` Free function h](j`)}(h``sg_free_fn *free_fn``h]j)}(hj*ah]hsg_free_fn *free_fn}(hj,ahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(aubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj$aubjz)}(hhh]h)}(h Free functionh]h Free function}(hjCahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?ahKhj@aubah}(h]h ]h"]h$]h&]uh1jyhj$aubeh}(h]h ]h"]h$]h&]uh1jYhj?ahKhju`ubjZ)}(h9``unsigned int num_ents`` Number of entries in the table h](j`)}(h``unsigned int num_ents``h]j)}(hjcah]hunsigned int num_ents}(hjeahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaaubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhj]aubjz)}(hhh]h)}(hNumber of entries in the tableh]hNumber of entries in the table}(hj|ahhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxahKhjyaubah}(h]h ]h"]h$]h&]uh1jyhj]aubeh}(h]h ]h"]h$]h&]uh1jYhjxahKhju`ubeh}(h]h ]h"]h$]h&]uh1jThjY`ubh)}(h**Description**h]j?)}(hjah]h Description}(hjahhhNhNubah}(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.chKhjY`ubjt$)}(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 }(hjahhhNhNubj?)}(h **max_ents**h]hmax_ents}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjaubhI value must be identical to that previously used with __sg_alloc_table().}(hjahhhNhNubeh}(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&]uh1js$hjahKhjY`ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk!sg_free_append_table (C function)c.sg_free_append_tablehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h9void sg_free_append_table (struct sg_append_table *table)h]j{)}(h8void sg_free_append_table(struct sg_append_table *table)h](j6)}(hvoidh]hvoid}(hjahhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjahhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKubj)}(h h]h }(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjahhhj bhKubj)}(hsg_free_append_tableh]j)}(hsg_free_append_tableh]hsg_free_append_table}(hj bhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubah}(h]h ](jj eh"]h$]h&]jjuh1jhjahhhj bhKubj)}(h(struct sg_append_table *table)h]j)}(hstruct sg_append_table *tableh](j)}(hjh]hstruct}(hjhjbubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjbubjU)}(hhh]jZ)}(hC``struct sg_append_table *table`` The mapped sg append table headerh](j`)}(h!``struct sg_append_table *table``h]j)}(hjch]hstruct sg_append_table *table}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjbubjz)}(hhh]h)}(h!The mapped sg append table headerh]h!The mapped sg append table header}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKhjcubah}(h]h ]h"]h$]h&]uh1jyhjbubeh}(h]h ]h"]h$]h&]uh1jYhjchKhjbubah}(h]h ]h"]h$]h&]uh1jThjbubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_free_table (C function)c.sg_free_tablehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h+void sg_free_table (struct sg_table *table)h]j{)}(h*void sg_free_table(struct sg_table *table)h](j6)}(hvoidh]hvoid}(hjZchhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjVchhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chKubj)}(h h]h }(hjichhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjVchhhjhchKubj)}(h sg_free_tableh]j)}(h sg_free_tableh]h sg_free_table}(hj{chhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwcubah}(h]h ](jj eh"]h$]h&]jjuh1jhjVchhhjhchKubj)}(h(struct sg_table *table)h]j)}(hstruct sg_table *tableh](j)}(hjh]hstruct}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubh)}(hhh]j)}(hsg_tableh]hsg_table}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjcmodnameN classnameNjj)}j]j)}jj}csbc.sg_free_tableasbuh1hhjcubj)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubj)}(hjh]h*}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubj)}(htableh]htable}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjcubah}(h]h ]h"]h$]h&]jjuh1j hjVchhhjhchKubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjRchhhjhchKubah}(h]jMcah ](jjeh"]h$]h&]j j )j huh1jthjhchKhjOchhubj)}(hhh]h)}(h$Free a previously allocated sg tableh]h$Free a previously allocated sg table}(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&]uh1j hjOchhhjhchKubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j2dj0j2dj1j2j3uh1johhhj"hNhNubj5)}(hG**Parameters** ``struct sg_table *table`` The mapped sg table headerh](h)}(h**Parameters**h]j?)}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj:dubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj6dubjU)}(hhh]jZ)}(h5``struct sg_table *table`` The mapped sg table headerh](j`)}(h``struct sg_table *table``h]j)}(hj[dh]hstruct sg_table *table}(hj]dhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYdubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjUdubjz)}(hhh]h)}(hThe mapped sg table headerh]hThe mapped sg table header}(hjtdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjqdubah}(h]h ]h"]h$]h&]uh1jyhjUdubeh}(h]h ]h"]h$]h&]uh1jYhjpdhMhjRdubah}(h]h ]h"]h$]h&]uh1jThj6dubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk__sg_alloc_table (C function)c.__sg_alloc_tablehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(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{)}(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](j6)}(hinth]hint}(hjdhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjdhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM ubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdhhhjdhM ubj)}(h__sg_alloc_tableh]j)}(h__sg_alloc_tableh]h__sg_alloc_table}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubah}(h]h ](jj eh"]h$]h&]jjuh1jhjdhhhjdhM ubj)}(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](j)}(hjh]hstruct}(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(h h]h }(hjdhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubh)}(hhh]j)}(hsg_tableh]hsg_table}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj eubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjemodnameN classnameNjj)}j]j)}jjdsbc.__sg_alloc_tableasbuh1hhjdubj)}(h h]h }(hj0ehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(hjh]h*}(hj>ehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(htableh]htable}(hjKehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjdehhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj`eubj)}(h h]h }(hjrehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`eubj6)}(hinth]hint}(hjehhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj`eubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`eubj)}(hnentsh]hnents}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj`eubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubj)}(hunsigned int max_entsh](j6)}(hunsignedh]hunsigned}(hjehhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjeubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubj6)}(hinth]hint}(hjehhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjeubj)}(h h]h }(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubj)}(hmax_entsh]hmax_ents}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubj)}(hstruct scatterlist *first_chunkh](j)}(hjh]hstruct}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj$fhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!fubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj&fmodnameN classnameNjj)}j]j,ec.__sg_alloc_tableasbuh1hhjfubj)}(h h]h }(hjBfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(hjh]h*}(hjPfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(h first_chunkh]h first_chunk}(hj]fhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubj)}(hunsigned int nents_first_chunkh](j6)}(hunsignedh]hunsigned}(hjvfhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjrfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrfubj6)}(hinth]hint}(hjfhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjrfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrfubj)}(hnents_first_chunkh]hnents_first_chunk}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrfubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubj)}(hgfp_t gfp_maskh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjfmodnameN classnameNjj)}j]j,ec.__sg_alloc_tableasbuh1hhjfubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubj)}(hgfp_maskh]hgfp_mask}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubj)}(hsg_alloc_fn *alloc_fnh](h)}(hhh]j)}(h sg_alloc_fnh]h sg_alloc_fn}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjgmodnameN classnameNjj)}j]j,ec.__sg_alloc_tableasbuh1hhj gubj)}(h h]h }(hj0ghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj gubj)}(hjh]h*}(hj>ghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj gubj)}(halloc_fnh]halloc_fn}(hjKghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj gubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubeh}(h]h ]h"]h$]h&]jjuh1j hjdhhhjdhM ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjdhhhjdhM ubah}(h]jdah ](jjeh"]h$]h&]j j )j huh1jthjdhM hjdhhubj)}(hhh]h)}(h8Allocate and initialize an sg table with given allocatorh]h8Allocate and initialize an sg table with given allocator}(hjughhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjrghhubah}(h]h ]h"]h$]h&]uh1j hjdhhhjdhM ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jgj0jgj1j2j3uh1johhhj"hNhNubj5)}(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?)}(hjgh]h Parameters}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjgubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjgubjU)}(hhh](jZ)}(h6``struct sg_table *table`` The sg table header to use h](j`)}(h``struct sg_table *table``h]j)}(hjgh]hstruct sg_table *table}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjgubjz)}(hhh]h)}(hThe sg table header to useh]hThe sg table header to use}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghM hjgubah}(h]h ]h"]h$]h&]uh1jyhjgubeh}(h]h ]h"]h$]h&]uh1jYhjghM hjgubjZ)}(h4``unsigned int nents`` Number of entries in sg list h](j`)}(h``unsigned int nents``h]j)}(hjgh]hunsigned int nents}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM hjgubjz)}(hhh]h)}(hNumber of entries in sg listh]hNumber of entries in sg list}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhM hjhubah}(h]h ]h"]h$]h&]uh1jyhjgubeh}(h]h ]h"]h$]h&]uh1jYhjhhM hjgubjZ)}(hW``unsigned int max_ents`` The maximum number of entries the allocator returns per call h](j`)}(h``unsigned int max_ents``h]j)}(hj(hh]hunsigned int max_ents}(hj*hhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&hubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj"hubjz)}(hhh]h)}(hhubah}(h]h ]h"]h$]h&]uh1jyhj"hubeh}(h]h ]h"]h$]h&]uh1jYhj=hhMhjgubjZ)}(hP``struct scatterlist *first_chunk`` first SGL if preallocated (may be ``NULL``) h](j`)}(h#``struct scatterlist *first_chunk``h]j)}(hjahh]hstruct scatterlist *first_chunk}(hjchhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj_hubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj[hubjz)}(hhh]h)}(h+first SGL if preallocated (may be ``NULL``)h](h"first SGL if preallocated (may be }(hjzhhhhNhNubj)}(h``NULL``h]hNULL}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzhubh)}(hjzhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjvhhMhjwhubah}(h]h ]h"]h$]h&]uh1jyhj[hubeh}(h]h ]h"]h$]h&]uh1jYhjvhhMhjgubjZ)}(h``unsigned int nents_first_chunk`` Number of entries in the (preallocated) first scatterlist chunk, 0 means no such preallocated chunk provided by user h](j`)}(h"``unsigned int nents_first_chunk``h]j)}(hjhh]hunsigned int nents_first_chunk}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjhubjz)}(hhh]h)}(htNumber of entries in the (preallocated) first scatterlist chunk, 0 means no such preallocated chunk provided by userh]htNumber of entries in the (preallocated) first scatterlist chunk, 0 means no such preallocated chunk provided by user}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjhubah}(h]h ]h"]h$]h&]uh1jyhjhubeh}(h]h ]h"]h$]h&]uh1jYhjhhMhjgubjZ)}(h'``gfp_t gfp_mask`` GFP allocation mask h](j`)}(h``gfp_t gfp_mask``h]j)}(hjhh]hgfp_t gfp_mask}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjhubjz)}(hhh]h)}(hGFP allocation maskh]hGFP allocation mask}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjhubah}(h]h ]h"]h$]h&]uh1jyhjhubeh}(h]h ]h"]h$]h&]uh1jYhjhhMhjgubjZ)}(h+``sg_alloc_fn *alloc_fn`` Allocator to use h](j`)}(h``sg_alloc_fn *alloc_fn``h]j)}(hjih]hsg_alloc_fn *alloc_fn}(hj!ihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjiubjz)}(hhh]h)}(hAllocator to useh]hAllocator to use}(hj8ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4ihMhj5iubah}(h]h ]h"]h$]h&]uh1jyhjiubeh}(h]h ]h"]h$]h&]uh1jYhj4ihMhjgubeh}(h]h ]h"]h$]h&]uh1jThjgubh)}(h**Description**h]j?)}(hjZih]h Description}(hj\ihhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjXiubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjgubjt$)}(hThis 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**. h]h)}(hThis 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**.h](hThis function returns a }(hjtihhhNhNubj?)}(h **table**h]htable}(hj|ihhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjtiubh }(hjtihhhNhNubj?)}(h **nents**h]hnents}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjtiubhM long. The allocator is defined to return scatterlist chunks of maximum size }(hjtihhhNhNubj?)}(h **max_ents**h]hmax_ents}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjtiubh . Thus if }(hjtihhhNhNubj?)}(h **nents**h]hnents}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjtiubh is bigger than }(hjtihhhNhNubj?)}(h **max_ents**h]hmax_ents}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjtiubh/, the scatterlists will be chained in units of }(hjtihhhNhNubj?)}(h **max_ents**h]hmax_ents}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjtiubh.}(hjtihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjpiubah}(h]h ]h"]h$]h&]uh1js$hjihMhjgubh)}(h **Notes**h]j?)}(hjih]hNotes}(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.chMhjgubjt$)}(hxIf this function returns non-0 (eg failure), the caller must call __sg_free_table() to cleanup any leftover allocations.h]h)}(hxIf this function returns non-0 (eg failure), the caller must call __sg_free_table() to cleanup any leftover allocations.h]hxIf this function returns non-0 (eg failure), the caller must call __sg_free_table() to cleanup any leftover allocations.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj jubah}(h]h ]h"]h$]h&]uh1js$hjjhMhjgubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_alloc_table (C function)c.sg_alloc_tablehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hOint sg_alloc_table (struct sg_table *table, unsigned int nents, gfp_t gfp_mask)h]j{)}(hNint sg_alloc_table(struct sg_table *table, unsigned int nents, gfp_t gfp_mask)h](j6)}(hinth]hint}(hjFjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjBjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMoubj)}(h h]h }(hjUjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBjhhhjTjhMoubj)}(hsg_alloc_tableh]j)}(hsg_alloc_tableh]hsg_alloc_table}(hjgjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcjubah}(h]h ](jj eh"]h$]h&]jjuh1jhjBjhhhjTjhMoubj)}(h<(struct sg_table *table, unsigned int nents, gfp_t gfp_mask)h](j)}(hstruct sg_table *tableh](j)}(hjh]hstruct}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(h h]h }(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubh)}(hhh]j)}(hsg_tableh]hsg_table}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjjmodnameN classnameNjj)}j]j)}jjijsbc.sg_alloc_tableasbuh1hhjjubj)}(h h]h }(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(hjh]h*}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(htableh]htable}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{jubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjjubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj6)}(hinth]hint}(hjkhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjjubj)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj)}(hnentsh]hnents}(hj-khhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{jubj)}(hgfp_t gfp_maskh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjIkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFkubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjKkmodnameN classnameNjj)}j]jjc.sg_alloc_tableasbuh1hhjBkubj)}(h h]h }(hjgkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBkubj)}(hgfp_maskh]hgfp_mask}(hjukhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBkubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj{jubeh}(h]h ]h"]h$]h&]jjuh1j hjBjhhhjTjhMoubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj>jhhhjTjhMoubah}(h]j9jah ](jjeh"]h$]h&]j j )j huh1jthjTjhMohj;jhhubj)}(hhh]h)}(h#Allocate and initialize an sg tableh]h#Allocate and initialize an sg table}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMohjkhhubah}(h]h ]h"]h$]h&]uh1j hj;jhhhjTjhMoubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jkj0jkj1j2j3uh1johhhj"hNhNubj5)}(hX7**Parameters** ``struct sg_table *table`` The sg table header to use ``unsigned int nents`` Number of entries in sg list ``gfp_t gfp_mask`` GFP allocation mask **Description** Allocate and initialize an sg table. If **nents** is larger than SG_MAX_SINGLE_ALLOC a chained sg table will be setup.h](h)}(h**Parameters**h]j?)}(hjkh]h Parameters}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjkubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMshjkubjU)}(hhh](jZ)}(h6``struct sg_table *table`` The sg table header to use h](j`)}(h``struct sg_table *table``h]j)}(hjkh]hstruct sg_table *table}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMphjkubjz)}(hhh]h)}(hThe sg table header to useh]hThe sg table header to use}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMphjkubah}(h]h ]h"]h$]h&]uh1jyhjkubeh}(h]h ]h"]h$]h&]uh1jYhjkhMphjkubjZ)}(h4``unsigned int nents`` Number of entries in sg list h](j`)}(h``unsigned int nents``h]j)}(hjlh]hunsigned int nents}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMqhjlubjz)}(hhh]h)}(hNumber of entries in sg listh]hNumber of entries in sg list}(hj2lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.lhMqhj/lubah}(h]h ]h"]h$]h&]uh1jyhjlubeh}(h]h ]h"]h$]h&]uh1jYhj.lhMqhjkubjZ)}(h'``gfp_t gfp_mask`` GFP allocation mask h](j`)}(h``gfp_t gfp_mask``h]j)}(hjRlh]hgfp_t gfp_mask}(hjTlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPlubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMrhjLlubjz)}(hhh]h)}(hGFP allocation maskh]hGFP allocation mask}(hjklhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjglhMrhjhlubah}(h]h ]h"]h$]h&]uh1jyhjLlubeh}(h]h ]h"]h$]h&]uh1jYhjglhMrhjkubeh}(h]h ]h"]h$]h&]uh1jThjkubh)}(h**Description**h]j?)}(hjlh]h Description}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjlubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMthjkubjt$)}(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 }(hjlhhhNhNubj?)}(h **nents**h]hnents}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjlubhE is larger than SG_MAX_SINGLE_ALLOC a chained sg table will be setup.}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMthjlubah}(h]h ]h"]h$]h&]uh1js$hjlhMthjkubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk-sg_alloc_append_table_from_pages (C function)"c.sg_alloc_append_table_from_pageshNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(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{)}(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](j6)}(hinth]hint}(hjlhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjlhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlhhhjlhMubj)}(h sg_alloc_append_table_from_pagesh]j)}(h sg_alloc_append_table_from_pagesh]h sg_alloc_append_table_from_pages}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj mubah}(h]h ](jj eh"]h$]h&]jjuh1jhjlhhhjlhMubj)}(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](j)}(hjh]hstruct}(hj+mhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'mubj)}(h h]h }(hj8mhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'mubh)}(hhh]j)}(hsg_append_tableh]hsg_append_table}(hjImhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFmubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjKmmodnameN classnameNjj)}j]j)}jjmsb"c.sg_alloc_append_table_from_pagesasbuh1hhj'mubj)}(h h]h }(hjimhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'mubj)}(hjh]h*}(hjwmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'mubj)}(h sgt_appendh]h sgt_append}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'mubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj#mubj)}(hstruct page **pagesh](j)}(hjh]hstruct}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubh)}(hhh]j)}(hpageh]hpage}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmmodnameN classnameNjj)}j]jem"c.sg_alloc_append_table_from_pagesasbuh1hhjmubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj)}(hjh]h*}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj)}(hjh]h*}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubj)}(hpagesh]hpages}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj#mubj)}(hunsigned int n_pagesh](j6)}(hunsignedh]hunsigned}(hjnhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjnubj)}(h h]h }(hj(nhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj6)}(hinth]hint}(hj6nhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjnubj)}(h h]h }(hjDnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj)}(hn_pagesh]hn_pages}(hjRnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj#mubj)}(hunsigned int offseth](j6)}(hunsignedh]hunsigned}(hjknhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjgnubj)}(h h]h }(hjynhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgnubj6)}(hinth]hint}(hjnhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjgnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgnubj)}(hoffseth]hoffset}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgnubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj#mubj)}(hunsigned long sizeh](j6)}(hunsignedh]hunsigned}(hjnhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj6)}(hlongh]hlong}(hjnhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjnubj)}(h h]h }(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubj)}(hsizeh]hsize}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjnubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj#mubj)}(hunsigned int max_segmenth](j6)}(hunsignedh]hunsigned}(hj ohhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj oubj)}(h h]h }(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj oubj6)}(hinth]hint}(hj)ohhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj oubj)}(h h]h }(hj7ohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj oubj)}(h max_segmenth]h max_segment}(hjEohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj oubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj#mubj)}(hunsigned int left_pagesh](j6)}(hunsignedh]hunsigned}(hj^ohhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjZoubj)}(h h]h }(hjlohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZoubj6)}(hinth]hint}(hjzohhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjZoubj)}(h h]h }(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZoubj)}(h left_pagesh]h left_pages}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZoubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj#mubj)}(hgfp_t gfp_maskh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjomodnameN classnameNjj)}j]jem"c.sg_alloc_append_table_from_pagesasbuh1hhjoubj)}(h h]h }(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubj)}(hgfp_maskh]hgfp_mask}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj#mubeh}(h]h ]h"]h$]h&]jjuh1j hjlhhhjlhMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjlhhhjlhMubah}(h]jlah ](jjeh"]h$]h&]j j )j huh1jthjlhMhjlhhubj)}(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}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjphhubah}(h]h ]h"]h$]h&]uh1j hjlhhhjlhMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j pj0j pj1j2j3uh1johhhj"hNhNubj5)}(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?)}(hj*ph]h Parameters}(hj,phhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj(pubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj$pubjU)}(hhh](jZ)}(hB``struct sg_append_table *sgt_append`` The sg append table to use h](j`)}(h&``struct sg_append_table *sgt_append``h]j)}(hjIph]h"struct sg_append_table *sgt_append}(hjKphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGpubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjCpubjz)}(hhh]h)}(hThe sg append table to useh]hThe sg append table to use}(hjbphhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^phMhj_pubah}(h]h ]h"]h$]h&]uh1jyhjCpubeh}(h]h ]h"]h$]h&]uh1jYhj^phMhj@pubjZ)}(h=``struct page **pages`` Pointer to an array of page pointers h](j`)}(h``struct page **pages``h]j)}(hjph]hstruct page **pages}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj|pubjz)}(hhh]h)}(h$Pointer to an array of page pointersh]h$Pointer to an array of page pointers}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphMhjpubah}(h]h ]h"]h$]h&]uh1jyhj|pubeh}(h]h ]h"]h$]h&]uh1jYhjphMhj@pubjZ)}(h<``unsigned int n_pages`` Number of pages in the pages array h](j`)}(h``unsigned int n_pages``h]j)}(hjph]hunsigned int n_pages}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjpubjz)}(hhh]h)}(h"Number of pages in the pages arrayh]h"Number of pages in the pages array}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphMhjpubah}(h]h ]h"]h$]h&]uh1jyhjpubeh}(h]h ]h"]h$]h&]uh1jYhjphMhj@pubjZ)}(hU``unsigned int offset`` Offset from start of the first page to the start of a buffer h](j`)}(h``unsigned int offset``h]j)}(hjph]hunsigned int offset}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjpubjz)}(hhh]h)}(hhjrubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj$pubjt$)}(hXIn 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 h]h)}(hXIn 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_tableh](hIn 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 }(hj-rhhhNhNubj?)}(h**max_segment**h]h max_segment}(hj5rhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj-rubh. 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}(hj-rhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj)rubah}(h]h ]h"]h$]h&]uh1js$hjMrhMhj$pubh)}(h **Return**h]j?)}(hjVrh]hReturn}(hjXrhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjTrubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj$pubh)}(h'0 on success, negative error on failureh]h'0 on success, negative error on failure}(hjlrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj$pubh)}(h **Notes**h]j?)}(hj}rh]hNotes}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj{rubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj$pubjt$)}(hIf 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}If this function returns non-0 (eg failure), the caller must call sg_free_append_table() to cleanup any leftover allocations.h]h}If this function returns non-0 (eg failure), the caller must call sg_free_append_table() to cleanup any leftover allocations.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjrubh)}(h1In the fist call, sgt_append must by initialized.h]h1In the fist call, sgt_append must by initialized.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjrubeh}(h]h ]h"]h$]h&]uh1js$hjrhMhj$pubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk.sg_alloc_table_from_pages_segment (C function)#c.sg_alloc_table_from_pages_segmenthNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hint sg_alloc_table_from_pages_segment (struct sg_table *sgt, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, unsigned int max_segment, gfp_t gfp_mask)h]j{)}(hint sg_alloc_table_from_pages_segment(struct sg_table *sgt, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, unsigned int max_segment, gfp_t gfp_mask)h](j6)}(hinth]hint}(hjrhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjrhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM/ubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrhhhjrhM/ubj)}(h!sg_alloc_table_from_pages_segmenth]j)}(h!sg_alloc_table_from_pages_segmenth]h!sg_alloc_table_from_pages_segment}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjrubah}(h]h ](jj eh"]h$]h&]jjuh1jhjrhhhjrhM/ubj)}(h(struct sg_table *sgt, struct page **pages, unsigned int n_pages, unsigned int offset, unsigned long size, unsigned int max_segment, gfp_t gfp_mask)h](j)}(hstruct sg_table *sgth](j)}(hjh]hstruct}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(h h]h }(hj%shhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubh)}(hhh]j)}(hsg_tableh]hsg_table}(hj6shhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj3subah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj8smodnameN classnameNjj)}j]j)}jjrsb#c.sg_alloc_table_from_pages_segmentasbuh1hhjsubj)}(h h]h }(hjVshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(hjh]h*}(hjdshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(hsgth]hsgt}(hjqshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjsubj)}(hstruct page **pagesh](j)}(hjh]hstruct}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubh)}(hhh]j)}(hpageh]hpage}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjsmodnameN classnameNjj)}j]jRs#c.sg_alloc_table_from_pages_segmentasbuh1hhjsubj)}(h h]h }(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(hjh]h*}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(hjh]h*}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj)}(hpagesh]hpages}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjsubj)}(hunsigned int n_pagesh](j6)}(hunsignedh]hunsigned}(hjthhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjtubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj6)}(hinth]hint}(hj#thhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjtubj)}(h h]h }(hj1thhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(hn_pagesh]hn_pages}(hj?thhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjsubj)}(hunsigned int offseth](j6)}(hunsignedh]hunsigned}(hjXthhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjTtubj)}(h h]h }(hjfthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTtubj6)}(hinth]hint}(hjtthhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjTtubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTtubj)}(hoffseth]hoffset}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjsubj)}(hunsigned long sizeh](j6)}(hunsignedh]hunsigned}(hjthhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjtubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj6)}(hlongh]hlong}(hjthhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjtubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(hsizeh]hsize}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjsubj)}(hunsigned int max_segmenth](j6)}(hunsignedh]hunsigned}(hjthhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjtubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj6)}(hinth]hint}(hjuhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjtubj)}(h h]h }(hj$uhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubj)}(h max_segmenth]h max_segment}(hj2uhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjsubj)}(hgfp_t gfp_maskh](h)}(hhh]j)}(hgfp_th]hgfp_t}(hjNuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKuubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjPumodnameN classnameNjj)}j]jRs#c.sg_alloc_table_from_pages_segmentasbuh1hhjGuubj)}(h h]h }(hjluhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGuubj)}(hgfp_maskh]hgfp_mask}(hjzuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGuubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjsubeh}(h]h ]h"]h$]h&]jjuh1j hjrhhhjrhM/ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjrhhhjrhM/ubah}(h]jrah ](jjeh"]h$]h&]j j )j huh1jthjrhM/hjrhhubj)}(hhh]h)}(hUAllocate and initialize an sg table from an array of pages and given maximum segment.h]hUAllocate and initialize an sg table from an array of pages and given maximum segment.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM/hjuhhubah}(h]h ]h"]h$]h&]uh1j hjrhhhjrhM/ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/juj0juj1j2j3uh1johhhj"hNhNubj5)}(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) ``unsigned int max_segment`` Maximum size of a scatterlist element in bytes ``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 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. **Return** 0 on success, negative error on failureh](h)}(h**Parameters**h]j?)}(hjuh]h Parameters}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjuubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM3hjuubjU)}(hhh](jZ)}(h4``struct sg_table *sgt`` The sg table header to use h](j`)}(h``struct sg_table *sgt``h]j)}(hjuh]hstruct sg_table *sgt}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM2hjuubjz)}(hhh]h)}(hThe sg table header to useh]hThe sg table header to use}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhM2hjuubah}(h]h ]h"]h$]h&]uh1jyhjuubeh}(h]h ]h"]h$]h&]uh1jYhjuhM2hjuubjZ)}(h=``struct page **pages`` Pointer to an array of page pointers h](j`)}(h``struct page **pages``h]j)}(hjvh]hstruct page **pages}(hj vhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM3hjvubjz)}(hhh]h)}(h$Pointer to an array of page pointersh]h$Pointer to an array of page pointers}(hj7vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3vhM3hj4vubah}(h]h ]h"]h$]h&]uh1jyhjvubeh}(h]h ]h"]h$]h&]uh1jYhj3vhM3hjuubjZ)}(h<``unsigned int n_pages`` Number of pages in the pages array h](j`)}(h``unsigned int n_pages``h]j)}(hjWvh]hunsigned int n_pages}(hjYvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjUvubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM4hjQvubjz)}(hhh]h)}(h"Number of pages in the pages arrayh]h"Number of pages in the pages array}(hjpvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlvhM4hjmvubah}(h]h ]h"]h$]h&]uh1jyhjQvubeh}(h]h ]h"]h$]h&]uh1jYhjlvhM4hjuubjZ)}(hU``unsigned int offset`` Offset from start of the first page to the start of a buffer h](j`)}(h``unsigned int offset``h]j)}(hjvh]hunsigned int offset}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM5hjvubjz)}(hhh]h)}(hhjtwubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM:hjuubjt$)}(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 }(hjwhhhNhNubj?)}(h**max_segment**h]h max_segment}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjwubhk. A user may provide an offset at a start and a size of valid data in a buffer specified by the page array.}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM:hjwubh)}(h3The returned sg table is released by sg_free_table.h]h3The returned sg table is released by sg_free_table.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM?hjwubeh}(h]h ]h"]h$]h&]uh1js$hjwhM:hjuubh)}(h **Return**h]j?)}(hjwh]hReturn}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjwubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMAhjuubh)}(h'0 on success, negative error on failureh]h'0 on success, negative error on failure}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMBhjuubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksgl_alloc_order (C function)c.sgl_alloc_orderhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hstruct scatterlist * sgl_alloc_order (unsigned long long length, unsigned int order, bool chainable, gfp_t gfp, unsigned int *nent_p)h]j{)}(hstruct scatterlist *sgl_alloc_order(unsigned long long length, unsigned int order, bool chainable, gfp_t gfp, unsigned int *nent_p)h](j)}(hjh]hstruct}(hj xhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj xhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM\ubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj xhhhjxhM\ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hj,xhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)xubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj.xmodnameN classnameNjj)}j]j)}jsgl_alloc_ordersbc.sgl_alloc_orderasbuh1hhj xhhhjxhM\ubj)}(h h]h }(hjMxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj xhhhjxhM\ubj)}(hjh]h*}(hj[xhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj xhhhjxhM\ubj)}(hsgl_alloc_orderh]j)}(hjJxh]hsgl_alloc_order}(hjlxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhxubah}(h]h ](jj eh"]h$]h&]jjuh1jhj xhhhjxhM\ubj)}(h`(unsigned long long length, unsigned int order, bool chainable, gfp_t gfp, unsigned int *nent_p)h](j)}(hunsigned long long lengthh](j6)}(hunsignedh]hunsigned}(hjxhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjxubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj6)}(hlongh]hlong}(hjxhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjxubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj6)}(hlongh]hlong}(hjxhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjxubj)}(h h]h }(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj)}(hlengthh]hlength}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjxubj)}(hunsigned int orderh](j6)}(hunsignedh]hunsigned}(hjxhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjxubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj6)}(hinth]hint}(hjyhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjxubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubj)}(horderh]horder}(hj,yhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjxubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjxubj)}(hbool chainableh](j6)}(hj5h]hbool}(hjEyhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjAyubj)}(h h]h }(hjRyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAyubj)}(h chainableh]h chainable}(hj`yhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjAyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjxubj)}(h gfp_t gfph](h)}(hhh]j)}(hgfp_th]hgfp_t}(hj|yhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyyubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj~ymodnameN classnameNjj)}j]jHxc.sgl_alloc_orderasbuh1hhjuyubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuyubj)}(hgfph]hgfp}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjxubj)}(hunsigned int *nent_ph](j6)}(hunsignedh]hunsigned}(hjyhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjyubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj6)}(hinth]hint}(hjyhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjyubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj)}(hjh]h*}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubj)}(hnent_ph]hnent_p}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjxubeh}(h]h ]h"]h$]h&]jjuh1j hj xhhhjxhM\ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjxhhhjxhM\ubah}(h]jxah ](jjeh"]h$]h&]j j )j huh1jthjxhM\hjxhhubj)}(hhh]h)}(h$allocate a scatterlist and its pagesh]h$allocate a scatterlist and its pages}(hj0zhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM\hj-zhhubah}(h]h ]h"]h$]h&]uh1j hjxhhhjxhM\ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jHzj0jHzj1j2j3uh1johhhj"hNhNubj5)}(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?)}(hjRzh]h Parameters}(hjTzhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjPzubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM`hjLzubjU)}(hhh](jZ)}(hW``unsigned long long length`` Length in bytes of the scatterlist. Must be at least one h](j`)}(h``unsigned long long length``h]j)}(hjqzh]hunsigned long long length}(hjszhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjozubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM]hjkzubjz)}(hhh]h)}(h8Length in bytes of the scatterlist. Must be at least oneh]h8Length in bytes of the scatterlist. Must be at least one}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhM]hjzubah}(h]h ]h"]h$]h&]uh1jyhjkzubeh}(h]h ]h"]h$]h&]uh1jYhjzhM]hjhzubjZ)}(h9``unsigned int order`` Second argument for alloc_pages() h](j`)}(h``unsigned int order``h]j)}(hjzh]hunsigned int order}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM^hjzubjz)}(hhh]h)}(h!Second argument for alloc_pages()h]h!Second argument for alloc_pages()}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhM^hjzubah}(h]h ]h"]h$]h&]uh1jyhjzubeh}(h]h ]h"]h$]h&]uh1jYhjzhM^hjhzubjZ)}(ht``bool chainable`` Whether or not to allocate an extra element in the scatterlist for scatterlist chaining purposes h](j`)}(h``bool chainable``h]j)}(hjzh]hbool chainable}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM`hjzubjz)}(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}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM_hjzubah}(h]h ]h"]h$]h&]uh1jyhjzubeh}(h]h ]h"]h$]h&]uh1jYhjzhM`hjhzubjZ)}(h&``gfp_t gfp`` Memory allocation flags h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMahj{ubjz)}(hhh]h)}(hMemory allocation flagsh]hMemory allocation flags}(hj6{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2{hMahj3{ubah}(h]h ]h"]h$]h&]uh1jyhj{ubeh}(h]h ]h"]h$]h&]uh1jYhj2{hMahjhzubjZ)}(hT``unsigned int *nent_p`` [out] Number of entries in the scatterlist that have pages h](j`)}(h``unsigned int *nent_p``h]j)}(hjV{h]hunsigned int *nent_p}(hjX{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT{ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMbhjP{ubjz)}(hhh]h)}(h:[out] Number of entries in the scatterlist that have pagesh]h:[out] Number of entries in the scatterlist that have pages}(hjo{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjk{hMbhjl{ubah}(h]h ]h"]h$]h&]uh1jyhjP{ubeh}(h]h ]h"]h$]h&]uh1jYhjk{hMbhjhzubeh}(h]h ]h"]h$]h&]uh1jThjLzubh)}(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.chMdhjLzubh)}(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.chMdhjLzubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksgl_alloc (C function) c.sgl_allochNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h[struct scatterlist * sgl_alloc (unsigned long long length, gfp_t gfp, unsigned int *nent_p)h]j{)}(hYstruct scatterlist *sgl_alloc(unsigned long long length, gfp_t gfp, unsigned int *nent_p)h](j)}(hjh]hstruct}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{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&]uh1jhj{hhhj{hMubh)}(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)}j sgl_allocsb c.sgl_allocasbuh1hhj{hhhj{hMubj)}(h h]h }(hj(|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{hhhj{hMubj)}(hjh]h*}(hj6|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{hhhj{hMubj)}(h sgl_alloch]j)}(hj%|h]h sgl_alloc}(hjG|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjC|ubah}(h]h ](jj eh"]h$]h&]jjuh1jhj{hhhj{hMubj)}(h<(unsigned long long length, gfp_t gfp, unsigned int *nent_p)h](j)}(hunsigned long long lengthh](j6)}(hunsignedh]hunsigned}(hjb|hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj^|ubj)}(h h]h }(hjp|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^|ubj6)}(hlongh]hlong}(hj~|hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj^|ubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^|ubj6)}(hlongh]hlong}(hj|hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj^|ubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^|ubj)}(hlengthh]hlength}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjZ|ubj)}(h gfp_t gfph](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.sgl_allocasbuh1hhj|ubj)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubj)}(hgfph]hgfp}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjZ|ubj)}(hunsigned int *nent_ph](j6)}(hunsignedh]hunsigned}(hj}hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj}ubj)}(h h]h }(hj%}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubj6)}(hinth]hint}(hj3}hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj}ubj)}(h h]h }(hjA}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubj)}(hjh]h*}(hjO}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubj)}(hnent_ph]hnent_p}(hj\}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjZ|ubeh}(h]h ]h"]h$]h&]jjuh1j hj{hhhj{hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj{hhhj{hMubah}(h]j{ah ](jjeh"]h$]h&]j j )j huh1jthj{hMhj{hhubj)}(hhh]h)}(h$allocate a scatterlist and its pagesh]h$allocate 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&]uh1j hj{hhhj{hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j}j0j}j1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chMhj}ubjU)}(hhh](jZ)}(hA``unsigned long long length`` Length in bytes of the scatterlist h](j`)}(h``unsigned long long length``h]j)}(hj}h]hunsigned long long length}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj}ubjz)}(hhh]h)}(h"Length in bytes of the scatterlisth]h"Length in bytes of the scatterlist}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj}ubah}(h]h ]h"]h$]h&]uh1jyhj}ubeh}(h]h ]h"]h$]h&]uh1jYhj}hMhj}ubjZ)}(h&``gfp_t gfp`` Memory allocation flags h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj}ubjz)}(hhh]h)}(hMemory allocation flagsh]hMemory allocation flags}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hMhj~ubah}(h]h ]h"]h$]h&]uh1jyhj}ubeh}(h]h ]h"]h$]h&]uh1jYhj~hMhj}ubjZ)}(hD``unsigned int *nent_p`` [out] Number of entries in the scatterlist h](j`)}(h``unsigned int *nent_p``h]j)}(hj9~h]hunsigned int *nent_p}(hj;~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7~ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj3~ubjz)}(hhh]h)}(h*[out] Number of entries in the scatterlisth]h*[out] Number of entries in the scatterlist}(hjR~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjN~hMhjO~ubah}(h]h ]h"]h$]h&]uh1jyhj3~ubeh}(h]h ]h"]h$]h&]uh1jYhjN~hMhj}ubeh}(h]h ]h"]h$]h&]uh1jThj}ubh)}(h **Return**h]j?)}(hjt~h]hReturn}(hjv~hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjr~ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj}ubh)}(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.chMhj}ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksgl_free_n_order (C function)c.sgl_free_n_orderhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hEvoid sgl_free_n_order (struct scatterlist *sgl, int nents, int order)h]j{)}(hDvoid sgl_free_n_order(struct scatterlist *sgl, int nents, int order)h](j6)}(hvoidh]hvoid}(hj~hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj~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&]uh1jhj~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 ](jj eh"]h$]h&]jjuh1jhj~hhhj~hMubj)}(h/(struct scatterlist *sgl, int nents, int order)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(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_n_orderasbuh1hhjubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsglh]hsgl}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h int nentsh](j6)}(hinth]hint}(hjzhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjvubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h int orderh](j6)}(hinth]hint}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(horderh]horder}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1j hj~hhhj~hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj~hhhj~hMubah}(h]j~ah ](jjeh"]h$]h&]j j )j huh1jthj~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&]uh1j hj~hhhj~hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j j0j j1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chMhjubjU)}(hhh](jZ)}(hB``struct scatterlist *sgl`` Scatterlist with one or more elements h](j`)}(h``struct scatterlist *sgl``h]j)}(hj6h]hstruct scatterlist *sgl}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj0ubjz)}(hhh]h)}(h%Scatterlist with one or more elementsh]h%Scatterlist with one or more elements}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMhjLubah}(h]h ]h"]h$]h&]uh1jyhj0ubeh}(h]h ]h"]h$]h&]uh1jYhjKhMhj-ubjZ)}(h1``int nents`` Maximum number of elements to free h](j`)}(h ``int nents``h]j)}(hjoh]h int nents}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjiubjz)}(hhh]h)}(h"Maximum number of elements to freeh]h"Maximum number of elements to free}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjiubeh}(h]h ]h"]h$]h&]uh1jYhjhMhj-ubjZ)}(h1``int order`` Second argument for __free_pages() h](j`)}(h ``int order``h]j)}(hjh]h int order}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(h"Second argument for __free_pages()h]h"Second argument for __free_pages()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhj-ubeh}(h]h ]h"]h$]h&]uh1jThjubh)}(h **Notes**h]j?)}(hjh]hNotes}(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.chMhjubj6)}(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.}(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&]uh1j:hjubj;)}(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 }(hjhhhNhNubj?)}(h **nents**h]hnents}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh to a high number.}(hjhhhNhNubeh}(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:hjubeh}(h]h ]h"]h$]h&]jjuh1j5hjhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksgl_free_order (C function)c.sgl_free_orderhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h8void sgl_free_order (struct scatterlist *sgl, int order)h]j{)}(h7void sgl_free_order(struct scatterlist *sgl, int order)h](j6)}(hvoidh]hvoid}(hjfhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjbhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbhhhjthMubj)}(hsgl_free_orderh]j)}(hsgl_free_orderh]hsgl_free_order}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]h$]h&]jjuh1jhjbhhhjthMubj)}(h$(struct scatterlist *sgl, int order)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjÁmodnameN classnameNjj)}j]j)}jjsbc.sgl_free_orderasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h int orderh](j6)}(hinth]hint}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(horderh]horder}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1j hjbhhhjthMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj^hhhjthMubah}(h]jYah ](jjeh"]h$]h&]j j )j huh1jthjthMhj[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.chMhjXhhubah}(h]h ]h"]h$]h&]uh1j hj[hhhjthMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jsj0jsj1j2j3uh1johhhj"hNhNubj5)}(h**Parameters** ``struct scatterlist *sgl`` Scatterlist with one or more elements ``int order`` Second argument for __free_pages()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.chMhjwubjU)}(hhh](jZ)}(hB``struct scatterlist *sgl`` Scatterlist with one or more elements h](j`)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(h0``int order`` Second argument for __free_pages()h](j`)}(h ``int order``h]j)}(hjՂh]h int order}(hjׂhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjӂubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjςubjz)}(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&]uh1jyhjςubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubeh}(h]h ]h"]h$]h&]uh1jThjwubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksgl_free (C function) c.sgl_freehNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h'void sgl_free (struct scatterlist *sgl)h]j{)}(h&void sgl_free(struct scatterlist *sgl)h](j6)}(hvoidh]hvoid}(hj/hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj+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&]uh1jhj+hhhj=hMubj)}(hsgl_freeh]j)}(hsgl_freeh]hsgl_free}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLubah}(h]h ](jj eh"]h$]h&]jjuh1jhj+hhhj=hMubj)}(h(struct scatterlist *sgl)h]j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubj)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjRsb c.sgl_freeasbuh1hhjhubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubj)}(hsglh]hsgl}(hjŃhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjdubah}(h]h ]h"]h$]h&]jjuh1j hj+hhhj=hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj'hhhj=hMubah}(h]j"ah ](jjeh"]h$]h&]j j )j huh1jthj=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&]uh1j hj$hhhj=hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jj0jj1j2j3uh1johhhj"hNhNubj5)}(hS**Parameters** ``struct scatterlist *sgl`` Scatterlist with one or more elementsh](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.chMhj ubjU)}(hhh]jZ)}(hA``struct scatterlist *sgl`` Scatterlist with one or more elementsh](j`)}(h``struct scatterlist *sgl``h]j)}(hj0h]hstruct scatterlist *sgl}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj*ubjz)}(hhh]h)}(h%Scatterlist with one or more elementsh]h%Scatterlist with one or more elements}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjFubah}(h]h ]h"]h$]h&]uh1jyhj*ubeh}(h]h ]h"]h$]h&]uh1jYhjEhMhj'ubah}(h]h ]h"]h$]h&]uh1jThj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_miter_start (C function)c.sg_miter_starthNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(htvoid sg_miter_start (struct sg_mapping_iter *miter, struct scatterlist *sgl, unsigned int nents, unsigned int flags)h]j{)}(hsvoid sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, unsigned int nents, unsigned int flags)h](j6)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(hsg_miter_starth]j)}(hsg_miter_starth]hsg_miter_start}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]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](j)}(hjh]hstruct}(hjDŽhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjÄubj)}(h h]h }(hjԄhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjÄubh)}(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)}jjsbc.sg_miter_startasbuh1hhjÄubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjÄubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjÄubj)}(hmiterh]hmiter}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjÄubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjYmodnameN classnameNjj)}j]jc.sg_miter_startasbuh1hhj5ubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hinth]hint}(hjŅhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjӅhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int flagsh](j6)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hinth]hint}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hflagsh]hflags}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1j hjhhhjhMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjhhhjhMubah}(h]j}ah ](jjeh"]h$]h&]j j )j huh1jthjhMhjhhubj)}(hhh]h)}(h&start mapping iteration over a sg listh]h&start mapping iteration over 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&]uh1j hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jtj0jtj1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chMhjxubjU)}(hhh](jZ)}(h@``struct sg_mapping_iter *miter`` sg mapping iter to be started h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(hsg mapping iter to be startedh]hsg mapping iter to be started}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(h4``struct scatterlist *sgl`` sg list to iterate over h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjІubjz)}(hhh]h)}(hsg list to iterate overh]hsg list to iterate over}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjІubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(h,``unsigned int nents`` number of sg entries h](j`)}(h``unsigned int nents``h]j)}(hjh]hunsigned int nents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj ubjz)}(hhh]h)}(hnumber of sg entriesh]hnumber of sg entries}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj%ubah}(h]h ]h"]h$]h&]uh1jyhj ubeh}(h]h ]h"]h$]h&]uh1jYhj$hMhjubjZ)}(h)``unsigned int flags`` sg iterator flags h](j`)}(h``unsigned int flags``h]j)}(hjHh]hunsigned int flags}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjBubjz)}(hhh]h)}(hsg iterator flagsh]hsg iterator flags}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hMhj^ubah}(h]h ]h"]h$]h&]uh1jyhjBubeh}(h]h ]h"]h$]h&]uh1jYhj]hMhjubeh}(h]h ]h"]h$]h&]uh1jThjxubh)}(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.chMhjxubjt$)}(h#Starts mapping iterator **miter**. h]h)}(h"Starts mapping iterator **miter**.h](hStarts mapping iterator }(hjhhhNhNubj?)}(h **miter**h]hmiter}(hjhhhNhNubah}(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.chMhjubah}(h]h ]h"]h$]h&]uh1js$hjhMhjxubh)}(h **Context**h]j?)}(hjƇh]hContext}(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.chMhjxubh)}(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.chMhjxubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_miter_skip (C function)c.sg_miter_skiphNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h@bool sg_miter_skip (struct sg_mapping_iter *miter, off_t offset)h]j{)}(h?bool sg_miter_skip(struct sg_mapping_iter *miter, off_t offset)h](j6)}(hj5h]hbool}(hj hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMEubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMEubj)}(h sg_miter_skiph]j)}(h sg_miter_skiph]h sg_miter_skip}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubah}(h]h ](jj eh"]h$]h&]jjuh1jhjhhhjhMEubj)}(h-(struct sg_mapping_iter *miter, off_t offset)h](j)}(hstruct sg_mapping_iter *miterh](j)}(hjh]hstruct}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubj)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubh)}(hhh]j)}(hsg_mapping_iterh]hsg_mapping_iter}(hjehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjgmodnameN classnameNjj)}j]j)}jj-sbc.sg_miter_skipasbuh1hhjCubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubj)}(hmiterh]hmiter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj?ubj)}(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_skipasbuh1hhjubj)}(h h]h }(hjڈhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hoffseth]hoffset}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj?ubeh}(h]h ]h"]h$]h&]jjuh1j hjhhhjhMEubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjhhhjhMEubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jthjhMEhjhhubj)}(hhh]h)}(hreposition mapping iteratorh]hreposition mapping iterator}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMEhjhhubah}(h]h ]h"]h$]h&]uh1j hjhhhjhMEubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j*j0j*j1j2j3uh1johhhj"hNhNubj5)}(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?)}(hj4h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj2ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMIhj.ubjU)}(hhh](jZ)}(h@``struct sg_mapping_iter *miter`` sg mapping iter to be skipped h](j`)}(h!``struct sg_mapping_iter *miter``h]j)}(hjSh]hstruct sg_mapping_iter *miter}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMFhjMubjz)}(hhh]h)}(hsg mapping iter to be skippedh]hsg mapping iter to be skipped}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMFhjiubah}(h]h ]h"]h$]h&]uh1jyhjMubeh}(h]h ]h"]h$]h&]uh1jYhjhhMFhjJubjZ)}(h>``off_t offset`` number of bytes to plus the current location h](j`)}(h``off_t offset``h]j)}(hjh]h off_t offset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMGhjubjz)}(hhh]h)}(h,number of bytes to plus the current locationh]h,number of bytes to plus the current location}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMGhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMGhjJubeh}(h]h ]h"]h$]h&]uh1jThj.ubh)}(h**Description**h]j?)}(hjljh]h Description}(hjɉhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjʼnubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMIhj.ubjt$)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh bytes. If mapping iterator }(hjhhhNhNubj?)}(h **miter**h]hmiter}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh3 has been proceeded by sg_miter_next(), this stops }(hjhhhNhNubj?)}(h **miter**h]hmiter}(hjhhhNhNubah}(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.chMIhj݉ubah}(h]h ]h"]h$]h&]uh1js$hj7hMIhj.ubh)}(h **Context**h]j?)}(hj@h]hContext}(hjBhhhNhNubah}(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.chMMhj.ubh)}(h Don't care.h]h Don’t care.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMNhj.ubh)}(h **Return**h]j?)}(hjgh]hReturn}(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.chMPhj.ubh)}(hRtrue if **miter** contains the valid mapping. false if end of sg list is reached.h](htrue if }(hj}hhhNhNubj?)}(h **miter**h]hmiter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj}ubhA contains the valid mapping. false if end of sg list is reached.}(hj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMQhj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_miter_next (C function)c.sg_miter_nexthNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h2bool sg_miter_next (struct sg_mapping_iter *miter)h]j{)}(h1bool sg_miter_next(struct sg_mapping_iter *miter)h](j6)}(hj5h]hbool}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMjubj)}(h h]h }(hj̊hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjˊhMjubj)}(h sg_miter_nexth]j)}(h sg_miter_nexth]h sg_miter_next}(hjފhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjڊubah}(h]h ](jj eh"]h$]h&]jjuh1jhjhhhjˊhMjubj)}(h(struct sg_mapping_iter *miter)h]j)}(hstruct sg_mapping_iter *miterh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(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)}jjsbc.sg_miter_nextasbuh1hhjubj)}(h h]h }(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hmiterh]hmiter}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1j hjhhhjˊhMjubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjhhhjˊhMjubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jthjˊhMjhjhhubj)}(hhh]h)}(h,proceed mapping iterator to the next mappingh]h,proceed mapping iterator to the next mapping}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMjhjzhhubah}(h]h ]h"]h$]h&]uh1j hjhhhjˊhMjubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jj0jj1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chMnhjubjU)}(hhh]jZ)}(h=``struct sg_mapping_iter *miter`` sg mapping iter to proceed h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMkhjubjz)}(hhh]h)}(hsg mapping iter to proceedh]hsg mapping iter to proceed}(hj׋hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjӋhMkhjԋubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjӋhMkhjubah}(h]h ]h"]h$]h&]uh1jThjubh)}(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.chMmhjubjt$)}(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 }(hjhhhNhNubj?)}(h **miter**h]hmiter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh to the next mapping. }(hjhhhNhNubj?)}(h **miter**h]hmiter}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubhI should have been started using sg_miter_start(). On successful return, }(hjhhhNhNubj?)}(h**miter->page**h]h miter->page}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh, }(hjhhhNhNubj?)}(h**miter->addr**h]h miter->addr}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh and }(hjhhhNhNubj?)}(h**miter->length**h]h miter->length}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh point to the current mapping.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMmhjubah}(h]h ]h"]h$]h&]uh1js$hj{hMmhjubh)}(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.chMqhjubh)}(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.chMrhjubh)}(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.chMthjubh)}(hQtrue if **miter** contains the next mapping. false if end of sg list is reached.h](htrue if }(hjhhhNhNubj?)}(h **miter**h]hmiter}(hjɌhhhNhNubah}(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.chMuhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_miter_stop (C function)c.sg_miter_stophNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h2void sg_miter_stop (struct sg_mapping_iter *miter)h]j{)}(h1void sg_miter_stop(struct sg_mapping_iter *miter)h](j6)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj)}(h sg_miter_stoph]j)}(h sg_miter_stoph]h sg_miter_stop}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]h$]h&]jjuh1jhjhhhjhMubj)}(h(struct sg_mapping_iter *miter)h]j)}(hstruct sg_mapping_iter *miterh](j)}(hjh]hstruct}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubj)}(h h]h }(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubh)}(hhh]j)}(hsg_mapping_iterh]hsg_mapping_iter}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj_modnameN classnameNjj)}j]j)}jj%sbc.sg_miter_stopasbuh1hhj;ubj)}(h h]h }(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubj)}(hmiterh]hmiter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj7ubah}(h]h ]h"]h$]h&]jjuh1j hjhhhjhMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jthjhMhjhhubj)}(hhh]h)}(hstop mapping iterationh]hstop mapping iteration}(hjhhhNhNubah}(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&]uh1j hjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jڍj0jڍj1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chMhjލubjU)}(hhh]jZ)}(h@``struct sg_mapping_iter *miter`` sg mapping iter to be stopped h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(hsg mapping iter to be stoppedh]hsg mapping iter to be stopped}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubah}(h]h ]h"]h$]h&]uh1jThjލ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.chMhjލubjt$)}(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 }(hjXhhhNhNubj?)}(h **miter**h]hmiter}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjXubh. }(hjXhhhNhNubj?)}(h **miter**h]hmiter}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjXubh 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.}(hjXhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjTubah}(h]h ]h"]h$]h&]uh1js$hjhMhjލubh)}(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.chMhjލubh)}(hDon't care otherwise.h]hDon’t care otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjލubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_copy_buffer (C function)c.sg_copy_bufferhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hysize_t sg_copy_buffer (struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip, bool to_buffer)h]j{)}(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}(hjێhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj؎ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjݎmodnameN classnameNjj)}j]j)}jsg_copy_buffersbc.sg_copy_bufferasbuh1hhjԎhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjԎhhhjhMubj)}(hsg_copy_bufferh]j)}(hjh]hsg_copy_buffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jj eh"]h$]h&]jjuh1jhjԎhhhjhMubj)}(hc(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip, bool to_buffer)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjJmodnameN classnameNjj)}j]jc.sg_copy_bufferasbuh1hhj&ubj)}(h h]h }(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(hjh]h*}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hinth]hint}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjďhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnentsh]hnents}(hjҏhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(h void *bufh](j6)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hbufh]hbuf}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj2modnameN classnameNjj)}j]jc.sg_copy_bufferasbuh1hhj)ubj)}(h h]h }(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(hbuflenh]hbuflen}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(h off_t skiph](h)}(hhh]j)}(hoff_th]hoff_t}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjzmodnameN classnameNjj)}j]jc.sg_copy_bufferasbuh1hhjqubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubj)}(hskiph]hskip}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubj)}(hbool to_bufferh](j6)}(hj5h]hbool}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjʐhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h to_bufferh]h to_buffer}(hjؐhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj"ubeh}(h]h ]h"]h$]h&]jjuh1j hjԎhhhjhMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjЎhhhjhMubah}(h]jˎah ](jjeh"]h$]h&]j j )j huh1jthjhMhj͎hhubj)}(hhh]h)}(h0Copy data between a linear buffer and an SG listh]h0Copy data between a linear buffer and an 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&]uh1j hj͎hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jj0jj1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chMhjubjU)}(hhh](jZ)}(h(``struct scatterlist *sgl`` The SG list h](j`)}(h``struct scatterlist *sgl``h]j)}(hjCh]hstruct scatterlist *sgl}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj=ubjz)}(hhh]h)}(h The SG listh]h The SG list}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjYubah}(h]h ]h"]h$]h&]uh1jyhj=ubeh}(h]h ]h"]h$]h&]uh1jYhjXhMhj:ubjZ)}(h,``unsigned int nents`` Number of SG entries h](j`)}(h``unsigned int nents``h]j)}(hj|h]hunsigned int nents}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjvubjz)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjvubeh}(h]h ]h"]h$]h&]uh1jYhjhMhj:ubjZ)}(h!``void *buf`` Where to copy from h](j`)}(h ``void *buf``h]j)}(hjh]h void *buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(hWhere to copy fromh]hWhere to copy from}(hjΑhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjʑhMhjˑubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjʑhMhj:ubjZ)}(h.``size_t buflen`` The number of bytes to copy h](j`)}(h``size_t buflen``h]j)}(hjh]h size_t buflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhj:ubjZ)}(h6``off_t skip`` Number of bytes to skip before copying h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj!ubjz)}(hhh]h)}(h&Number of bytes to skip before copyingh]h&Number of bytes to skip before copying}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj<hMhj=ubah}(h]h ]h"]h$]h&]uh1jyhj!ubeh}(h]h ]h"]h$]h&]uh1jYhj<hMhj:ubjZ)}(hr``bool to_buffer`` transfer direction (true == from an sg list to a buffer, false == from a buffer to an sg list) h](j`)}(h``bool to_buffer``h]j)}(hj`h]hbool to_buffer}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjZubjz)}(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)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjvubah}(h]h ]h"]h$]h&]uh1jyhjZubeh}(h]h ]h"]h$]h&]uh1jYhjuhMhj:ubeh}(h]h ]h"]h$]h&]uh1jThjubh)}(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&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk sg_copy_from_buffer (C function)c.sg_copy_from_bufferhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hhsize_t sg_copy_from_buffer (struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen)h]j{)}(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}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jsg_copy_from_buffersbc.sg_copy_from_bufferasbuh1hhjݒhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjݒhhhjhMubj)}(hsg_copy_from_bufferh]j)}(hjh]hsg_copy_from_buffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]h$]h&]jjuh1jhjݒhhhjhMubj)}(hM(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(h h]h }(hj@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjSmodnameN classnameNjj)}j]jc.sg_copy_from_bufferasbuh1hhj/ubj)}(h h]h }(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(hjh]h*}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hinth]hint}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hj͓hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnentsh]hnents}(hjۓhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubj)}(hconst void *bufh](j)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hbufh]hbuf}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjVmodnameN classnameNjj)}j]jc.sg_copy_from_bufferasbuh1hhjMubj)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubj)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj+ubeh}(h]h ]h"]h$]h&]jjuh1j hjݒhhhjhMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjْhhhjhMubah}(h]jԒah ](jjeh"]h$]h&]j j )j huh1jthjhMhj֒hhubj)}(hhh]h)}(h'Copy from a linear buffer to an SG listh]h'Copy from a linear 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.chMhjhhubah}(h]h ]h"]h$]h&]uh1j hj֒hhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/j”j0j”j1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chMhjƔubjU)}(hhh](jZ)}(h(``struct scatterlist *sgl`` The SG list h](j`)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(h The SG listh]h The SG list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(h,``unsigned int nents`` Number of SG entries h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj:ubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhj9hMhjubjZ)}(h'``const void *buf`` Where to copy from h](j`)}(h``const void *buf``h]j)}(hj]h]hconst void *buf}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjWubjz)}(hhh]h)}(hWhere to copy fromh]hWhere to copy from}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjsubah}(h]h ]h"]h$]h&]uh1jyhjWubeh}(h]h ]h"]h$]h&]uh1jYhjrhMhjubjZ)}(h.``size_t buflen`` The number of bytes to copy h](j`)}(h``size_t buflen``h]j)}(hjh]h size_t buflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubeh}(h]h ]h"]h$]h&]uh1jThjƔ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.chMhjƔubh)}(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.chMhjƔubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_copy_to_buffer (C function)c.sg_copy_to_bufferhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h`size_t sg_copy_to_buffer (struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen)h]j{)}(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}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jsg_copy_to_buffersbc.sg_copy_to_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&]uh1jhjhhhj:hMubj)}(hsg_copy_to_bufferh]j)}(hj7h]hsg_copy_to_buffer}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubah}(h]h ](jj eh"]h$]h&]jjuh1jhjhhhj:hMubj)}(hG(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjhhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j5c.sg_copy_to_bufferasbuh1hhjdubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj`ubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjؖhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjԖubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjԖubj6)}(hinth]hint}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjԖubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjԖubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjԖubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj`ubj)}(h void *bufh](j6)}(hvoidh]hvoid}(hj)hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj%ubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hjh]h*}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj)}(hbufh]hbuf}(hjRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj`ubj)}(h size_t buflenh](h)}(hhh]j)}(hsize_th]hsize_t}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjpmodnameN classnameNjj)}j]j5c.sg_copy_to_bufferasbuh1hhjgubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubj)}(hbuflenh]hbuflen}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj`ubeh}(h]h ]h"]h$]h&]jjuh1j hjhhhj:hMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjhhhj:hMubah}(h]j ah ](jjeh"]h$]h&]j j )j huh1jthj:hMhj hhubj)}(hhh]h)}(h'Copy from an SG list to a linear bufferh]h'Copy from an SG list to a linear buffer}(hjėhhhNhNubah}(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&]uh1j hj hhhj:hMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jܗj0jܗj1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chMhjubjU)}(hhh](jZ)}(h(``struct scatterlist *sgl`` The SG list h](j`)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(h The SG listh]h The SG list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(h,``unsigned int nents`` Number of SG entries h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj8ubjz)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShMhjTubah}(h]h ]h"]h$]h&]uh1jyhj8ubeh}(h]h ]h"]h$]h&]uh1jYhjShMhjubjZ)}(h``void *buf`` Where to copy to h](j`)}(h ``void *buf``h]j)}(hjwh]h void *buf}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjqubjz)}(hhh]h)}(hWhere to copy toh]hWhere to copy to}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhjqubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjubjZ)}(h.``size_t buflen`` The number of bytes to copy h](j`)}(h``size_t buflen``h]j)}(hjh]h size_t buflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(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&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjŘhMhjubeh}(h]h ]h"]h$]h&]uh1jThjubh)}(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&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jk!sg_pcopy_from_buffer (C function)c.sg_pcopy_from_bufferhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(husize_t sg_pcopy_from_buffer (struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen, off_t skip)h]j{)}(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}(hj3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj5modnameN classnameNjj)}j]j)}jsg_pcopy_from_buffersbc.sg_pcopy_from_bufferasbuh1hhj,hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMubj)}(h h]h }(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,hhhjThMubj)}(hsg_pcopy_from_bufferh]j)}(hjQh]hsg_pcopy_from_buffer}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubah}(h]h ](jj eh"]h$]h&]jjuh1jhj,hhhjThMubj)}(hY(struct scatterlist *sgl, unsigned int nents, const void *buf, size_t buflen, off_t skip)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jOc.sg_pcopy_from_bufferasbuh1hhj~ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~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&]noemphjjuh1jhjzubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hinth]hint}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnentsh]hnents}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzubj)}(hconst void *bufh](j)}(hjh]hconst}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(h h]h }(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj6)}(hvoidh]hvoid}(hj^hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj?ubj)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(hjh]h*}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(hbufh]hbuf}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzubj)}(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]jOc.sg_pcopy_from_bufferasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hbuflenh]hbuflen}(hjϚhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzubj)}(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]jOc.sg_pcopy_from_bufferasbuh1hhjubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hskiph]hskip}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjzubeh}(h]h ]h"]h$]h&]jjuh1j hj,hhhjThMubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhj(hhhjThMubah}(h]j#ah ](jjeh"]h$]h&]j j )j huh1jthjThMhj%hhubj)}(hhh]h)}(h'Copy from a linear buffer to an SG listh]h'Copy from a linear buffer to an SG list}(hjAhhhNhNubah}(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&]uh1j hj%hhhjThMubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jYj0jYj1j2j3uh1johhhj"hNhNubj5)}(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?)}(hjch]h Parameters}(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.chMhj]ubjU)}(hhh](jZ)}(h(``struct scatterlist *sgl`` The SG list h](j`)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj|ubjz)}(hhh]h)}(h The SG listh]h The SG list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jyhj|ubeh}(h]h ]h"]h$]h&]uh1jYhjhMhjyubjZ)}(h,``unsigned int nents`` Number of SG entries h](j`)}(h``unsigned int nents``h]j)}(hjh]hunsigned int nents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjԛhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjЛhMhjћubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjЛhMhjyubjZ)}(h'``const void *buf`` Where to copy from h](j`)}(h``const void *buf``h]j)}(hjh]hconst void *buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhjubjz)}(hhh]h)}(hWhere to copy fromh]hWhere to copy from}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhj hMhjyubjZ)}(h.``size_t buflen`` The number of bytes to copy h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj'ubjz)}(hhh]h)}(hThe number of bytes to copyh]hThe number of bytes to copy}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjCubah}(h]h ]h"]h$]h&]uh1jyhj'ubeh}(h]h ]h"]h$]h&]uh1jYhjBhMhjyubjZ)}(h6``off_t skip`` Number of bytes to skip before copying h](j`)}(h``off_t skip``h]j)}(hjfh]h off_t skip}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhj`ubjz)}(hhh]h)}(h&Number of bytes to skip before copyingh]h&Number of bytes to skip before copying}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hMhj|ubah}(h]h ]h"]h$]h&]uh1jyhj`ubeh}(h]h ]h"]h$]h&]uh1jYhj{hMhjyubeh}(h]h ]h"]h$]h&]uh1jThj]ubh)}(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.chMhj]ubh)}(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.chMhj]ubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_pcopy_to_buffer (C function)c.sg_pcopy_to_bufferhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(hmsize_t sg_pcopy_to_buffer (struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip)h]j{)}(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&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jsg_pcopy_to_buffersbc.sg_pcopy_to_bufferasbuh1hhjhhhS/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&]uh1jhjhhhj hM!ubj)}(hsg_pcopy_to_bufferh]j)}(hjh]hsg_pcopy_to_buffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]h$]h&]jjuh1jhjhhhj hM!ubj)}(hS(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen, off_t skip)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjXmodnameN classnameNjj)}j]jc.sg_pcopy_to_bufferasbuh1hhj4ubj)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubj)}(hsglh]hsgl}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubj)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hinth]hint}(hjĝhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjҝhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hnentsh]hnents}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubj)}(h void *bufh](j6)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hbufh]hbuf}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubj)}(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]jc.sg_pcopy_to_bufferasbuh1hhj7ubj)}(h h]h }(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubj)}(hbuflenh]hbuflen}(hjjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubj)}(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_pcopy_to_bufferasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hskiph]hskip}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0ubeh}(h]h ]h"]h$]h&]jjuh1j hjhhhj hM!ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjޜhhhj hM!ubah}(h]jٜah ](jjeh"]h$]h&]j j )j huh1jthj hM!hjۜhhubj)}(hhh]h)}(h'Copy from an SG list to a linear bufferh]h'Copy from an SG list to a linear buffer}(hjܞhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM!hjٞhhubah}(h]h ]h"]h$]h&]uh1j hjۜhhhj hM!ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jj0jj1j2j3uh1johhhj"hNhNubj5)}(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?)}(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.chM%hjubjU)}(hhh](jZ)}(h(``struct scatterlist *sgl`` The SG list h](j`)}(h``struct scatterlist *sgl``h]j)}(hjh]hstruct scatterlist *sgl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM"hjubjz)}(hhh]h)}(h The SG listh]h The SG list}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj2hM"hj3ubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhj2hM"hjubjZ)}(h,``unsigned int nents`` Number of SG entries h](j`)}(h``unsigned int nents``h]j)}(hjVh]hunsigned int nents}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM#hjPubjz)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhM#hjlubah}(h]h ]h"]h$]h&]uh1jyhjPubeh}(h]h ]h"]h$]h&]uh1jYhjkhM#hjubjZ)}(h``void *buf`` Where to copy to h](j`)}(h ``void *buf``h]j)}(hjh]h void *buf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM$hjubjz)}(hhh]h)}(hWhere to copy toh]hWhere to copy to}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM$hjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhM$hjubjZ)}(h.``size_t buflen`` The number of bytes to copy h](j`)}(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&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM%hjŸubjz)}(hhh]h)}(hThe number of bytes to copyh]hThe number of bytes to copy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjݟhM%hjޟubah}(h]h ]h"]h$]h&]uh1jyhjŸubeh}(h]h ]h"]h$]h&]uh1jYhjݟhM%hjubjZ)}(h6``off_t skip`` Number of bytes to skip before copying h](j`)}(h``off_t skip``h]j)}(hjh]h off_t skip}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM&hjubjz)}(hhh]h)}(h&Number of bytes to skip before copyingh]h&Number of bytes to skip before copying}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM&hjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhM&hjubeh}(h]h ]h"]h$]h&]uh1jThjubh)}(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.chM(hjubh)}(h#Returns the number of copied bytes.h]h#Returns the number of copied bytes.}(hjRhhhNhNubah}(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&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jksg_zero_buffer (C function)c.sg_zero_bufferhNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(h^size_t sg_zero_buffer (struct scatterlist *sgl, unsigned int nents, size_t buflen, off_t skip)h]j{)}(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_bufferasbuh1hhj}hhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM3ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}hhhjhM3ubj)}(hsg_zero_bufferh]j)}(hjh]hsg_zero_buffer}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jj eh"]h$]h&]jjuh1jhj}hhhjhM3ubj)}(hH(struct scatterlist *sgl, unsigned int nents, size_t buflen, off_t skip)h](j)}(hstruct scatterlist *sglh](j)}(hjh]hstruct}(hjӠhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjϠubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjϠubh)}(hhh]j)}(h scatterlisth]h scatterlist}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.sg_zero_bufferasbuh1hhjϠubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjϠ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)}(hunsigned int nentsh](j6)}(hunsignedh]hunsigned}(hjChhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj?ubj)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj6)}(hinth]hint}(hj_hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hj?ubj)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubj)}(hnentsh]hnents}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjˠubj)}(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]jc.sg_zero_bufferasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hbuflenh]hbuflen}(hjáhhhNhNubah}(h]h ]jah"]h$]h&]uh1j^Yhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjˠubj)}(h off_t skiph](h)}(hhh]j)}(hoff_th]hoff_t}(hjߡhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjܡubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.sg_zero_bufferasbuh1hhjءubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjءubj)}(hskiph]hskip}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjءubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjˠubeh}(h]h ]h"]h$]h&]jjuh1j hj}hhhjhM3ubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjyhhhjhM3ubah}(h]jtah ](jjeh"]h$]h&]j j )j huh1jthjhM3hjvhhubj)}(hhh]h)}(hZero-out a part of a SG listh]hZero-out a part of a SG list}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM3hj2hhubah}(h]h ]h"]h$]h&]uh1j hjvhhhjhM3ubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jMj0jMj1j2j3uh1johhhj"hNhNubj5)}(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?)}(hjWh]h Parameters}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjUubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM7hjQubjU)}(hhh](jZ)}(h(``struct scatterlist *sgl`` The SG list h](j`)}(h``struct scatterlist *sgl``h]j)}(hjvh]hstruct scatterlist *sgl}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM4hjpubjz)}(hhh]h)}(h The SG listh]h The SG list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM4hjubah}(h]h ]h"]h$]h&]uh1jyhjpubeh}(h]h ]h"]h$]h&]uh1jYhjhM4hjmubjZ)}(h,``unsigned int nents`` Number of SG entries h](j`)}(h``unsigned int nents``h]j)}(hjh]hunsigned int nents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM5hjubjz)}(hhh]h)}(hNumber of SG entriesh]hNumber of SG entries}(hjȢhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjĢhM5hjŢubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjĢhM5hjmubjZ)}(h2``size_t buflen`` The number of bytes to zero out h](j`)}(h``size_t buflen``h]j)}(hjh]h size_t buflen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM6hjubjz)}(hhh]h)}(hThe number of bytes to zero outh]hThe number of bytes to zero out}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM6hjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhM6hjmubjZ)}(h6``off_t skip`` Number of bytes to skip before zeroing h](j`)}(h``off_t skip``h]j)}(hj!h]h off_t skip}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM7hjubjz)}(hhh]h)}(h&Number of bytes to skip before zeroingh]h&Number of bytes to skip before zeroing}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hM7hj7ubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhj6hM7hjmubeh}(h]h ]h"]h$]h&]uh1jThjQubh)}(h**Description**h]j?)}(hj\h]h Description}(hj^hhhNhNubah}(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.chM9hjQubh)}(h#Returns the number of bytes zeroed.h]h#Returns the number of bytes zeroed.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chM8hjQubeh}(h]h ] kernelindentah"]h$]h&]uh1j4hj"hhhNhNubj_)}(hhh]h}(h]h ]h"]h$]h&]entries](jkextract_iter_to_sg (C function)c.extract_iter_to_sghNtauh1j^hj"hhhNhNubjp)}(hhh](ju)}(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]j{)}(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}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jextract_iter_to_sgsbc.extract_iter_to_sgasbuh1hhjhhhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMeubj)}(h h]h }(hjƣhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjţhMeubj)}(hextract_iter_to_sgh]j)}(hj£h]hextract_iter_to_sg}(hjأhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjԣubah}(h]h ](jj eh"]h$]h&]jjuh1jhjhhhjţhMeubj)}(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](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(hhh]j)}(hiov_iterh]hiov_iter}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.extract_iter_to_sgasbuh1hhjubj)}(h h]h }(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hiterh]hiter}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hsize_t maxsizeh](h)}(hhh]j)}(hsize_th]hsize_t}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjhmodnameN classnameNjj)}j]jc.extract_iter_to_sgasbuh1hhj_ubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(hmaxsizeh]hmaxsize}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hstruct sg_table *sgtableh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubh)}(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]jc.extract_iter_to_sgasbuh1hhjubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsgtableh]hsgtable}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned int sg_maxh](j6)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj6)}(hinth]hint}(hj7hhhNhNubah}(h]h ]jBah"]h$]h&]uh1j5hjubj)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hsg_maxh]hsg_max}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h&iov_iter_extraction_t extraction_flagsh](h)}(hhh]j)}(hiov_iter_extraction_th]hiov_iter_extraction_t}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjqmodnameN classnameNjj)}j]jc.extract_iter_to_sgasbuh1hhjhubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubj)}(hextraction_flagsh]hextraction_flags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1j hjhhhjţhMeubeh}(h]h ]h"]h$]h&]jjjuh1jzjjhjhhhjţhMeubah}(h]jah ](jjeh"]h$]h&]j j )j huh1jthjţhMehjhhubj)}(hhh]h)}(h3Extract pages from an iterator and add to an sglisth]h3Extract pages from an iterator and add to an sglist}(hjťhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMehj¥hhubah}(h]h ]h"]h$]h&]uh1j hjhhhjţhMeubeh}(h]h ](jfunctioneh"]h$]h&]j.jj/jݥj0jݥj1j2j3uh1johhhj"hNhNubj5)}(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>hjubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMihjubjU)}(hhh](jZ)}(h7``struct iov_iter *iter`` The iterator to extract from h](j`)}(h``struct iov_iter *iter``h]j)}(hjh]hstruct iov_iter *iter}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMfhjubjz)}(hhh]h)}(hThe iterator to extract fromh]hThe iterator to extract from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMfhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMfhjubjZ)}(h2``size_t maxsize`` The amount of iterator to copy h](j`)}(h``size_t maxsize``h]j)}(hj?h]hsize_t maxsize}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMghj9ubjz)}(hhh]h)}(hThe amount of iterator to copyh]hThe amount of iterator to copy}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThMghjUubah}(h]h ]h"]h$]h&]uh1jyhj9ubeh}(h]h ]h"]h$]h&]uh1jYhjThMghjubjZ)}(h>``struct sg_table *sgtable`` The scatterlist table to fill in h](j`)}(h``struct sg_table *sgtable``h]j)}(hjxh]hstruct sg_table *sgtable}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMhhjrubjz)}(hhh]h)}(h The scatterlist table to fill inh]h The scatterlist table to fill in}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhhjubah}(h]h ]h"]h$]h&]uh1jyhjrubeh}(h]h ]h"]h$]h&]uh1jYhjhMhhjubjZ)}(hU``unsigned int sg_max`` Maximum number of elements in **sgtable** that may be filled h](j`)}(h``unsigned int sg_max``h]j)}(hjh]hunsigned int sg_max}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMihjubjz)}(hhh]h)}(hhjʦubh that may be filled}(hjʦhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjƦhMihjǦubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjƦhMihjubjZ)}(hH``iov_iter_extraction_t extraction_flags`` Flags to qualify the request h](j`)}(h*``iov_iter_extraction_t extraction_flags``h]j)}(hjh]h&iov_iter_extraction_t extraction_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j_hS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMjhjubjz)}(hhh]h)}(hFlags to qualify the requesth]hFlags to qualify the request}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMjhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jYhjhMjhjubeh}(h]h ]h"]h$]h&]uh1jThjubh)}(h**Description**h]j?)}(hj7h]h Description}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j>hj5ubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMlhjubh)}(hExtract 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.h](hExtract 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 }(hjMhhhNhNubj?)}(h **sg_max**h]hsg_max}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjMubh elements.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMkhjubh)}(hThe 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.h]hThe 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.}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMohjubh)}(hDNo end mark is placed on the scatterlist; that's left to the caller.h]hFNo end mark is placed on the scatterlist; that’s left to the caller.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMshjubh)}(hr**extraction_flags** can have ITER_ALLOW_P2PDMA set to request peer-to-peer DMA be allowed on the pages extracted.h](j?)}(h**extraction_flags**h]hextraction_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh^ can have ITER_ALLOW_P2PDMA set to request peer-to-peer DMA be allowed on the pages extracted.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMuhjubh)}(hIf 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.h](hIf successful, }(hjhhhNhNubj?)}(h**sgtable->nents**h]hsgtable->nents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh` is updated to include the number of elements added and the number of bytes added is returned. }(hjhhhNhNubj?)}(h**sgtable->orig_nents**h]hsgtable->orig_nents}(hjçhhhNhNubah}(h]h ]h"]h$]h&]uh1j>hjubh is left unaltered.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhS/var/lib/git/docbuild/linux/Documentation/core-api/dma-api:868: ./lib/scatterlist.chMxhjubh)}(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.}(hjܧhhhNhNubah}(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&]uh1j4hj"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_backlinksjfootnote_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_handlerj,error_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}(jjjqjnj.j+jojljjj9j6jjjjjjjju nametypes}(jjqj.jojj9jjjjuh}(jhjnj?j+jtjlj1jmjvjvj{j j# j j jJjOjXj]jjjjrj6jjj<jjjjjj"j"j"j$j$j&j&j/*j4*je-jj-j/j/j2j2jL4jQ4j5j5ja7jf7j8j8jv:j{:j<j<j=j=j)?j.?j@j@jBjBj-Gj2GjHjHj1Jj6JjKjKjMjMjOjOjPjPjRjRj>TjCTjWjWjYjYj[j[j(^j-^jajajMcjRcjdjdj9jj>jjljljrjrjxjxj{j{j~j~jYj^j"j'j}jjjjjjjjˎjЎjԒjْj jj#j(jٜjޜjtjyjju 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.