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/genallocmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/zh_TW/core-api/genallocmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/it_IT/core-api/genallocmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/ja_JP/core-api/genallocmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/ko_KR/core-api/genallocmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/sp_SP/core-api/genallocmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hThe genalloc/genpool subsystemh]hThe genalloc/genpool subsystem}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh?/var/lib/git/docbuild/linux/Documentation/core-api/genalloc.rsthKubh paragraph)}(hXThere are a number of memory-allocation subsystems in the kernel, each aimed at a specific need. Sometimes, however, a kernel developer needs to implement a new allocator for a specific range of special-purpose memory; often that memory is located on a device somewhere. The author of the driver for that device can certainly write a little allocator to get the job done, but that is the way to fill the kernel with dozens of poorly tested allocators. Back in 2005, Jes Sorensen lifted one of those allocators from the sym53c8xx_2 driver and posted_ it as a generic module for the creation of ad hoc memory allocators. This code was merged for the 2.6.13 release; it has been modified considerably since then.h](hX!There are a number of memory-allocation subsystems in the kernel, each aimed at a specific need. Sometimes, however, a kernel developer needs to implement a new allocator for a specific range of special-purpose memory; often that memory is located on a device somewhere. The author of the driver for that device can certainly write a little allocator to get the job done, but that is the way to fill the kernel with dozens of poorly tested allocators. Back in 2005, Jes Sorensen lifted one of those allocators from the sym53c8xx_2 driver and }(hhhhhNhNubh reference)}(hposted_h]hposted}(hhhhhNhNubah}(h]h ]h"]h$]h&]namepostedrefuri https://lwn.net/Articles/125842/uh1hhhresolvedKubh it as a generic module for the creation of ad hoc memory allocators. This code was merged for the 2.6.13 release; it has been modified considerably since then.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhtarget)}(h,.. _posted: https://lwn.net/Articles/125842/h]h}(h]postedah ]h"]postedah$]h&]hhuh1hhKhhhhhh referencedKubh)}(hyCode using this allocator should include . The action begins with the creation of a pool using one of:h]hyCode using this allocator should include . The action begins with the creation of a pool using one of:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlegen_pool_create (C function)c.gen_pool_createhNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(h@struct gen_pool * gen_pool_create (int min_alloc_order, int nid)h]hdesc_signature_line)}(h>struct gen_pool *gen_pool_create(int min_alloc_order, int nid)h](hdesc_sig_keyword)}(hstructh]hstruct}(hj!hhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKubhdesc_sig_space)}(h h]h }(hj3hhhNhNubah}(h]h ]wah"]h$]h&]uh1j1hjhhhj0hKubh)}(hhh]h desc_sig_name)}(hgen_poolh]hgen_pool}(hjGhhhNhNubah}(h]h ]nah"]h$]h&]uh1jEhjBubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjImodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jd ASTIdentifier)}j_gen_pool_createsbc.gen_pool_createasbuh1hhjhhhj0hKubj2)}(h h]h }(hjrhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhj0hKubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjhhhj0hKubh desc_name)}(hgen_pool_createh]jF)}(hjoh]hgen_pool_create}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1jhjhhhj0hKubhdesc_parameterlist)}(h(int min_alloc_order, int nid)h](hdesc_parameter)}(hint min_alloc_orderh](hdesc_sig_keyword_type)}(hinth]hint}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubjF)}(hmin_alloc_orderh]hmin_alloc_order}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint nidh](j)}(hinth]hint}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubjF)}(hnidh]hnid}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj0hKubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1jsphinx_line_type declaratorhjhhhj0hKubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj0hKhjhhubh desc_content)}(hhh]h)}(h create a new special memory poolh]h create a new special memory pool}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhj?hhubah}(h]h ]h"]h$]h&]uh1j=hjhhhj0hKubeh}(h]h ](j]functioneh"]h$]h&]domainj]objtypejZdesctypejZnoindex noindexentrynocontentsentryuh1jhhhhhNhNubh container)}(hXO**Parameters** ``int min_alloc_order`` log base 2 of number of bytes each bitmap bit represents ``int nid`` node id of the node the pool structure should be allocated on, or -1 **Description** Create a new special memory pool that can be used to manage special purpose memory not managed by the regular kmalloc/kfree interface.h](h)}(h**Parameters**h]hstrong)}(hjlh]h Parameters}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjfubhdefinition_list)}(hhh](hdefinition_list_item)}(hQ``int min_alloc_order`` log base 2 of number of bytes each bitmap bit represents h](hterm)}(h``int min_alloc_order``h]hliteral)}(hjh]hint min_alloc_order}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjubh definition)}(hhh]h)}(h8log base 2 of number of bytes each bitmap bit representsh]h8log base 2 of number of bytes each bitmap bit represents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(hQ``int nid`` node id of the node the pool structure should be allocated on, or -1 h](j)}(h ``int nid``h]j)}(hjh]hint nid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjubj)}(hhh]h)}(hDnode id of the node the pool structure should be allocated on, or -1h]hDnode id of the node the pool structure should be allocated on, or -1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjfubh)}(h**Description**h]jo)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjfubh)}(hCreate a new special memory pool that can be used to manage special purpose memory not managed by the regular kmalloc/kfree interface.h]hCreate a new special memory pool that can be used to manage special purpose memory not managed by the regular kmalloc/kfree interface.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjfubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j !devm_gen_pool_create (C function)c.devm_gen_pool_createhNtauh1hhhhhhNhNubj)}(hhh](j)}(hkstruct gen_pool * devm_gen_pool_create (struct device *dev, int min_alloc_order, int nid, const char *name)h]j)}(histruct gen_pool *devm_gen_pool_create(struct device *dev, int min_alloc_order, int nid, const char *name)h](j )}(hj#h]hstruct}(hjPhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjLhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM=ubj2)}(h h]h }(hj^hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjLhhhj]hM=ubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hjohhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjlubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjqmodnameN classnameNjcjf)}ji]jl)}j_devm_gen_pool_createsbc.devm_gen_pool_createasbuh1hhjLhhhj]hM=ubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjLhhhj]hM=ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLhhhj]hM=ubj)}(hdevm_gen_pool_createh]jF)}(hjh]hdevm_gen_pool_create}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjLhhhj]hM=ubj)}(hD(struct device *dev, int min_alloc_order, int nid, const char *name)h](j)}(hstruct device *devh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jc.devm_gen_pool_createasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hdevh]hdev}(hj!hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint min_alloc_orderh](j)}(hinth]hint}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubj2)}(h h]h }(hjHhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj6ubjF)}(hmin_alloc_orderh]hmin_alloc_order}(hjVhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj6ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint nidh](j)}(hinth]hint}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubj2)}(h h]h }(hj}hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjkubjF)}(hnidh]hnid}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjkubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst char *nameh](j )}(hconsth]hconst}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hnameh]hname}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjLhhhj]hM=ubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjHhhhj]hM=ubah}(h]jCah ](j5j6eh"]h$]h&]j:j;)j<huh1jhj]hM=hjEhhubj>)}(hhh]h)}(hmanaged gen_pool_createh]hmanaged gen_pool_create}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM3hjhhubah}(h]h ]h"]h$]h&]uh1j=hjEhhhj]hM=ubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_j+j`j+jajbjcuh1jhhhhhNhNubje)}(hX2**Parameters** ``struct device *dev`` device that provides the gen_pool ``int min_alloc_order`` log base 2 of number of bytes each bitmap bit represents ``int nid`` node selector for allocated gen_pool, ``NUMA_NO_NODE`` for all nodes ``const char *name`` name of a gen_pool or NULL, identifies a particular gen_pool on device **Description** Create a new special memory pool that can be used to manage special purpose memory not managed by the regular kmalloc/kfree interface. The pool will be automatically destroyed by the device management code.h](h)}(h**Parameters**h]jo)}(hj5h]h Parameters}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj3ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM7hj/ubj)}(hhh](j)}(h9``struct device *dev`` device that provides the gen_pool h](j)}(h``struct device *dev``h]j)}(hjTh]hstruct device *dev}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM4hjNubj)}(hhh]h)}(h!device that provides the gen_poolh]h!device that provides the gen_pool}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihM4hjjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjihM4hjKubj)}(hQ``int min_alloc_order`` log base 2 of number of bytes each bitmap bit represents h](j)}(h``int min_alloc_order``h]j)}(hjh]hint min_alloc_order}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM5hjubj)}(hhh]h)}(h8log base 2 of number of bytes each bitmap bit representsh]h8log base 2 of number of bytes each bitmap bit represents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM5hjKubj)}(hQ``int nid`` node selector for allocated gen_pool, ``NUMA_NO_NODE`` for all nodes h](j)}(h ``int nid``h]j)}(hjh]hint nid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM6hjubj)}(hhh]h)}(hDnode selector for allocated gen_pool, ``NUMA_NO_NODE`` for all nodesh](h&node selector for allocated gen_pool, }(hjhhhNhNubj)}(h``NUMA_NO_NODE``h]h NUMA_NO_NODE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh for all nodes}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhM6hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM6hjKubj)}(h\``const char *name`` name of a gen_pool or NULL, identifies a particular gen_pool on device h](j)}(h``const char *name``h]j)}(hjh]hconst char *name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM7hj ubj)}(hhh]h)}(hFname of a gen_pool or NULL, identifies a particular gen_pool on deviceh]hFname of a gen_pool or NULL, identifies a particular gen_pool on device}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hM7hj'ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj&hM7hjKubeh}(h]h ]h"]h$]h&]uh1jhj/ubh)}(h**Description**h]jo)}(hjLh]h Description}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjJubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM9hj/ubh)}(hCreate a new special memory pool that can be used to manage special purpose memory not managed by the regular kmalloc/kfree interface. The pool will be automatically destroyed by the device management code.h]hCreate a new special memory pool that can be used to manage special purpose memory not managed by the regular kmalloc/kfree interface. The pool will be automatically destroyed by the device management code.}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM9hj/ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hX)A call to gen_pool_create() will create a pool. The granularity of allocations is set with min_alloc_order; it is a log-base-2 number like those used by the page allocator, but it refers to bytes rather than pages. So, if min_alloc_order is passed as 3, then all allocations will be a multiple of eight bytes. Increasing min_alloc_order decreases the memory required to track the memory in the pool. The nid parameter specifies which NUMA node should be used for the allocation of the housekeeping structures; it can be -1 if the caller doesn't care.h]hX+A call to gen_pool_create() will create a pool. The granularity of allocations is set with min_alloc_order; it is a log-base-2 number like those used by the page allocator, but it refers to bytes rather than pages. So, if min_alloc_order is passed as 3, then all allocations will be a multiple of eight bytes. Increasing min_alloc_order decreases the memory required to track the memory in the pool. The nid parameter specifies which NUMA node should be used for the allocation of the housekeeping structures; it can be -1 if the caller doesn’t care.}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe "managed" interface devm_gen_pool_create() ties the pool to a specific device. Among other things, it will automatically clean up the pool when the given device is destroyed.h]hThe “managed” interface devm_gen_pool_create() ties the pool to a specific device. Among other things, it will automatically clean up the pool when the given device is destroyed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hhhhubh)}(hA pool is shut down with:h]hA pool is shut down with:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hhhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_destroy (C function)c.gen_pool_destroyhNtauh1hhhhhhNhNubj)}(hhh](j)}(h-void gen_pool_destroy (struct gen_pool *pool)h]j)}(h,void gen_pool_destroy(struct gen_pool *pool)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhjhKubj)}(hgen_pool_destroyh]jF)}(hgen_pool_destroyh]hgen_pool_destroy}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhKubj)}(h(struct gen_pool *pool)h]j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jl)}j_jsbc.gen_pool_destroyasbuh1hhjubj2)}(h h]h }(hj6hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hpoolh]hpool}(hjQhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjhhhjhKubah}(h]jah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjhKhjhhubj>)}(hhh]h)}(hdestroy a special memory poolh]hdestroy a special memory pool}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKhjxhhubah}(h]h ]h"]h$]h&]uh1j=hjhhhjhKubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_jj`jjajbjcuh1jhhhhhNhNubje)}(h**Parameters** ``struct gen_pool *pool`` pool to destroy **Description** Destroy the specified special memory pool. Verifies that there are no outstanding allocations.h](h)}(h**Parameters**h]jo)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKhjubj)}(hhh]j)}(h*``struct gen_pool *pool`` pool to destroy h](j)}(h``struct gen_pool *pool``h]j)}(hjh]hstruct gen_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKhjubj)}(hhh]h)}(hpool to destroyh]hpool to destroy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jo)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKhjubh)}(h^Destroy the specified special memory pool. Verifies that there are no outstanding allocations.h]h^Destroy the specified special memory pool. Verifies that there are no outstanding allocations.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hIt's worth noting that, if there are still allocations outstanding from the given pool, this function will take the rather extreme step of invoking BUG(), crashing the entire system. You have been warned.h]hIt’s worth noting that, if there are still allocations outstanding from the given pool, this function will take the rather extreme step of invoking BUG(), crashing the entire system. You have been warned.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hhhhubh)}(hA freshly created pool has no memory to allocate. It is fairly useless in that state, so one of the first orders of business is usually to add memory to the pool. That can be done with one of:h]hA freshly created pool has no memory to allocate. It is fairly useless in that state, so one of the first orders of business is usually to add memory to the pool. That can be done with one of:}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hhhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_add (C function)c.gen_pool_addhNtauh1hhhhhhNhNubj)}(hhh](j)}(hRint gen_pool_add (struct gen_pool *pool, unsigned long addr, size_t size, int nid)h]j)}(hQint gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size, int nid)h](j)}(hinth]hint}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjThhhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKwubj2)}(h h]h }(hjghhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjThhhjfhKwubj)}(h gen_pool_addh]jF)}(h gen_pool_addh]h gen_pool_add}(hjyhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjuubah}(h]h ](jjeh"]h$]h&]jjuh1jhjThhhjfhKwubj)}(hA(struct gen_pool *pool, unsigned long addr, size_t size, int nid)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jl)}j_j{sbc.gen_pool_addasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned long addrh](j)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubj)}(hlongh]hlong}(hj# hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj2)}(h h]h }(hj1 hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubjF)}(haddrh]haddr}(hj? hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jF)}(hsize_th]hsize_t}(hj[ hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjX ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj] modnameN classnameNjcjf)}ji]jc.gen_pool_addasbuh1hhjT ubj2)}(h h]h }(hjy hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjT ubjF)}(hsizeh]hsize}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjT ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint nidh](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubjF)}(hnidh]hnid}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjThhhjfhKwubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjPhhhjfhKwubah}(h]jKah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjfhKwhjMhhubj>)}(hhh]h)}(h-add a new chunk of special memory to the poolh]h-add a new chunk of special memory to the pool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKlhj hhubah}(h]h ]h"]h$]h&]uh1j=hjMhhhjfhKwubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_j j`j jajbjcuh1jhhhhhNhNubje)}(hX**Parameters** ``struct gen_pool *pool`` pool to add new memory chunk to ``unsigned long addr`` starting address of memory chunk to add to pool ``size_t size`` size in bytes of the memory chunk to add to pool ``int nid`` node id of the node the chunk structure and bitmap should be allocated on, or -1 **Description** Add a new chunk of special memory to the specified pool. Returns 0 on success or a -ve errno on failure.h](h)}(h**Parameters**h]jo)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKphj ubj)}(hhh](j)}(h:``struct gen_pool *pool`` pool to add new memory chunk to h](j)}(h``struct gen_pool *pool``h]j)}(hj' h]hstruct gen_pool *pool}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj% ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKmhj! ubj)}(hhh]h)}(hpool to add new memory chunk toh]hpool to add new memory chunk to}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj< hKmhj= ubah}(h]h ]h"]h$]h&]uh1jhj! ubeh}(h]h ]h"]h$]h&]uh1jhj< hKmhj ubj)}(hG``unsigned long addr`` starting address of memory chunk to add to pool h](j)}(h``unsigned long addr``h]j)}(hj` h]hunsigned long addr}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKnhjZ ubj)}(hhh]h)}(h/starting address of memory chunk to add to poolh]h/starting address of memory chunk to add to pool}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhju hKnhjv ubah}(h]h ]h"]h$]h&]uh1jhjZ ubeh}(h]h ]h"]h$]h&]uh1jhju hKnhj ubj)}(hA``size_t size`` size in bytes of the memory chunk to add to pool h](j)}(h``size_t size``h]j)}(hj h]h size_t size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKohj ubj)}(hhh]h)}(h0size in bytes of the memory chunk to add to poolh]h0size in bytes of the memory chunk to add to pool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKohj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKohj ubj)}(h]``int nid`` node id of the node the chunk structure and bitmap should be allocated on, or -1 h](j)}(h ``int nid``h]j)}(hj h]hint nid}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKqhj ubj)}(hhh]h)}(hPnode id of the node the chunk structure and bitmap should be allocated on, or -1h]hPnode id of the node the chunk structure and bitmap should be allocated on, or -1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKphj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKqhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]jo)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKshj ubh)}(h8Add a new chunk of special memory to the specified pool.h]h8Add a new chunk of special memory to the specified pool.}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKshj ubh)}(h/Returns 0 on success or a -ve errno on failure.h]h/Returns 0 on success or a -ve errno on failure.}(hj3 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKuhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_add_owner (C function)c.gen_pool_add_ownerhNtauh1hhhhhhNhNubj)}(hhh](j)}(hwint gen_pool_add_owner (struct gen_pool *pool, unsigned long virt, phys_addr_t phys, size_t size, int nid, void *owner)h]j)}(hvint gen_pool_add_owner(struct gen_pool *pool, unsigned long virt, phys_addr_t phys, size_t size, int nid, void *owner)h](j)}(hinth]hint}(hjb hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ hhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKubj2)}(h h]h }(hjq hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj^ hhhjp hKubj)}(hgen_pool_add_ownerh]jF)}(hgen_pool_add_ownerh]hgen_pool_add_owner}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj^ hhhjp hKubj)}(h`(struct gen_pool *pool, unsigned long virt, phys_addr_t phys, size_t size, int nid, void *owner)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hj hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj ubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj modnameN classnameNjcjf)}ji]jl)}j_j sbc.gen_pool_add_ownerasbuh1hhj ubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjF)}(hpoolh]hpool}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hunsigned long virth](j)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubj)}(hlongh]hlong}(hj- hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj2)}(h h]h }(hj; hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubjF)}(hvirth]hvirt}(hjI hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hphys_addr_t physh](h)}(hhh]jF)}(h phys_addr_th]h phys_addr_t}(hje hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjb ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjg modnameN classnameNjcjf)}ji]j c.gen_pool_add_ownerasbuh1hhj^ ubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj^ ubjF)}(hphysh]hphys}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj^ ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h size_t sizeh](h)}(hhh]jF)}(hsize_th]hsize_t}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj modnameN classnameNjcjf)}ji]j c.gen_pool_add_ownerasbuh1hhj ubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubjF)}(hsizeh]hsize}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hint nidh](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj ubjF)}(hnidh]hnid}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h void *ownerh](j)}(hvoidh]hvoid}(hj' hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj# ubj2)}(h h]h }(hj5 hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj# ubj)}(hjh]h*}(hjC hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj# ubjF)}(hownerh]howner}(hjP hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj# ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhj^ hhhjp hKubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjZ hhhjp hKubah}(h]jU ah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjp hKhjW hhubj>)}(hhh]h)}(h-add a new chunk of special memory to the poolh]h-add a new chunk of special memory to the pool}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhjw hhubah}(h]h ]h"]h$]h&]uh1j=hjW hhhjp hKubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_j j`j jajbjcuh1jhhhhhNhNubje)}(hXa**Parameters** ``struct gen_pool *pool`` pool to add new memory chunk to ``unsigned long virt`` virtual starting address of memory chunk to add to pool ``phys_addr_t phys`` physical starting address of memory chunk to add to pool ``size_t size`` size in bytes of the memory chunk to add to pool ``int nid`` node id of the node the chunk structure and bitmap should be allocated on, or -1 ``void *owner`` private data the publisher would like to recall at alloc time **Description** Add a new chunk of special memory to the specified pool. Returns 0 on success or a -ve errno on failure.h](h)}(h**Parameters**h]jo)}(hj h]h Parameters}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj ubj)}(hhh](j)}(h:``struct gen_pool *pool`` pool to add new memory chunk to h](j)}(h``struct gen_pool *pool``h]j)}(hj h]hstruct gen_pool *pool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj ubj)}(hhh]h)}(hpool to add new memory chunk toh]hpool to add new memory chunk to}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubj)}(hO``unsigned long virt`` virtual starting address of memory chunk to add to pool h](j)}(h``unsigned long virt``h]j)}(hj h]hunsigned long virt}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj ubj)}(hhh]h)}(h7virtual starting address of memory chunk to add to poolh]h7virtual starting address of memory chunk to add to pool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKhj ubj)}(hN``phys_addr_t phys`` physical starting address of memory chunk to add to pool h](j)}(h``phys_addr_t phys``h]j)}(hj-h]hphys_addr_t phys}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj'ubj)}(hhh]h)}(h8physical starting address of memory chunk to add to poolh]h8physical starting address of memory chunk to add to pool}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhKhjCubah}(h]h ]h"]h$]h&]uh1jhj'ubeh}(h]h ]h"]h$]h&]uh1jhjBhKhj ubj)}(hA``size_t size`` size in bytes of the memory chunk to add to pool h](j)}(h``size_t size``h]j)}(hjfh]h size_t size}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj`ubj)}(hhh]h)}(h0size in bytes of the memory chunk to add to poolh]h0size in bytes of the memory chunk to add to pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hKhj|ubah}(h]h ]h"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]uh1jhj{hKhj ubj)}(h]``int nid`` node id of the node the chunk structure and bitmap should be allocated on, or -1 h](j)}(h ``int nid``h]j)}(hjh]hint nid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhjubj)}(hhh]h)}(hPnode id of the node the chunk structure and bitmap should be allocated on, or -1h]hPnode id of the node the chunk structure and bitmap should be allocated on, or -1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj ubj)}(hN``void *owner`` private data the publisher would like to recall at alloc time h](j)}(h``void *owner``h]j)}(hjh]h void *owner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhjubj)}(hhh]h)}(h=private data the publisher would like to recall at alloc timeh]h=private data the publisher would like to recall at alloc time}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]jo)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj ubh)}(h8Add a new chunk of special memory to the specified pool.h]h8Add a new chunk of special memory to the specified pool.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj ubh)}(h/Returns 0 on success or a -ve errno on failure.h]h/Returns 0 on success or a -ve errno on failure.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hXnA call to gen_pool_add() will place the size bytes of memory starting at addr (in the kernel's virtual address space) into the given pool, once again using nid as the node ID for ancillary memory allocations. The gen_pool_add_virt() variant associates an explicit physical address with the memory; this is only necessary if the pool will be used for DMA allocations.h]hXpA call to gen_pool_add() will place the size bytes of memory starting at addr (in the kernel’s virtual address space) into the given pool, once again using nid as the node ID for ancillary memory allocations. The gen_pool_add_virt() variant associates an explicit physical address with the memory; this is only necessary if the pool will be used for DMA allocations.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hhhhubh)}(hLThe functions for allocating memory from the pool (and putting it back) are:h]hLThe functions for allocating memory from the pool (and putting it back) are:}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhhhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_alloc (C function)c.gen_pool_allochNtauh1hhhhhhNhNubj)}(hhh](j)}(hAunsigned long gen_pool_alloc (struct gen_pool *pool, size_t size)h]j)}(h@unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)h](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhjhKubj)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhjhKubj)}(hgen_pool_alloch]jF)}(hgen_pool_alloch]hgen_pool_alloc}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhKubj)}(h$(struct gen_pool *pool, size_t size)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jl)}j_jsbc.gen_pool_allocasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hpoolh]hpool}(hj6hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jF)}(hsize_th]hsize_t}(hjRhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjOubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjTmodnameN classnameNjcjf)}ji]jc.gen_pool_allocasbuh1hhjKubj2)}(h h]h }(hjphhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjKubjF)}(hsizeh]hsize}(hj~hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjKubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hj|hhhjhKubah}(h]jwah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjhKhjyhhubj>)}(hhh]h)}(h%allocate special memory from the poolh]h%allocate special memory from the pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j=hjyhhhjhKubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_jj`jjajbjcuh1jhhhhhNhNubje)}(hXr**Parameters** ``struct gen_pool *pool`` pool to allocate from ``size_t size`` number of bytes to allocate from the pool **Description** Allocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.h](h)}(h**Parameters**h]jo)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKhjubj)}(hhh](j)}(h0``struct gen_pool *pool`` pool to allocate from h](j)}(h``struct gen_pool *pool``h]j)}(hjh]hstruct gen_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKhjubj)}(hhh]h)}(hpool to allocate fromh]hpool to allocate from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h:``size_t size`` number of bytes to allocate from the pool h](j)}(h``size_t size``h]j)}(hj"h]h size_t size}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKhjubj)}(hhh]h)}(h)number of bytes to allocate from the poolh]h)number of bytes to allocate from the pool}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hKhj8ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj7hKhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jo)}(hj]h]h Description}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj[ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKhjubh)}(hAllocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.h]hAllocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_dma_alloc (C function)c.gen_pool_dma_allochNtauh1hhhhhhNhNubj)}(hhh](j)}(hOvoid * gen_pool_dma_alloc (struct gen_pool *pool, size_t size, dma_addr_t *dma)h]j)}(hMvoid *gen_pool_dma_alloc(struct gen_pool *pool, size_t size, dma_addr_t *dma)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMUubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhjhMUubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMUubj)}(hgen_pool_dma_alloch]jF)}(hgen_pool_dma_alloch]hgen_pool_dma_alloc}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMUubj)}(h5(struct gen_pool *pool, size_t size, dma_addr_t *dma)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj modnameN classnameNjcjf)}ji]jl)}j_jsbc.gen_pool_dma_allocasbuh1hhjubj2)}(h h]h }(hj*hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hj8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hpoolh]hpool}(hjEhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jF)}(hsize_th]hsize_t}(hjahhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj^ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjcmodnameN classnameNjcjf)}ji]j&c.gen_pool_dma_allocasbuh1hhjZubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjZubjF)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjZubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hdma_addr_t *dmah](h)}(hhh]jF)}(h dma_addr_th]h dma_addr_t}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]j&c.gen_pool_dma_allocasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hdmah]hdma}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMUubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjhhhjhMUubah}(h]jah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjhMUhjhhubj>)}(hhh]h)}(h3allocate special memory from the pool for DMA usageh]h3allocate special memory from the pool for DMA usage}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMIhj hhubah}(h]h ]h"]h$]h&]uh1j=hjhhhjhMUubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_j$j`j$jajbjcuh1jhhhhhNhNubje)}(hX**Parameters** ``struct gen_pool *pool`` pool to allocate from ``size_t size`` number of bytes to allocate from the pool ``dma_addr_t *dma`` dma-view physical address return value. Use ``NULL`` if unneeded. **Description** Allocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation. **Return** virtual address of the allocated memory, or ``NULL`` on failureh](h)}(h**Parameters**h]jo)}(hj.h]h Parameters}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj,ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMMhj(ubj)}(hhh](j)}(h0``struct gen_pool *pool`` pool to allocate from h](j)}(h``struct gen_pool *pool``h]j)}(hjMh]hstruct gen_pool *pool}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMJhjGubj)}(hhh]h)}(hpool to allocate fromh]hpool to allocate from}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhMJhjcubah}(h]h ]h"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]uh1jhjbhMJhjDubj)}(h:``size_t size`` number of bytes to allocate from the 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&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMKhjubj)}(hhh]h)}(h)number of bytes to allocate from the poolh]h)number of bytes to allocate from the pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMKhjDubj)}(hW``dma_addr_t *dma`` dma-view physical address return value. Use ``NULL`` if unneeded. h](j)}(h``dma_addr_t *dma``h]j)}(hjh]hdma_addr_t *dma}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMLhjubj)}(hhh]h)}(hBdma-view physical address return value. Use ``NULL`` if unneeded.h](h-dma-view physical address return value. Use }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if unneeded.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMLhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMLhjDubeh}(h]h ]h"]h$]h&]uh1jhj(ubh)}(h**Description**h]jo)}(hj h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMNhj(ubh)}(hAllocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.h]hAllocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMNhj(ubh)}(h **Return**h]jo)}(hj3h]hReturn}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj1ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMShj(ubh)}(h?virtual address of the allocated memory, or ``NULL`` on failureh](h,virtual address of the allocated memory, or }(hjIhhhNhNubj)}(h``NULL``h]hNULL}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh on failure}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMShj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j  gen_pool_free_owner (C function)c.gen_pool_free_ownerhNtauh1hhhhhhNhNubj)}(hhh](j)}(h_void gen_pool_free_owner (struct gen_pool *pool, unsigned long addr, size_t size, void **owner)h]j)}(h^void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr, size_t size, void **owner)h](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhjhMubj)}(hgen_pool_free_ownerh]jF)}(hgen_pool_free_ownerh]hgen_pool_free_owner}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMubj)}(hF(struct gen_pool *pool, unsigned long addr, size_t size, void **owner)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jl)}j_jsbc.gen_pool_free_ownerasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hpoolh]hpool}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned long addrh](j)}(hunsignedh]hunsigned}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj2)}(h h]h }(hjGhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj5ubj)}(hlongh]hlong}(hjUhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj2)}(h h]h }(hjchhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj5ubjF)}(haddrh]haddr}(hjqhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj5ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jF)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jc.gen_pool_free_ownerasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubjF)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h void **ownerh](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hownerh]howner}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjhhhjhMubah}(h]j}ah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjhMhjhhubj>)}(hhh]h)}(h.free allocated special memory back to the poolh]h.free allocated special memory back to the pool}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhj/hhubah}(h]h ]h"]h$]h&]uh1j=hjhhhjhMubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_jJj`jJjajbjcuh1jhhhhhNhNubje)}(hX**Parameters** ``struct gen_pool *pool`` pool to free to ``unsigned long addr`` starting address of memory to free back to pool ``size_t size`` size in bytes of memory to free ``void **owner`` private data stashed at gen_pool_add() time **Description** Free previously allocated special memory back to the specified pool. Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.h](h)}(h**Parameters**h]jo)}(hjTh]h Parameters}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjRubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjNubj)}(hhh](j)}(h*``struct gen_pool *pool`` pool to free to h](j)}(h``struct gen_pool *pool``h]j)}(hjsh]hstruct gen_pool *pool}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjmubj)}(hhh]h)}(hpool to free toh]hpool to free to}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]uh1jhjhMhjjubj)}(hG``unsigned long addr`` starting address of memory to free back to pool h](j)}(h``unsigned long addr``h]j)}(hjh]hunsigned long addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjubj)}(hhh]h)}(h/starting address of memory to free back to poolh]h/starting address of memory to free back to pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjjubj)}(h0``size_t size`` size in bytes of memory to free 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&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjubj)}(hhh]h)}(hsize in bytes of memory to freeh]hsize in bytes of memory to free}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjjubj)}(h=``void **owner`` private data stashed at gen_pool_add() time h](j)}(h``void **owner``h]j)}(hjh]h void **owner}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjubj)}(hhh]h)}(h+private data stashed at gen_pool_add() timeh]h+private data stashed at gen_pool_add() time}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMhj4ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj3hMhjjubeh}(h]h ]h"]h$]h&]uh1jhjNubh)}(h**Description**h]jo)}(hjYh]h Description}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjWubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjNubh)}(hFree previously allocated special memory back to the specified pool. Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.h]hFree previously allocated special memory back to the specified pool. Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjNubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hXAs one would expect, gen_pool_alloc() will allocate size< bytes from the given pool. The gen_pool_dma_alloc() variant allocates memory for use with DMA operations, returning the associated physical address in the space pointed to by dma. This will only work if the memory was added with gen_pool_add_virt(). Note that this function departs from the usual genpool pattern of using unsigned long values to represent kernel addresses; it returns a void * instead.h]hXAs one would expect, gen_pool_alloc() will allocate size< bytes from the given pool. The gen_pool_dma_alloc() variant allocates memory for use with DMA operations, returning the associated physical address in the space pointed to by dma. This will only work if the memory was added with gen_pool_add_virt(). Note that this function departs from the usual genpool pattern of using unsigned long values to represent kernel addresses; it returns a void * instead.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhhhhubh)}(hX4That all seems relatively simple; indeed, some developers clearly found it to be too simple. After all, the interface above provides no control over how the allocation functions choose which specific piece of memory to return. If that sort of control is needed, the following functions will be of interest:h]hX4That all seems relatively simple; indeed, some developers clearly found it to be too simple. After all, the interface above provides no control over how the allocation functions choose which specific piece of memory to return. If that sort of control is needed, the following functions will be of interest:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhhhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j &gen_pool_alloc_algo_owner (C function)c.gen_pool_alloc_algo_ownerhNtauh1hhhhhhNhNubj)}(hhh](j)}(h{unsigned long gen_pool_alloc_algo_owner (struct gen_pool *pool, size_t size, genpool_algo_t algo, void *data, void **owner)h]j)}(hzunsigned long gen_pool_alloc_algo_owner(struct gen_pool *pool, size_t size, genpool_algo_t algo, void *data, void **owner)h](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chMubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhjhMubj)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhjhMubj)}(hgen_pool_alloc_algo_ownerh]jF)}(hgen_pool_alloc_algo_ownerh]hgen_pool_alloc_algo_owner}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMubj)}(hS(struct gen_pool *pool, size_t size, genpool_algo_t algo, void *data, void **owner)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj1hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj.ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj3modnameN classnameNjcjf)}ji]jl)}j_jsbc.gen_pool_alloc_algo_ownerasbuh1hhjubj2)}(h h]h }(hjQhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hpoolh]hpool}(hjlhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h size_t sizeh](h)}(hhh]jF)}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jMc.gen_pool_alloc_algo_ownerasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubjF)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hgenpool_algo_t algoh](h)}(hhh]jF)}(hgenpool_algo_th]hgenpool_algo_t}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jMc.gen_pool_alloc_algo_ownerasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubjF)}(halgoh]halgo}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h void *datah](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj2)}(h h]h }(hj#hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hdatah]hdata}(hj>hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h void **ownerh](j)}(hvoidh]hvoid}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubj2)}(h h]h }(hjehhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjSubj)}(hjh]h*}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjSubjF)}(hownerh]howner}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjSubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjhhhjhMubah}(h]jah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjhMhjhhubj>)}(hhh]h)}(h%allocate special memory from the poolh]h%allocate special memory from the pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chM hjhhubah}(h]h ]h"]h$]h&]uh1j=hjhhhjhMubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_jj`jjajbjcuh1jhhhhhNhNubje)}(hX **Parameters** ``struct gen_pool *pool`` pool to allocate from ``size_t size`` number of bytes to allocate from the pool ``genpool_algo_t algo`` algorithm passed from caller ``void *data`` data passed to algorithm ``void **owner`` optionally retrieve the chunk owner **Description** Allocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.h](h)}(h**Parameters**h]jo)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chM hjubj)}(hhh](j)}(h0``struct gen_pool *pool`` pool to allocate from h](j)}(h``struct gen_pool *pool``h]j)}(hjh]hstruct gen_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chM hjubj)}(hhh]h)}(hpool to allocate fromh]hpool to allocate from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hM hjubj)}(h:``size_t size`` number of bytes to allocate from the pool h](j)}(h``size_t size``h]j)}(hj1h]h size_t size}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chM hj+ubj)}(hhh]h)}(h)number of bytes to allocate from the poolh]h)number of bytes to allocate from the pool}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhM hjGubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1jhjFhM hjubj)}(h5``genpool_algo_t algo`` algorithm passed from caller h](j)}(h``genpool_algo_t algo``h]j)}(hjjh]hgenpool_algo_t algo}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chM hjdubj)}(hhh]h)}(halgorithm passed from callerh]halgorithm passed from caller}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjdubeh}(h]h ]h"]h$]h&]uh1jhjhM hjubj)}(h(``void *data`` data passed to algorithm h](j)}(h``void *data``h]j)}(hjh]h void *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chM hjubj)}(hhh]h)}(hdata passed to algorithmh]hdata passed to algorithm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM hjubj)}(h5``void **owner`` optionally retrieve the chunk owner h](j)}(h``void **owner``h]j)}(hjh]h void **owner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chMhjubj)}(hhh]h)}(h#optionally retrieve the chunk ownerh]h#optionally retrieve the chunk owner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jo)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chMhjubh)}(hAllocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.h]hAllocate the requested number of bytes from the specified pool. Uses the pool allocation function (with first-fit algorithm by default). Can not be used in NMI handler on architectures without NMI-safe cmpxchg implementation.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_set_algo (C function)c.gen_pool_set_algohNtauh1hhhhhhNhNubj)}(hhh](j)}(hOvoid gen_pool_set_algo (struct gen_pool *pool, genpool_algo_t algo, void *data)h]j)}(hNvoid gen_pool_set_algo(struct gen_pool *pool, genpool_algo_t algo, void *data)h](j)}(hvoidh]hvoid}(hj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMnubj2)}(h h]h }(hjkhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjXhhhjjhMnubj)}(hgen_pool_set_algoh]jF)}(hgen_pool_set_algoh]hgen_pool_set_algo}(hj}hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjyubah}(h]h ](jjeh"]h$]h&]jjuh1jhjXhhhjjhMnubj)}(h8(struct gen_pool *pool, genpool_algo_t algo, void *data)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jl)}j_jsbc.gen_pool_set_algoasbuh1hhjubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hpoolh]hpool}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hgenpool_algo_t algoh](h)}(hhh]jF)}(hgenpool_algo_th]hgenpool_algo_t}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jc.gen_pool_set_algoasbuh1hhjubj2)}(h h]h }(hj,hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubjF)}(halgoh]halgo}(hj:hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h void *datah](j)}(hvoidh]hvoid}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubj2)}(h h]h }(hjahhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjOubj)}(hjh]h*}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubjF)}(hdatah]hdata}(hj|hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjOubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjXhhhjjhMnubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjThhhjjhMnubah}(h]jOah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjjhMnhjQhhubj>)}(hhh]h)}(hset the allocation algorithmh]hset the allocation algorithm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMehjhhubah}(h]h ]h"]h$]h&]uh1j=hjQhhhjjhMnubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_jj`jjajbjcuh1jhhhhhNhNubje)}(hXQ**Parameters** ``struct gen_pool *pool`` pool to change allocation algorithm ``genpool_algo_t algo`` custom algorithm function ``void *data`` additional data used by **algo** **Description** Call **algo** for each memory allocation in the pool. If **algo** is NULL use gen_pool_first_fit as default memory allocation function.h](h)}(h**Parameters**h]jo)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMihjubj)}(hhh](j)}(h>``struct gen_pool *pool`` pool to change allocation algorithm h](j)}(h``struct gen_pool *pool``h]j)}(hjh]hstruct gen_pool *pool}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMfhjubj)}(hhh]h)}(h#pool to change allocation algorithmh]h#pool to change allocation algorithm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMfhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMfhjubj)}(h2``genpool_algo_t algo`` custom algorithm function h](j)}(h``genpool_algo_t algo``h]j)}(hj h]hgenpool_algo_t algo}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMghjubj)}(hhh]h)}(hcustom algorithm functionh]hcustom algorithm function}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMghj6ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj5hMghjubj)}(h0``void *data`` additional data used by **algo** h](j)}(h``void *data``h]j)}(hjYh]h void *data}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMhhjSubj)}(hhh]h)}(h additional data used by **algo**h](hadditional data used by }(hjrhhhNhNubjo)}(h**algo**h]halgo}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjrubeh}(h]h ]h"]h$]h&]uh1hhjnhMhhjoubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjnhMhhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jo)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMjhjubh)}(hCall **algo** for each memory allocation in the pool. If **algo** is NULL use gen_pool_first_fit as default memory allocation function.h](hCall }(hjhhhNhNubjo)}(h**algo**h]halgo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubh, for each memory allocation in the pool. If }(hjhhhNhNubjo)}(h**algo**h]halgo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubhF is NULL use gen_pool_first_fit as default memory allocation function.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMjhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hXeAllocations with gen_pool_alloc_algo() specify an algorithm to be used to choose the memory to be allocated; the default algorithm can be set with gen_pool_set_algo(). The data value is passed to the algorithm; most ignore it, but it is occasionally needed. One can, naturally, write a special-purpose algorithm, but there is a fair set already available:h]hXeAllocations with gen_pool_alloc_algo() specify an algorithm to be used to choose the memory to be allocated; the default algorithm can be set with gen_pool_set_algo(). The data value is passed to the algorithm; most ignore it, but it is occasionally needed. One can, naturally, write a special-purpose algorithm, but there is a fair set already available:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahhhhubh bullet_list)}(hhh](h list_item)}(htgen_pool_first_fit is a simple first-fit allocator; this is the default algorithm if none other has been specified. h]h)}(hsgen_pool_first_fit is a simple first-fit allocator; this is the default algorithm if none other has been specified.h]hsgen_pool_first_fit is a simple first-fit allocator; this is the default algorithm if none other has been specified.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hgen_pool_first_fit_align forces the allocation to have a specific alignment (passed via data in a genpool_data_align structure). h]h)}(hgen_pool_first_fit_align forces the allocation to have a specific alignment (passed via data in a genpool_data_align structure).h]hgen_pool_first_fit_align forces the allocation to have a specific alignment (passed via data in a genpool_data_align structure).}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hgen_pool_first_fit_order_align aligns the allocation to the order of the size. A 60-byte allocation will thus be 64-byte aligned, for example. h]h)}(hgen_pool_first_fit_order_align aligns the allocation to the order of the size. A 60-byte allocation will thus be 64-byte aligned, for example.h]hgen_pool_first_fit_order_align aligns the allocation to the order of the size. A 60-byte allocation will thus be 64-byte aligned, for example.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj7ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hHgen_pool_best_fit, as one would expect, is a simple best-fit allocator. h]h)}(hGgen_pool_best_fit, as one would expect, is a simple best-fit allocator.h]hGgen_pool_best_fit, as one would expect, is a simple best-fit allocator.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjOubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hgen_pool_fixed_alloc allocates at a specific offset (passed in a genpool_data_fixed structure via the data parameter) within the pool. If the indicated memory is not available the allocation fails. h]h)}(hgen_pool_fixed_alloc allocates at a specific offset (passed in a genpool_data_fixed structure via the data parameter) within the pool. If the indicated memory is not available the allocation fails.h]hgen_pool_fixed_alloc allocates at a specific offset (passed in a genpool_data_fixed structure via the data parameter) within the pool. If the indicated memory is not available the allocation fails.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjgubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhKhhhhhubh)}(hX_There is a handful of other functions, mostly for purposes like querying the space available in the pool or iterating through chunks of memory. Most users, however, should not need much beyond what has been described above. With luck, wider awareness of this module will help to prevent the writing of special-purpose memory allocators in the future.h]hX_There is a handful of other functions, mostly for purposes like querying the space available in the pool or iterating through chunks of memory. Most users, however, should not need much beyond what has been described above. With luck, wider awareness of this module will help to prevent the writing of special-purpose memory allocators in the future.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhhhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j "gen_pool_virt_to_phys (C function)c.gen_pool_virt_to_physhNtauh1hhhhhhNhNubj)}(hhh](j)}(hMphys_addr_t gen_pool_virt_to_phys (struct gen_pool *pool, unsigned long addr)h]j)}(hLphys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long addr)h](h)}(hhh]jF)}(h phys_addr_th]h phys_addr_t}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjmodnameN classnameNjcjf)}ji]jl)}j_gen_pool_virt_to_physsbc.gen_pool_virt_to_physasbuh1hhjhhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjhhhjhKubj)}(hgen_pool_virt_to_physh]jF)}(hjh]hgen_pool_virt_to_phys}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhKubj)}(h+(struct gen_pool *pool, unsigned long addr)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjhhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj modnameN classnameNjcjf)}ji]jc.gen_pool_virt_to_physasbuh1hhjubj2)}(h h]h }(hj<hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjubj)}(hjh]h*}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjF)}(hpoolh]hpool}(hjWhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned long addrh](j)}(hunsignedh]hunsigned}(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj2)}(h h]h }(hj~hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjlubj)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubj2)}(h h]h }(hjhhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjlubjF)}(haddrh]haddr}(hjhhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjlubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjhhhjhKubah}(h]jah ](j5j6eh"]h$]h&]j:j;)j<huh1jhjhKhjhhubj>)}(hhh]h)}(h%return the physical address of memoryh]h%return the physical address of memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhjhhubah}(h]h ]h"]h$]h&]uh1j=hjhhhjhKubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_jj`jjajbjcuh1jhhhhhNhNubje)}(h**Parameters** ``struct gen_pool *pool`` pool to allocate from ``unsigned long addr`` starting address of memory **Description** Returns the physical address on success, or -1 on error.h](h)}(h**Parameters**h]jo)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhjubj)}(hhh](j)}(h0``struct gen_pool *pool`` pool to allocate from h](j)}(h``struct gen_pool *pool``h]j)}(hj h]hstruct gen_pool *pool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhj ubj)}(hhh]h)}(hpool to allocate fromh]hpool to allocate from}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj( hKhj) ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj( hKhj ubj)}(h2``unsigned long addr`` starting address of memory h](j)}(h``unsigned long addr``h]j)}(hjL h]hunsigned long addr}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhjF ubj)}(hhh]h)}(hstarting address of memoryh]hstarting address of memory}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1hhja hKhjb ubah}(h]h ]h"]h$]h&]uh1jhjF ubeh}(h]h ]h"]h$]h&]uh1jhja hKhj ubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jo)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhjubh)}(h8Returns the physical address on success, or -1 on error.h]h8Returns the physical address on success, or -1 on error.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j $gen_pool_for_each_chunk (C function)c.gen_pool_for_each_chunkhNtauh1hhhhhhNhNubj)}(hhh](j)}(hvoid gen_pool_for_each_chunk (struct gen_pool *pool, void (*func)(struct gen_pool *pool, struct gen_pool_chunk *chunk, void *data), void *data)h]j)}(hvoid gen_pool_for_each_chunk(struct gen_pool *pool, void (*func)(struct gen_pool *pool, struct gen_pool_chunk *chunk, void *data), void *data)h](j)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chMubj2)}(h h]h }(hj hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj hhhj hMubj)}(hgen_pool_for_each_chunkh]jF)}(hgen_pool_for_each_chunkh]hgen_pool_for_each_chunk}(hj hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj hMubj)}(hr(struct gen_pool *pool, void (*func)(struct gen_pool *pool, struct gen_pool_chunk *chunk, void *data), void *data)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hj !hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj!ubj2)}(h h]h }(hj!hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj!ubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj'!hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj$!ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj)!modnameN classnameNjcjf)}ji]jl)}j_j sbc.gen_pool_for_each_chunkasbuh1hhj!ubj2)}(h h]h }(hjG!hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj!ubj)}(hjh]h*}(hjU!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubjF)}(hpoolh]hpool}(hjb!hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj!ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj!ubj)}(hMvoid (*func)(struct gen_pool *pool, struct gen_pool_chunk *chunk, void *data)h](j)}(hvoidh]hvoid}(hj{!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubj2)}(h h]h }(hj!hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjw!ubj)}(h(h]h(}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubj)}(hjh]h*}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubjF)}(hfunch]hfunc}(hj!hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjw!ubj)}(h)h]h)}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubj)}(hj!h]h(}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubj )}(hj#h]hstruct}(hj!hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjw!ubj2)}(h h]h }(hj!hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjw!ubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj!hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj!ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj!modnameN classnameNjcjf)}ji]jC!c.gen_pool_for_each_chunkasbuh1hhjw!ubj2)}(h h]h }(hj"hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjw!ubj)}(hjh]h*}(hj%"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubjF)}(hpoolh]hpool}(hj2"hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjw!ubj)}(h,h]h,}(hj@"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubj2)}(h h]h }(hjN"hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjw!ubj )}(hj#h]hstruct}(hj\"hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjw!ubj2)}(h h]h }(hji"hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjw!ubh)}(hhh]jF)}(hgen_pool_chunkh]hgen_pool_chunk}(hjz"hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjw"ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj|"modnameN classnameNjcjf)}ji]jC!c.gen_pool_for_each_chunkasbuh1hhjw!ubj2)}(h h]h }(hj"hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjw!ubj)}(hjh]h*}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubjF)}(hchunkh]hchunk}(hj"hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjw!ubj)}(hjB"h]h,}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubj2)}(h h]h }(hj"hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjw!ubj)}(hvoidh]hvoid}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubj2)}(h h]h }(hj"hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjw!ubj)}(hjh]h*}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubjF)}(hdatah]hdata}(hj#hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjw!ubj)}(hj!h]h)}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjw!ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj!ubj)}(h void *datah](j)}(hvoidh]hvoid}(hj+#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'#ubj2)}(h h]h }(hj9#hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj'#ubj)}(hjh]h*}(hjG#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'#ubjF)}(hdatah]hdata}(hjT#hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj'#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj!ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hj hhhj hMubah}(h]j ah ](j5j6eh"]h$]h&]j:j;)j<huh1jhj hMhj hhubj>)}(hhh]h)}(h0call func for every chunk of generic memory poolh]h0call func for every chunk of generic memory pool}(hj~#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chM hj{#hhubah}(h]h ]h"]h$]h&]uh1j=hj hhhj hMubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_j#j`j#jajbjcuh1jhhhhhNhNubje)}(hXQ**Parameters** ``struct gen_pool *pool`` the generic memory pool ``void (*func)(struct gen_pool *pool, struct gen_pool_chunk *chunk, void *data)`` func to call ``void *data`` additional data used by **func** **Description** Call **func** for every chunk of generic memory pool. The **func** is called with rcu_read_lock held.h](h)}(h**Parameters**h]jo)}(hj#h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj#ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chMhj#ubj)}(hhh](j)}(h2``struct gen_pool *pool`` the generic memory pool h](j)}(h``struct gen_pool *pool``h]j)}(hj#h]hstruct gen_pool *pool}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chM hj#ubj)}(hhh]h)}(hthe generic memory poolh]hthe generic memory pool}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hM hj#ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#hM hj#ubj)}(h_``void (*func)(struct gen_pool *pool, struct gen_pool_chunk *chunk, void *data)`` func to call h](j)}(hQ``void (*func)(struct gen_pool *pool, struct gen_pool_chunk *chunk, void *data)``h]j)}(hj#h]hMvoid (*func)(struct gen_pool *pool, struct gen_pool_chunk *chunk, void *data)}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chM hj#ubj)}(hhh]h)}(h func to callh]h func to call}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj $hM hj$ubah}(h]h ]h"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]uh1jhj $hM hj#ubj)}(h0``void *data`` additional data used by **func** h](j)}(h``void *data``h]j)}(hj1$h]h void *data}(hj3$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/$ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chMhj+$ubj)}(hhh]h)}(h additional data used by **func**h](hadditional data used by }(hjJ$hhhNhNubjo)}(h**func**h]hfunc}(hjR$hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjJ$ubeh}(h]h ]h"]h$]h&]uh1hhjF$hMhjG$ubah}(h]h ]h"]h$]h&]uh1jhj+$ubeh}(h]h ]h"]h$]h&]uh1jhjF$hMhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#ubh)}(h**Description**h]jo)}(hjz$h]h Description}(hj|$hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjx$ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chMhj#ubh)}(hfCall **func** for every chunk of generic memory pool. The **func** is called with rcu_read_lock held.h](hCall }(hj$hhhNhNubjo)}(h**func**h]hfunc}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj$ubh. for every chunk of generic memory pool. The }(hj$hhhNhNubjo)}(h**func**h]hfunc}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj$ubh# is called with rcu_read_lock held.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chMhj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_has_addr (C function)c.gen_pool_has_addrhNtauh1hhhhhhNhNubj)}(hhh](j)}(hPbool gen_pool_has_addr (struct gen_pool *pool, unsigned long start, size_t size)h]j)}(hObool gen_pool_has_addr(struct gen_pool *pool, unsigned long start, size_t size)h](j)}(hboolh]hbool}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM)ubj2)}(h h]h }(hj$hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj$hhhj$hM)ubj)}(hgen_pool_has_addrh]jF)}(hgen_pool_has_addrh]hgen_pool_has_addr}(hj%hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj%ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj$hhhj$hM)ubj)}(h9(struct gen_pool *pool, unsigned long start, size_t size)h](j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hj %hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj%ubj2)}(h h]h }(hj-%hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj%ubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj>%hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj;%ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj@%modnameN classnameNjcjf)}ji]jl)}j_j%sbc.gen_pool_has_addrasbuh1hhj%ubj2)}(h h]h }(hj^%hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj%ubj)}(hjh]h*}(hjl%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubjF)}(hpoolh]hpool}(hjy%hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%ubj)}(hunsigned long starth](j)}(hunsignedh]hunsigned}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj2)}(h h]h }(hj%hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj%ubj)}(hlongh]hlong}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj2)}(h h]h }(hj%hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj%ubjF)}(hstarth]hstart}(hj%hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%ubj)}(h size_t sizeh](h)}(hhh]jF)}(hsize_th]hsize_t}(hj%hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj%ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj%modnameN classnameNjcjf)}ji]jZ%c.gen_pool_has_addrasbuh1hhj%ubj2)}(h h]h }(hj&hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj%ubjF)}(hsizeh]hsize}(hj&hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj%ubeh}(h]h ]h"]h$]h&]jjuh1jhj$hhhj$hM)ubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hj$hhhj$hM)ubah}(h]j$ah ](j5j6eh"]h$]h&]j:j;)j<huh1jhj$hM)hj$hhubj>)}(hhh]h)}(h5checks if an address falls within the range of a poolh]h5checks if an address falls within the range of a pool}(hj<&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM!hj9&hhubah}(h]h ]h"]h$]h&]uh1j=hj$hhhj$hM)ubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_jT&j`jT&jajbjcuh1jhhhhhNhNubje)}(hX4**Parameters** ``struct gen_pool *pool`` the generic memory pool ``unsigned long start`` start address ``size_t size`` size of the region **Description** Check if the range of addresses falls within the specified pool. Returns true if the entire range is contained in the pool and false otherwise.h](h)}(h**Parameters**h]jo)}(hj^&h]h Parameters}(hj`&hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj\&ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM%hjX&ubj)}(hhh](j)}(h2``struct gen_pool *pool`` the generic memory pool h](j)}(h``struct gen_pool *pool``h]j)}(hj}&h]hstruct gen_pool *pool}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{&ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM"hjw&ubj)}(hhh]h)}(hthe generic memory poolh]hthe generic memory pool}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hM"hj&ubah}(h]h ]h"]h$]h&]uh1jhjw&ubeh}(h]h ]h"]h$]h&]uh1jhj&hM"hjt&ubj)}(h&``unsigned long start`` start address h](j)}(h``unsigned long start``h]j)}(hj&h]hunsigned long start}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM#hj&ubj)}(hhh]h)}(h start addressh]h start address}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hM#hj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj&hM#hjt&ubj)}(h#``size_t size`` size of the region h](j)}(h``size_t size``h]j)}(hj&h]h size_t size}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM$hj&ubj)}(hhh]h)}(hsize of the regionh]hsize of the region}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hM$hj'ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj'hM$hjt&ubeh}(h]h ]h"]h$]h&]uh1jhjX&ubh)}(h**Description**h]jo)}(hj*'h]h Description}(hj,'hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj('ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM&hjX&ubh)}(hCheck if the range of addresses falls within the specified pool. Returns true if the entire range is contained in the pool and false otherwise.h]hCheck if the range of addresses falls within the specified pool. Returns true if the entire range is contained in the pool and false otherwise.}(hj@'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM&hjX&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_avail (C function)c.gen_pool_availhNtauh1hhhhhhNhNubj)}(hhh](j)}(h-size_t gen_pool_avail (struct gen_pool *pool)h]j)}(h,size_t gen_pool_avail(struct gen_pool *pool)h](h)}(hhh]jF)}(hsize_th]hsize_t}(hjr'hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjo'ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetjt'modnameN classnameNjcjf)}ji]jl)}j_gen_pool_availsbc.gen_pool_availasbuh1hhjk'hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chMDubj2)}(h h]h }(hj'hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjk'hhhj'hMDubj)}(hgen_pool_availh]jF)}(hj'h]hgen_pool_avail}(hj'hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj'ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjk'hhhj'hMDubj)}(h(struct gen_pool *pool)h]j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hj'hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj'ubj2)}(h h]h }(hj'hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj'ubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj'hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj'ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj'modnameN classnameNjcjf)}ji]j'c.gen_pool_availasbuh1hhj'ubj2)}(h h]h }(hj'hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj'ubj)}(hjh]h*}(hj (hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjF)}(hpoolh]hpool}(hj(hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj'ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'ubah}(h]h ]h"]h$]h&]jjuh1jhjk'hhhj'hMDubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hjg'hhhj'hMDubah}(h]jb'ah ](j5j6eh"]h$]h&]j:j;)j<huh1jhj'hMDhjd'hhubj>)}(hhh]h)}(h$get available free space of the poolh]h$get available free space of the pool}(hjB(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chM?hj?(hhubah}(h]h ]h"]h$]h&]uh1j=hjd'hhhj'hMDubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_jZ(j`jZ(jajbjcuh1jhhhhhNhNubje)}(h**Parameters** ``struct gen_pool *pool`` pool to get available free space **Description** Return available free space of the specified pool.h](h)}(h**Parameters**h]jo)}(hjd(h]h Parameters}(hjf(hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjb(ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chMChj^(ubj)}(hhh]j)}(h;``struct gen_pool *pool`` pool to get available free space h](j)}(h``struct gen_pool *pool``h]j)}(hj(h]hstruct gen_pool *pool}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chM@hj}(ubj)}(hhh]h)}(h pool to get available free spaceh]h pool to get available free space}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hM@hj(ubah}(h]h ]h"]h$]h&]uh1jhj}(ubeh}(h]h ]h"]h$]h&]uh1jhj(hM@hjz(ubah}(h]h ]h"]h$]h&]uh1jhj^(ubh)}(h**Description**h]jo)}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj(ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chMBhj^(ubh)}(h2Return available free space of the specified pool.h]h2Return available free space of the specified pool.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chMBhj^(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_size (C function)c.gen_pool_sizehNtauh1hhhhhhNhNubj)}(hhh](j)}(h,size_t gen_pool_size (struct gen_pool *pool)h]j)}(h+size_t gen_pool_size(struct gen_pool *pool)h](h)}(hhh]jF)}(hsize_th]hsize_t}(hj)hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj)ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj)modnameN classnameNjcjf)}ji]jl)}j_ gen_pool_sizesbc.gen_pool_sizeasbuh1hhj(hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:137: ./lib/genalloc.chMWubj2)}(h h]h }(hj()hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj(hhhj')hMWubj)}(h gen_pool_sizeh]jF)}(hj$)h]h gen_pool_size}(hj:)hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj6)ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj(hhhj')hMWubj)}(h(struct gen_pool *pool)h]j)}(hstruct gen_pool *poolh](j )}(hj#h]hstruct}(hjU)hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhjQ)ubj2)}(h h]h }(hjb)hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjQ)ubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hjs)hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjp)ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetju)modnameN classnameNjcjf)}ji]j")c.gen_pool_sizeasbuh1hhjQ)ubj2)}(h h]h }(hj)hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hjQ)ubj)}(hjh]h*}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjQ)ubjF)}(hpoolh]hpool}(hj)hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjQ)ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjM)ubah}(h]h ]h"]h$]h&]jjuh1jhj(hhhj')hMWubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hj(hhhj')hMWubah}(h]j(ah ](j5j6eh"]h$]h&]j:j;)j<huh1jhj')hMWhj(hhubj>)}(hhh]h)}(h/get size in bytes of memory managed by the poolh]h/get size in bytes of memory managed by the pool}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:137: ./lib/genalloc.chMRhj)hhubah}(h]h ]h"]h$]h&]uh1j=hj(hhhj')hMWubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_j)j`j)jajbjcuh1jhhhhhNhNubje)}(h**Parameters** ``struct gen_pool *pool`` pool to get size **Description** Return size in bytes of memory managed by the pool.h](h)}(h**Parameters**h]jo)}(hj)h]h Parameters}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj)ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:137: ./lib/genalloc.chMVhj)ubj)}(hhh]j)}(h+``struct gen_pool *pool`` pool to get size h](j)}(h``struct gen_pool *pool``h]j)}(hj*h]hstruct gen_pool *pool}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:137: ./lib/genalloc.chMShj*ubj)}(hhh]h)}(hpool to get sizeh]hpool to get size}(hj0*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,*hMShj-*ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1jhj,*hMShj*ubah}(h]h ]h"]h$]h&]uh1jhj)ubh)}(h**Description**h]jo)}(hjR*h]h Description}(hjT*hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjP*ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:137: ./lib/genalloc.chMUhj)ubh)}(h3Return size in bytes of memory managed by the pool.h]h3Return size in bytes of memory managed by the pool.}(hjh*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:137: ./lib/genalloc.chMUhj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j gen_pool_get (C function)c.gen_pool_gethNtauh1hhhhhhNhNubj)}(hhh](j)}(hEstruct gen_pool * gen_pool_get (struct device *dev, const char *name)h]j)}(hCstruct gen_pool *gen_pool_get(struct device *dev, const char *name)h](j )}(hj#h]hstruct}(hj*hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj*hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM&ubj2)}(h h]h }(hj*hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj*hhhj*hM&ubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj*hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj*ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj*modnameN classnameNjcjf)}ji]jl)}j_ gen_pool_getsbc.gen_pool_getasbuh1hhj*hhhj*hM&ubj2)}(h h]h }(hj*hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj*hhhj*g<hM&ubj)}(hjh]h*}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhj*hM&ubj)}(h gen_pool_geth]jF)}(hj*h]h gen_pool_get}(hj*hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj*ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj*hhhj*hM&ubj)}(h&(struct device *dev, const char *name)h](j)}(hstruct device *devh](j )}(hj#h]hstruct}(hj+hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj +ubj2)}(h h]h }(hj+hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj +ubh)}(hhh]jF)}(hdeviceh]hdevice}(hj/+hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj,+ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj1+modnameN classnameNjcjf)}ji]j*c.gen_pool_getasbuh1hhj +ubj2)}(h h]h }(hjM+hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj +ubj)}(hjh]h*}(hj[+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj +ubjF)}(hdevh]hdev}(hjh+hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj +ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj +ubj)}(hconst char *nameh](j )}(hjh]hconst}(hj+hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj}+ubj2)}(h h]h }(hj+hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj}+ubj)}(hcharh]hchar}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}+ubj2)}(h h]h }(hj+hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj}+ubj)}(hjh]h*}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}+ubjF)}(hnameh]hname}(hj+hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj}+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj +ubeh}(h]h ]h"]h$]h&]jjuh1jhj*hhhj*hM&ubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hj*hhhj*hM&ubah}(h]j*ah ](j5j6eh"]h$]h&]j:j;)j<huh1jhj*hM&hj*hhubj>)}(hhh]h)}(h)Obtain the gen_pool (if any) for a deviceh]h)Obtain the gen_pool (if any) for a device}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM hj+hhubah}(h]h ]h"]h$]h&]uh1j=hj*hhhj*hM&ubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_j,j`j,jajbjcuh1jhhhhhNhNubje)}(h**Parameters** ``struct device *dev`` device to retrieve the gen_pool from ``const char *name`` name of a gen_pool or NULL, identifies a particular gen_pool on device **Description** Returns the gen_pool for the device if one is present, or NULL.h](h)}(h**Parameters**h]jo)}(hj,h]h Parameters}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj,ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM$hj ,ubj)}(hhh](j)}(h<``struct device *dev`` device to retrieve the gen_pool from h](j)}(h``struct device *dev``h]j)}(hj0,h]hstruct device *dev}(hj2,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.,ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM!hj*,ubj)}(hhh]h)}(h$device to retrieve the gen_pool fromh]h$device to retrieve the gen_pool from}(hjI,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjE,hM!hjF,ubah}(h]h ]h"]h$]h&]uh1jhj*,ubeh}(h]h ]h"]h$]h&]uh1jhjE,hM!hj',ubj)}(h\``const char *name`` name of a gen_pool or NULL, identifies a particular gen_pool on device h](j)}(h``const char *name``h]j)}(hji,h]hconst char *name}(hjk,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjg,ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM"hjc,ubj)}(hhh]h)}(hFname of a gen_pool or NULL, identifies a particular gen_pool on deviceh]hFname of a gen_pool or NULL, identifies a particular gen_pool on device}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~,hM"hj,ubah}(h]h ]h"]h$]h&]uh1jhjc,ubeh}(h]h ]h"]h$]h&]uh1jhj~,hM"hj',ubeh}(h]h ]h"]h$]h&]uh1jhj ,ubh)}(h**Description**h]jo)}(hj,h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj,ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM$hj ,ubh)}(h?Returns the gen_pool for the device if one is present, or NULL.h]h?Returns the gen_pool for the device if one is present, or NULL.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM$hj ,ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](j of_gen_pool_get (C function)c.of_gen_pool_gethNtauh1hhhhhhNhNubj)}(hhh](j)}(h[struct gen_pool * of_gen_pool_get (struct device_node *np, const char *propname, int index)h]j)}(hYstruct gen_pool *of_gen_pool_get(struct device_node *np, const char *propname, int index)h](j )}(hj#h]hstruct}(hj,hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj,hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMoubj2)}(h h]h }(hj,hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj,hhhj,hMoubh)}(hhh]jF)}(hgen_poolh]hgen_pool}(hj-hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj-ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj -modnameN classnameNjcjf)}ji]jl)}j_of_gen_pool_getsbc.of_gen_pool_getasbuh1hhj,hhhj,hMoubj2)}(h h]h }(hj)-hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj,hhhj,hMoubj)}(hjh]h*}(hj7-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,hhhj,hMoubj)}(hof_gen_pool_geth]jF)}(hj&-h]hof_gen_pool_get}(hjH-hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhjD-ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj,hhhj,hMoubj)}(h9(struct device_node *np, const char *propname, int index)h](j)}(hstruct device_node *nph](j )}(hj#h]hstruct}(hjc-hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj_-ubj2)}(h h]h }(hjp-hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj_-ubh)}(hhh]jF)}(h device_nodeh]h device_node}(hj-hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj~-ubah}(h]h ]h"]h$]h&] refdomainj]reftypej_ reftargetj-modnameN classnameNjcjf)}ji]j$-c.of_gen_pool_getasbuh1hhj_-ubj2)}(h h]h }(hj-hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj_-ubj)}(hjh]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_-ubjF)}(hnph]hnp}(hj-hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj_-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[-ubj)}(hconst char *propnameh](j )}(hjh]hconst}(hj-hhhNhNubah}(h]h ]j,ah"]h$]h&]uh1jhj-ubj2)}(h h]h }(hj-hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj-ubj)}(hcharh]hchar}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj2)}(h h]h }(hj-hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj-ubj)}(hjh]h*}(hj .hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjF)}(hpropnameh]hpropname}(hj.hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[-ubj)}(h int indexh](j)}(hinth]hint}(hj0.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj,.ubj2)}(h h]h }(hj>.hhhNhNubah}(h]h ]j>ah"]h$]h&]uh1j1hj,.ubjF)}(hindexh]hindex}(hjL.hhhNhNubah}(h]h ]jRah"]h$]h&]uh1jEhj,.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj[-ubeh}(h]h ]h"]h$]h&]jjuh1jhj,hhhj,hMoubeh}(h]h ]h"]h$]h&]jjj/uh1jj0j1hj,hhhj,hMoubah}(h]j,ah ](j5j6eh"]h$]h&]j:j;)j<huh1jhj,hMohj,hhubj>)}(hhh]h)}(hfind a pool by phandle propertyh]hfind a pool by phandle property}(hjv.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMfhjs.hhubah}(h]h ]h"]h$]h&]uh1j=hj,hhhj,hMoubeh}(h]h ](j]functioneh"]h$]h&]j^j]j_j.j`j.jajbjcuh1jhhhhhNhNubje)}(hXT**Parameters** ``struct device_node *np`` device node ``const char *propname`` property name containing phandle(s) ``int index`` index into the phandle array **Description** Returns the pool that contains the chunk starting at the physical address of the device tree node pointed at by the phandle property, or NULL if not found.h](h)}(h**Parameters**h]jo)}(hj.h]h Parameters}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhj.ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMjhj.ubj)}(hhh](j)}(h'``struct device_node *np`` device node h](j)}(h``struct device_node *np``h]j)}(hj.h]hstruct device_node *np}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMghj.ubj)}(hhh]h)}(h device nodeh]h device node}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMghj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhj.hMghj.ubj)}(h=``const char *propname`` property name containing phandle(s) h](j)}(h``const char *propname``h]j)}(hj.h]hconst char *propname}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMhhj.ubj)}(hhh]h)}(h#property name containing phandle(s)h]h#property name containing phandle(s)}(hj /hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhhj/ubah}(h]h ]h"]h$]h&]uh1jhj.ubeh}(h]h ]h"]h$]h&]uh1jhj/hMhhj.ubj)}(h+``int index`` index into the phandle array h](j)}(h ``int index``h]j)}(hj)/h]h int index}(hj+/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'/ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMihj#/ubj)}(hhh]h)}(hindex into the phandle arrayh]hindex into the phandle array}(hjB/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>/hMihj?/ubah}(h]h ]h"]h$]h&]uh1jhj#/ubeh}(h]h ]h"]h$]h&]uh1jhj>/hMihj.ubeh}(h]h ]h"]h$]h&]uh1jhj.ubh)}(h**Description**h]jo)}(hjd/h]h Description}(hjf/hhhNhNubah}(h]h ]h"]h$]h&]uh1jnhjb/ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMkhj.ubh)}(hReturns the pool that contains the chunk starting at the physical address of the device tree node pointed at by the phandle property, or NULL if not found.h]hReturns the pool that contains the chunk starting at the physical address of the device tree node pointed at by the phandle property, or NULL if not found.}(hjz/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMkhj.ubeh}(h]h ] kernelindentah"]h$]h&]uh1jdhhhhhNhNubeh}(h]the-genalloc-genpool-subsystemah ]h"]the genalloc/genpool subsystemah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_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}posted]hasrefids}nameids}(j/j/hhu nametypes}(j/huh}(j/hhhj jjCjHjjjKjPjU jZ jwj|jjj}jjjjOjTjjj j j$j$jb'jg'j(j(j*j*j,j,u 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.