sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget%/translations/zh_CN/core-api/genallocmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/zh_TW/core-api/genallocmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/it_IT/core-api/genallocmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/ja_JP/core-api/genallocmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget%/translations/ko_KR/core-api/genallocmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(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}(hhhhhhhNhNubah}(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 }(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}(hpostedhhhhhNhNubah}(h]h ]h"]h$]h&]nameȟrefuri 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.}(h 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:}(hhhhhhhNhNubah}(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}(hhhj#hhhNhNubah}(h]h ]kah"]h$]h&]uh1j!hjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKubhdesc_sig_space)}(h h]h }(hhhj5hhhNhNubah}(h]h ]wah"]h$]h&]uh1j3hjhhhj2hKubh)}(hhh]h desc_sig_name)}(hgen_poolh]hgen_pool}(hhhjIhhhNhNubah}(h]h ]nah"]h$]h&]uh1jGhjDubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjKmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jf ASTIdentifier)}jagen_pool_createsbc.gen_pool_createasbuh1hhjhhhj2hKubj4)}(h h]h }(hhhjthhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhj2hKubhdesc_sig_punctuation)}(h*h]h*}(hhhjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjhhhj2hKubh desc_name)}(hgen_pool_createh]jH)}(hjqh]hgen_pool_create}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ](sig-namedescnameeh"]h$]h&] xml:spacepreserveuh1jhjhhhj2hKubhdesc_parameterlist)}(h(int min_alloc_order, int nid)h](hdesc_parameter)}(hint min_alloc_orderh](hdesc_sig_keyword_type)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjH)}(hmin_alloc_orderh]hmin_alloc_order}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint nidh](j)}(hinth]hint}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjH)}(hnidh]hnid}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhj2hKubeh}(h]h ]h"]h$]h&]jj add_permalinkuh1jsphinx_line_type declaratorhjhhhj2hKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multilineuh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjhhubh desc_content)}(hhh]h)}(h create a new special memory poolh]h create a new special memory pool}(hjEhjChhhNhNubah}(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>hjhhhj2hKubeh}(h]h ](j_functioneh"]h$]h&]domainj_objtypej[desctypej[noindexuh1jhhhhhNhNubh 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)}(hjkh]h Parameters}(hhhjohhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjiubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjeubhdefinition_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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjeubh)}(h**Description**h]jn)}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjeubh)}(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"hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:20: ./lib/genalloc.chKhjeubeh}(h]h ] kernelindentah"]h$]h&]uh1jchhhhhNhNubj)}(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}(hhhjOhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjKhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM4ubj4)}(h h]h }(hhhj]hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjKhhhj\hM4ubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhjnhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjkubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjpmodnameN classnameNjejh)}jk]jn)}jadevm_gen_pool_createsbc.devm_gen_pool_createasbuh1hhjKhhhj\hM4ubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjKhhhj\hM4ubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKhhhj\hM4ubj)}(hdevm_gen_pool_createh]jH)}(hjh]hdevm_gen_pool_create}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjKhhhj\hM4ubj)}(hD(struct device *dev, int min_alloc_order, int nid, const char *name)h](j)}(hstruct device *devh](j")}(hj%h]hstruct}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hdeviceh]hdevice}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jc.devm_gen_pool_createasbuh1hhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hdevh]hdev}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint min_alloc_orderh](j)}(hinth]hint}(hhhj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubj4)}(h h]h }(hhhjGhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj5ubjH)}(hmin_alloc_orderh]hmin_alloc_order}(hhhjUhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj5ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint nidh](j)}(hinth]hint}(hhhjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjjubj4)}(h h]h }(hhhj|hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjjubjH)}(hnidh]hnid}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hconst char *nameh](j")}(hconsth]hconst}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hcharh]hchar}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hnameh]hname}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjKhhhj\hM4ubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjGhhhj\hM4ubah}(h]jBah ](j7j8eh"]h$]h&]j<uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:23: ./lib/genalloc.chM=hjDhhubj?)}(hhh]h)}(hmanaged gen_pool_createh]hmanaged gen_pool_create}(hjhjhhhNhNubah}(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>hjDhhhj\hM4ubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`j+jaj+jbuh1jhhhhhNhNubjd)}(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]jn)}(hj5h]h Parameters}(hhhj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj3ubah}(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}(hhhjVhhhNhNubah}(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}(hjohjmhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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, }(h&node selector for allocated gen_pool, hjhhhNhNubj)}(h``NUMA_NO_NODE``h]h NUMA_NO_NODE}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh for all nodes}(h for all nodeshjhhhNhNubeh}(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}(hhhjhhhNhNubah}(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.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]jn)}(hjNh]h Description}(hhhjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjLubah}(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.}(hjfhjdhhhNhNubah}(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&]uh1jchhhhhNhNubh)}(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.}(hj|hjzhhhNhNubah}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hhhhubh)}(hA pool is shut down with:h]hA pool is shut down with:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hhhhubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhjhKubj)}(hgen_pool_destroyh]jH)}(hgen_pool_destroyh]hgen_pool_destroy}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhKubj)}(h(struct gen_pool *pool)h]j)}(hstruct gen_pool *poolh](j")}(hj%h]hstruct}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jn)}jajsbc.gen_pool_destroyasbuh1hhjubj4)}(h h]h }(hhhj8hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hpoolh]hpool}(hhhjShhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubah}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjhhhjhKubah}(h]jah ](j7j8eh"]h$]h&]j<uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKhjhhubj?)}(hhh]h)}(hdestroy a special memory poolh]hdestroy a special memory pool}(hjhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKhj{hhubah}(h]h ]h"]h$]h&]uh1j>hjhhhjhKubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`jjajjbuh1jhhhhhNhNubjd)}(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]jn)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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]jn)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:41: ./lib/genalloc.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jchhhhhNhNubh)}(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(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:}(hj6hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hhhhubj)}(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}(hhhj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWhhhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKmubj4)}(h h]h }(hhhjjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjWhhhjihKmubj)}(h gen_pool_addh]jH)}(h gen_pool_addh]h gen_pool_add}(hhhj|hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjxubah}(h]h ](jjeh"]h$]h&]jjuh1jhjWhhhjihKmubj)}(hA(struct gen_pool *pool, unsigned long addr, size_t size, int nid)h](j)}(hstruct gen_pool *poolh](j")}(hj%h]hstruct}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jn)}jaj~sbc.gen_pool_addasbuh1hhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hpoolh]hpool}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned long addrh](j)}(hunsignedh]hunsigned}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubj)}(hlongh]hlong}(hhhj& hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj4)}(h h]h }(hhhj4 hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubjH)}(haddrh]haddr}(hhhjB hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jH)}(hsize_th]hsize_t}(hhhj^ hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj[ ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj` modnameN classnameNjejh)}jk]jc.gen_pool_addasbuh1hhjW ubj4)}(h h]h }(hhhj| hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjW ubjH)}(hsizeh]hsize}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjW ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hint nidh](j)}(hinth]hint}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubjH)}(hnidh]hnid}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjWhhhjihKmubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjShhhjihKmubah}(h]jNah ](j7j8eh"]h$]h&]j<uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKwhjPhhubj?)}(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 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>hjPhhhjihKmubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`j jaj jbuh1jhhhhhNhNubjd)}(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]jn)}(hj h]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj 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}(hhhj- 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}(hjF hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ hKmhjA 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)}(hjd h]hunsigned long addr}(hhhjf hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjb ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:52: ./include/linux/genalloc.hhKnhj^ ubj)}(hhh]h)}(h/starting address of memory chunk to add to poolh]h/starting address of memory chunk to add to pool}(hj hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy hKnhjz ubah}(h]h ]h"]h$]h&]uh1jhj^ ubeh}(h]h ]h"]h$]h&]uh1jhjy 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}(hhhj 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 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}(hhhj 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 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]jn)}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj 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* 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.}(hj9 hj7 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&]uh1jchhhhhNhNubj)}(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}(hhhjf hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjb hhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKubj4)}(h h]h }(hhhju hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjb hhhjt hKubj)}(hgen_pool_add_ownerh]jH)}(hgen_pool_add_ownerh]hgen_pool_add_owner}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhjb hhhjt 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}(hhhj hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj ubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj modnameN classnameNjejh)}jk]jn)}jaj sbc.gen_pool_add_ownerasbuh1hhj ubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubj)}(hjh]h*}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjH)}(hpoolh]hpool}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hunsigned long virth](j)}(hunsignedh]hunsigned}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj4)}(h h]h }(hhhj# hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubj)}(hlongh]hlong}(hhhj1 hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj4)}(h h]h }(hhhj? hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubjH)}(hvirth]hvirt}(hhhjM hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hphys_addr_t physh](h)}(hhh]jH)}(h phys_addr_th]h phys_addr_t}(hhhji hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjf ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjk modnameN classnameNjejh)}jk]j c.gen_pool_add_ownerasbuh1hhjb ubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjb ubjH)}(hphysh]hphys}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjb ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h size_t sizeh](h)}(hhh]jH)}(hsize_th]hsize_t}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj modnameN classnameNjejh)}jk]j c.gen_pool_add_ownerasbuh1hhj ubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubjH)}(hsizeh]hsize}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hint nidh](j)}(hinth]hint}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj ubjH)}(hnidh]hnid}(hhhj hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(h void *ownerh](j)}(hvoidh]hvoid}(hhhj+ hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj' ubj4)}(h h]h }(hhhj9 hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj' ubj)}(hjh]h*}(hhhjG hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj' ubjH)}(hownerh]howner}(hhhjT hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj' ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhjb hhhjt hKubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hj^ hhhjt hKubah}(h]jY ah ](j7j8eh"]h$]h&]j<uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj[ 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}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhj| hhubah}(h]h ]h"]h$]h&]uh1j>hj[ hhhjt hKubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`j jaj jbuh1jhhhhhNhNubjd)}(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]jn)}(hj h]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj 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}(hhhj 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 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}(hhhj 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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjhKhj 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)}(hj2h]hphys_addr_t phys}(hhhj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(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}(hjMhjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhKhjHubah}(h]h ]h"]h$]h&]uh1jhj,ubeh}(h]h ]h"]h$]h&]uh1jhjGhKhj ubj)}(hA``size_t size`` size in bytes of the memory chunk to add to pool h](j)}(h``size_t size``h]j)}(hjkh]h size_t size}(hhhjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:55: ./lib/genalloc.chKhjeubj)}(hhh]h)}(h0size in bytes of the memory chunk to add to poolh]h0size in bytes of the memory chunk to add to pool}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1jhjhKhj 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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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]jn)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(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.}(hj1hj/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.}(hj@hj>hhhNhNubah}(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&]uh1jchhhhhNhNubh)}(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.}(hjVhjThhhNhNubah}(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:}(hjdhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhhhhubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhjhKubj)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhjhKubj)}(hgen_pool_alloch]jH)}(hgen_pool_alloch]hgen_pool_alloc}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhKubj)}(h$(struct gen_pool *pool, size_t size)h](j)}(hstruct gen_pool *poolh](j")}(hj%h]hstruct}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jn)}jajsbc.gen_pool_allocasbuh1hhjubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hpoolh]hpool}(hhhj;hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jH)}(hsize_th]hsize_t}(hhhjWhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjTubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjYmodnameN classnameNjejh)}jk]jc.gen_pool_allocasbuh1hhjPubj4)}(h h]h }(hhhjuhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjPubjH)}(hsizeh]hsize}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjPubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjhhhjhKubah}(h]j|ah ](j7j8eh"]h$]h&]j<uh1jhZ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:68: ./include/linux/genalloc.hhKhj~hhubj?)}(hhh]h)}(h%allocate special memory from the poolh]h%allocate special memory from the pool}(hjhjhhhNhNubah}(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>hj~hhhjhKubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`jjajjbuh1jhhhhhNhNubjd)}(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]jn)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(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}(hhhjhhhNhNubah}(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}(hj 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}(hhhj*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.hhKhj"ubj)}(hhh]h)}(h)number of bytes to allocate from the poolh]h)number of bytes to allocate from the pool}(hjChjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKhj>ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhj=hKhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jn)}(hjch]h Description}(hhhjehhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjaubah}(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.}(hj{hjyhhhNhNubah}(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&]uh1jchhhhhNhNubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMJubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhjhMJubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhMJubj)}(hgen_pool_dma_alloch]jH)}(hgen_pool_dma_alloch]hgen_pool_dma_alloc}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhMJubj)}(h5(struct gen_pool *pool, size_t size, dma_addr_t *dma)h](j)}(hstruct gen_pool *poolh](j")}(hj%h]hstruct}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jn)}jajsbc.gen_pool_dma_allocasbuh1hhjubj4)}(h h]h }(hhhj0hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hpoolh]hpool}(hhhjKhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jH)}(hsize_th]hsize_t}(hhhjghhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjdubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjimodnameN classnameNjejh)}jk]j,c.gen_pool_dma_allocasbuh1hhj`ubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj`ubjH)}(hsizeh]hsize}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj`ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hdma_addr_t *dmah](h)}(hhh]jH)}(h dma_addr_th]h dma_addr_t}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]j,c.gen_pool_dma_allocasbuh1hhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hdmah]hdma}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMJubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjhhhjhMJubah}(h]jah ](j7j8eh"]h$]h&]j<uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMUhjhhubj?)}(hhh]h)}(h3allocate special memory from the pool for DMA usageh]h3allocate special memory from the pool for DMA usage}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMIhjhhubah}(h]h ]h"]h$]h&]uh1j>hjhhhjhMJubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`j+jaj+jbuh1jhhhhhNhNubjd)}(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]jn)}(hj5h]h Parameters}(hhhj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj3ubah}(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)}(hjTh]hstruct gen_pool *pool}(hhhjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:71: ./lib/genalloc.chMJhjNubj)}(hhh]h)}(hpool to allocate fromh]hpool to allocate from}(hjohjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMJhjjubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjihMJhjKubj)}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMKhjKubj)}(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}(hhhjhhhNhNubah}(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 }(h-dma-view physical address return value. Use hjhhhNhNubj)}(h``NULL``h]hNULL}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if unneeded.}(h if unneeded.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhMLhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMLhjKubeh}(h]h ]h"]h$]h&]uh1jhj/ubh)}(h**Description**h]jn)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(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-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]jn)}(hj<h]hReturn}(hhhj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj:ubah}(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 }(h,virtual address of the allocated memory, or hjRhhhNhNubj)}(h``NULL``h]hNULL}(hhhj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjRubh on failure}(h on failurehjRhhhNhNubeh}(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&]uh1jchhhhhNhNubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhjhMubj)}(hgen_pool_free_ownerh]jH)}(hgen_pool_free_ownerh]hgen_pool_free_owner}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(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}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jn)}jajsbc.gen_pool_free_ownerasbuh1hhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hpoolh]hpool}(hhhj+hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hunsigned long addrh](j)}(hunsignedh]hunsigned}(hhhjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubj4)}(h h]h }(hhhjRhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj@ubj)}(hlongh]hlong}(hhhj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubj4)}(h h]h }(hhhjnhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj@ubjH)}(haddrh]haddr}(hhhj|hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj@ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jH)}(hsize_th]hsize_t}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]j c.gen_pool_free_ownerasbuh1hhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjH)}(hsizeh]hsize}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h void **ownerh](j)}(hvoidh]hvoid}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hownerh]howner}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhMubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjhhhjhMubah}(h]jah ](j7j8eh"]h$]h&]j<uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjhhubj?)}(hhh]h)}(h.free allocated special memory back to the poolh]h.free allocated special memory back to the pool}(hj@hj>hhhNhNubah}(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`jVjajVjbuh1jhhhhhNhNubjd)}(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]jn)}(hj`h]h Parameters}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj^ubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjZubj)}(hhh](j)}(h*``struct gen_pool *pool`` pool to free to h](j)}(h``struct gen_pool *pool``h]j)}(hjh]hstruct gen_pool *pool}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjyubj)}(hhh]h)}(hpool to free toh]hpool to free to}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]uh1jhjhMhjvubj)}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjvubj)}(h0``size_t size`` size in bytes of memory to free h](j)}(h``size_t size``h]j)}(hjh]h size_t size}(hhhjhhhNhNubah}(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}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhMhjvubj)}(h=``void **owner`` private data stashed at gen_pool_add() time h](j)}(h``void **owner``h]j)}(hj*h]h void **owner}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhj$ubj)}(hhh]h)}(h+private data stashed at gen_pool_add() timeh]h+private data stashed at gen_pool_add() time}(hjEhjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMhj@ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhj?hMhjvubeh}(h]h ]h"]h$]h&]uh1jhjZubh)}(h**Description**h]jn)}(hjeh]h Description}(hhhjghhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjcubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjZubh)}(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.}(hj}hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:74: ./lib/genalloc.chMhjZubeh}(h]h ] kernelindentah"]h$]h&]uh1jchhhhhNhNubh)}(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.}(hjhjhhhNhNubah}(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:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhhhhubj)}(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}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chM ubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhjhM ubj)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhM ubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhjhM ubj)}(hgen_pool_alloc_algo_ownerh]jH)}(hgen_pool_alloc_algo_ownerh]hgen_pool_alloc_algo_owner}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhM ubj)}(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}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhj,hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhj=hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj:ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj?modnameN classnameNjejh)}jk]jn)}jajsbc.gen_pool_alloc_algo_ownerasbuh1hhjubj4)}(h h]h }(hhhj]hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hpoolh]hpool}(hhhjxhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h size_t sizeh](h)}(hhh]jH)}(hsize_th]hsize_t}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jYc.gen_pool_alloc_algo_ownerasbuh1hhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjH)}(hsizeh]hsize}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hgenpool_algo_t algoh](h)}(hhh]jH)}(hgenpool_algo_th]hgenpool_algo_t}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jYc.gen_pool_alloc_algo_ownerasbuh1hhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjH)}(halgoh]halgo}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h void *datah](j)}(hvoidh]hvoid}(hhhj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj4)}(h h]h }(hhhj/hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hdatah]hdata}(hhhjJhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h void **ownerh](j)}(hvoidh]hvoid}(hhhjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj4)}(h h]h }(hhhjqhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj_ubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj_ubjH)}(hownerh]howner}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj_ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhM ubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjhhhjhM ubah}(h]jah ](j7j8eh"]h$]h&]j<uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chMhjhhubj?)}(hhh]h)}(h%allocate special memory from the poolh]h%allocate special memory from the pool}(hjhjhhhNhNubah}(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>hjhhhjhM ubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`jjajjbuh1jhhhhhNhNubjd)}(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]jn)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(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}(hhhjhhhNhNubah}(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}(hj hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhM hjubj)}(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}(hhhj@hhhNhNubah}(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 hj8ubj)}(hhh]h)}(h)number of bytes to allocate from the poolh]h)number of bytes to allocate from the pool}(hjYhjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShM hjTubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1jhjShM hjubj)}(h5``genpool_algo_t algo`` algorithm passed from caller h](j)}(h``genpool_algo_t algo``h]j)}(hjwh]hgenpool_algo_t algo}(hhhjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:91: ./lib/genalloc.chM hjqubj)}(hhh]h)}(halgorithm passed from callerh]halgorithm passed from caller}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(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]jn)}(hj$h]h Description}(hhhj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj"ubah}(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<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&]uh1jchhhhhNhNubj)}(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}(hhhjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjehhhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMfubj4)}(h h]h }(hhhjxhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjehhhjwhMfubj)}(hgen_pool_set_algoh]jH)}(hgen_pool_set_algoh]hgen_pool_set_algo}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjehhhjwhMfubj)}(h8(struct gen_pool *pool, genpool_algo_t algo, void *data)h](j)}(hstruct gen_pool *poolh](j")}(hj%h]hstruct}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jn)}jajsbc.gen_pool_set_algoasbuh1hhjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hpoolh]hpool}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(hgenpool_algo_t algoh](h)}(hhh]jH)}(hgenpool_algo_th]hgenpool_algo_t}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jc.gen_pool_set_algoasbuh1hhjubj4)}(h h]h }(hhhj9hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubjH)}(halgoh]halgo}(hhhjGhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubj)}(h void *datah](j)}(hvoidh]hvoid}(hhhj`hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubj4)}(h h]h }(hhhjnhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj\ubj)}(hjh]h*}(hhhj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubjH)}(hdatah]hdata}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj\ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhjehhhjwhMfubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjahhhjwhMfubah}(h]j\ah ](j7j8eh"]h$]h&]j<uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMnhj^hhubj?)}(hhh]h)}(hset the allocation algorithmh]hset the allocation algorithm}(hjhjhhhNhNubah}(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>hj^hhhjwhMfubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`jjajjbuh1jhhhhhNhNubjd)}(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]jn)}(hjh]h Parameters}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(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}(hhhjhhhNhNubah}(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}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMfhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj hMfhjubj)}(h2``genpool_algo_t algo`` custom algorithm function h](j)}(h``genpool_algo_t algo``h]j)}(hj.h]hgenpool_algo_t algo}(hhhj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMghj(ubj)}(hhh]h)}(hcustom algorithm functionh]hcustom algorithm function}(hjIhjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMghjDubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhjChMghjubj)}(h0``void *data`` additional data used by **algo** h](j)}(h``void *data``h]j)}(hjgh]h void *data}(hhhjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1jhP/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:94: ./lib/genalloc.chMhhjaubj)}(hhh]h)}(h additional data used by **algo**h](hadditional data used by }(hadditional data used by hjhhhNhNubjn)}(h**algo**h]halgo}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubeh}(h]h ]h"]h$]h&]uh1hhj|hMhhj}ubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhj|hMhhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(h**Description**h]jn)}(hjh]h Description}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubah}(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 }(hCall hjhhhNhNubjn)}(h**algo**h]halgo}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubh, for each memory allocation in the pool. If }(h, for each memory allocation in the pool. If hjhhhNhNubjn)}(h**algo**h]halgo}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjubhF is NULL use gen_pool_first_fit as default memory allocation function.}(hF 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&]uh1jchhhhhNhNubh)}(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:}(hjhjhhhNhNubah}(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.}(hjhjhhhNhNubah}(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).}(hj7hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhj1ubah}(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.}(hjOhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjIubah}(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.}(hjghjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjaubah}(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.}(hjhj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjyubah}(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.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhhhhubj)}(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]jH)}(h phys_addr_th]h phys_addr_t}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjmodnameN classnameNjejh)}jk]jn)}jagen_pool_virt_to_physsbc.gen_pool_virt_to_physasbuh1hhjhhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjhhhjhKubj)}(hgen_pool_virt_to_physh]jH)}(hjh]hgen_pool_virt_to_phys}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubah}(h]h ](jjeh"]h$]h&]jjuh1jhjhhhjhKubj)}(h+(struct gen_pool *pool, unsigned long addr)h](j)}(hstruct gen_pool *poolh](j")}(hj%h]hstruct}(hhhjhhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhj0hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj-ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj2modnameN classnameNjejh)}jk]jc.gen_pool_virt_to_physasbuh1hhjubj4)}(h h]h }(hhhjNhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjubj)}(hjh]h*}(hhhj\hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjH)}(hpoolh]hpool}(hhhjihhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubj)}(hunsigned long addrh](j)}(hunsignedh]hunsigned}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj~ubj)}(hlongh]hlong}(hhhjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ubj4)}(h h]h }(hhhjhhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj~ubjH)}(haddrh]haddr}(hhhjhhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj~ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hjhhhjhKubah}(h]jah ](j7j8eh"]h$]h&]j<uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhjhhubj?)}(hhh]h)}(h%return the physical address of memoryh]h%return the physical address of memory}(hjhjhhhNhNubah}(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`jjajjbuh1jhhhhhNhNubjd)}(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]jn)}(hj h]h Parameters}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhj ubj)}(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}(hhhj( 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}(hjA 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)}(hj_ h]hunsigned long addr}(hhhja 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.chKhjY ubj)}(hhh]h)}(hstarting address of memoryh]hstarting address of memory}(hjz hjx hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjt hKhju ubah}(h]h ]h"]h$]h&]uh1jhjY ubeh}(h]h ]h"]h$]h&]uh1jhjt hKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubh)}(h**Description**h]jn)}(hj h]h Description}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhj ubh)}(h8Returns the physical address on success, or -1 on error.h]h8Returns the physical address on success, or -1 on error.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:125: ./lib/genalloc.chKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchhhhhNhNubj)}(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}(hhhj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chM ubj4)}(h h]h }(hhhj hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj hhhj hM ubj)}(hgen_pool_for_each_chunkh]jH)}(hgen_pool_for_each_chunkh]hgen_pool_for_each_chunk}(hhhj!hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj hhhj hM ubj)}(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}(hhhj!hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj!ubj4)}(h h]h }(hhhj)!hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj!ubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhj:!hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj7!ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:#ubj4)}(h h]h }(hhhjL#hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj:#ubj)}(hjh]h*}(hhhjZ#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:#ubjH)}(hdatah]hdata}(hhhjg#hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj:#ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj!ubeh}(h]h ]h"]h$]h&]jjuh1jhj hhhj hM ubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hj hhhj hM ubah}(h]j ah ](j7j8eh"]h$]h&]j<uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:128: ./lib/genalloc.chMhj hhubj?)}(hhh]h)}(h0call func for every chunk of generic memory poolh]h0call func for every chunk of generic memory pool}(hj#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 hM ubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`j#jaj#jbuh1jhhhhhNhNubjd)}(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]jn)}(hj#h]h Parameters}(hhhj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj#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}(hhhj#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#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)}(hhhj$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'$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)}(hjE$h]h void *data}(hhhjG$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC$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 }(hadditional data used by hj^$hhhNhNubjn)}(h**func**h]hfunc}(hhhjg$hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj^$ubeh}(h]h ]h"]h$]h&]uh1hhjZ$hMhj[$ubah}(h]h ]h"]h$]h&]uh1jhj?$ubeh}(h]h ]h"]h$]h&]uh1jhjZ$hMhj#ubeh}(h]h ]h"]h$]h&]uh1jhj#ubh)}(h**Description**h]jn)}(hj$h]h Description}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj$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 }(hCall hj$hhhNhNubjn)}(h**func**h]hfunc}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj$ubh. for every chunk of generic memory pool. The }(h. for every chunk of generic memory pool. The hj$hhhNhNubjn)}(h**func**h]hfunc}(hhhj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj$ubh# is called with rcu_read_lock held.}(h# 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&]uh1jchhhhhNhNubj)}(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}(hhhj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM"ubj4)}(h h]h }(hhhj %hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj$hhhj %hM"ubj)}(hgen_pool_has_addrh]jH)}(hgen_pool_has_addrh]hgen_pool_has_addr}(hhhj%hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj%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}(hhhj8%hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj4%ubj4)}(h h]h }(hhhjE%hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj4%ubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhjV%hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjS%ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjX%modnameN classnameNjejh)}jk]jn)}jaj%sbc.gen_pool_has_addrasbuh1hhj4%ubj4)}(h h]h }(hhhjv%hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj4%ubj)}(hjh]h*}(hhhj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj4%ubjH)}(hpoolh]hpool}(hhhj%hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj4%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0%ubj)}(hunsigned long starth](j)}(hunsignedh]hunsigned}(hhhj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj4)}(h h]h }(hhhj%hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj%ubj)}(hlongh]hlong}(hhhj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubj4)}(h h]h }(hhhj%hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj%ubjH)}(hstarth]hstart}(hhhj%hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0%ubj)}(h size_t sizeh](h)}(hhh]jH)}(hsize_th]hsize_t}(hhhj%hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj%ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj&modnameN classnameNjejh)}jk]jr%c.gen_pool_has_addrasbuh1hhj%ubj4)}(h h]h }(hhhj&hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj%ubjH)}(hsizeh]hsize}(hhhj*&hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj%ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj0%ubeh}(h]h ]h"]h$]h&]jjuh1jhj$hhhj %hM"ubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hj$hhhj %hM"ubah}(h]j$ah ](j7j8eh"]h$]h&]j<uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM)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}(hjW&hjU&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM!hjR&hhubah}(h]h ]h"]h$]h&]uh1j>hj$hhhj %hM"ubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`jm&jajm&jbuh1jhhhhhNhNubjd)}(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]jn)}(hjw&h]h Parameters}(hhhjy&hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhju&ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM%hjq&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}(hhhj&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)}(hthe generic memory poolh]hthe generic memory pool}(hj&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&``unsigned long start`` start address h](j)}(h``unsigned long start``h]j)}(hj&h]hunsigned long start}(hhhj&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&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#``size_t size`` size of the region h](j)}(h``size_t size``h]j)}(hj'h]h size_t size}(hhhj '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#'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&ubeh}(h]h ]h"]h$]h&]uh1jhjq&ubh)}(h**Description**h]jn)}(hjC'h]h Description}(hhhjE'hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjA'ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM&hjq&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['hjY'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:131: ./lib/genalloc.chM&hjq&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchhhhhNhNubj)}(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]jH)}(hsize_th]hsize_t}(hhhj'hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj'ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj'modnameN classnameNjejh)}jk]jn)}jagen_pool_availsbc.gen_pool_availasbuh1hhj'hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chM@ubj4)}(h h]h }(hhhj'hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj'hhhj'hM@ubj)}(hgen_pool_availh]jH)}(hj'h]hgen_pool_avail}(hhhj'hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj'ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj'hhhj'hM@ubj)}(h(struct gen_pool *pool)h]j)}(hstruct gen_pool *poolh](j")}(hj%h]hstruct}(hhhj'hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj'ubj4)}(h h]h }(hhhj'hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj'ubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhj'hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj'ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj'modnameN classnameNjejh)}jk]j'c.gen_pool_availasbuh1hhj'ubj4)}(h h]h }(hhhj(hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj'ubj)}(hjh]h*}(hhhj$(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjH)}(hpoolh]hpool}(hhhj1(hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj'ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj'ubah}(h]h ]h"]h$]h&]jjuh1jhj'hhhj'hM@ubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hj'hhhj'hM@ubah}(h]j{'ah ](j7j8eh"]h$]h&]j<uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chMDhj}'hhubj?)}(hhh]h)}(h$get available free space of the poolh]h$get available free space of the pool}(hj^(hj\(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chM?hjY(hhubah}(h]h ]h"]h$]h&]uh1j>hj}'hhhj'hM@ubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`jt(jajt(jbuh1jhhhhhNhNubjd)}(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]jn)}(hj~(h]h Parameters}(hhhj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj|(ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chMChjx(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}(hhhj(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(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(ubah}(h]h ]h"]h$]h&]uh1jhjx(ubh)}(h**Description**h]jn)}(hj(h]h Description}(hhhj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj(ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chMBhjx(ubh)}(h2Return available free space of the specified pool.h]h2Return available free space of the specified pool.}(hj(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:134: ./lib/genalloc.chMBhjx(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jchhhhhNhNubj)}(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]jH)}(hsize_th]hsize_t}(hhhj )hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj)ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj")modnameN classnameNjejh)}jk]jn)}ja gen_pool_sizesbc.gen_pool_sizeasbuh1hhj)hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:137: ./lib/genalloc.chMSubj4)}(h h]h }(hhhjB)hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj)hhhjA)hMSubj)}(h gen_pool_sizeh]jH)}(hj>)h]h gen_pool_size}(hhhjT)hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjP)ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj)hhhjA)hMSubj)}(h(struct gen_pool *pool)h]j)}(hstruct gen_pool *poolh](j")}(hj%h]hstruct}(hhhjo)hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hjk)ubj4)}(h h]h }(hhhj|)hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjk)ubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhj)hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj)ubah}(h]h ]h"]h$]h&] refdomainNj_reftypeja reftargetj)modnameN classnameNjejh)}jk]j<)c.gen_pool_sizeasbuh1hhjk)ubj4)}(h h]h }(hhhj)hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjk)ubj)}(hjh]h*}(hhhj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjk)ubjH)}(hpoolh]hpool}(hhhj)hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjk)ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjg)ubah}(h]h ]h"]h$]h&]jjuh1jhj)hhhjA)hMSubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hj)hhhjA)hMSubah}(h]j)ah ](j7j8eh"]h$]h&]j<uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:137: ./lib/genalloc.chMWhj)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)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)hhhjA)hMSubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`j *jaj *jbuh1jhhhhhNhNubjd)}(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]jn)}(hj*h]h Parameters}(hhhj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj*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)}(hj2*h]hstruct gen_pool *pool}(hhhj4*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0*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}(hjM*hjK*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjG*hMShjH*ubah}(h]h ]h"]h$]h&]uh1jhj,*ubeh}(h]h ]h"]h$]h&]uh1jhjG*hMShj)*ubah}(h]h ]h"]h$]h&]uh1jhj *ubh)}(h**Description**h]jn)}(hjm*h]h Description}(hhhjo*hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhjk*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.}(hj*hj*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&]uh1jchhhhhNhNubj)}(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}(hhhj*hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj*hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM!ubj4)}(h h]h }(hhhj*hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj*hhhj*hM!ubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhj*hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj*ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj*modnameN classnameNjejh)}jk]jn)}ja gen_pool_getsbc.gen_pool_getasbuh1hhj*hhhj*hM!ubj4)}(h h]h }(hhhj*hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj*hhhj*hM!ubj)}(hjh]h*}(hhhj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*hhhj*hM!ubj)}(h gen_pool_geth]jH)}(hj*h]h gen_pool_get}(hhhj+hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj +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}(hhhj,+hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj(+ubj4)}(h h]h }(hhhj9+hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj(+ubh)}(hhh]jH)}(hdeviceh]hdevice}(hhhjJ+hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjG+ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetjL+modnameN classnameNjejh)}jk]j*c.gen_pool_getasbuh1hhj(+ubj4)}(h h]h }(hhhjh+hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj(+ubj)}(hjh]h*}(hhhjv+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(+ubjH)}(hdevh]hdev}(hhhj+hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj(+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$+ubj)}(hconst char *nameh](j")}(hjh]hconst}(hhhj+hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj+ubj4)}(h h]h }(hhhj+hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj+ubj)}(hcharh]hchar}(hhhj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubj4)}(h h]h }(hhhj+hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj+ubj)}(hjh]h*}(hhhj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubjH)}(hnameh]hname}(hhhj+hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj+ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhj$+ubeh}(h]h ]h"]h$]h&]jjuh1jhj*hhhj*hM!ubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hj*hhhj*hM!ubah}(h]j*ah ](j7j8eh"]h$]h&]j<uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM&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 ,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#,jaj#,jbuh1jhhhhhNhNubjd)}(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]jn)}(hj-,h]h Parameters}(hhhj/,hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj+,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)}(hjL,h]hstruct device *dev}(hhhjN,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ,ubah}(h]h ]h"]h$]h&]uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:140: ./lib/genalloc.chM!hjF,ubj)}(hhh]h)}(h$device to retrieve the gen_pool fromh]h$device to retrieve the gen_pool from}(hjg,hje,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhja,hM!hjb,ubah}(h]h ]h"]h$]h&]uh1jhjF,ubeh}(h]h ]h"]h$]h&]uh1jhja,hM!hjC,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)}(hj,h]hconst char *name}(hhhj,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)}(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,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"hjC,ubeh}(h]h ]h"]h$]h&]uh1jhj',ubh)}(h**Description**h]jn)}(hj,h]h Description}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj,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,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&]uh1jchhhhhNhNubj)}(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}(hhhj-hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj-hhhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMgubj4)}(h h]h }(hhhj-hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj-hhhj-hMgubh)}(hhh]jH)}(hgen_poolh]hgen_pool}(hhhj$-hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj!-ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj&-modnameN classnameNjejh)}jk]jn)}jaof_gen_pool_getsbc.of_gen_pool_getasbuh1hhj-hhhj-hMgubj4)}(h h]h }(hhhjE-hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj-hhhj-hMgubj)}(hjh]h*}(hhhjS-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-hhhj-hMgubj)}(hof_gen_pool_geth]jH)}(hjB-h]hof_gen_pool_get}(hhhjd-hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj`-ubah}(h]h ](jjeh"]h$]h&]jjuh1jhj-hhhj-hMgubj)}(h9(struct device_node *np, const char *propname, int index)h](j)}(hstruct device_node *nph](j")}(hj%h]hstruct}(hhhj-hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj{-ubj4)}(h h]h }(hhhj-hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj{-ubh)}(hhh]jH)}(h device_nodeh]h device_node}(hhhj-hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj-ubah}(h]h ]h"]h$]h&] refdomainj_reftypeja reftargetj-modnameN classnameNjejh)}jk]j@-c.of_gen_pool_getasbuh1hhj{-ubj4)}(h h]h }(hhhj-hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj{-ubj)}(hjh]h*}(hhhj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{-ubjH)}(hnph]hnp}(hhhj-hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj{-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjw-ubj)}(hconst char *propnameh](j")}(hjh]hconst}(hhhj-hhhNhNubah}(h]h ]j.ah"]h$]h&]uh1j!hj-ubj4)}(h h]h }(hhhj-hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj-ubj)}(hcharh]hchar}(hhhj .hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubj4)}(h h]h }(hhhj.hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hj-ubj)}(hjh]h*}(hhhj&.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubjH)}(hpropnameh]hpropname}(hhhj3.hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhj-ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjw-ubj)}(h int indexh](j)}(hinth]hint}(hhhjL.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjH.ubj4)}(h h]h }(hhhjZ.hhhNhNubah}(h]h ]j@ah"]h$]h&]uh1j3hjH.ubjH)}(hindexh]hindex}(hhhjh.hhhNhNubah}(h]h ]jTah"]h$]h&]uh1jGhjH.ubeh}(h]h ]h"]h$]h&]noemphjjuh1jhjw-ubeh}(h]h ]h"]h$]h&]jjuh1jhj-hhhj-hMgubeh}(h]h ]h"]h$]h&]jjj1uh1jj2j3hj,hhhj-hMgubah}(h]j,ah ](j7j8eh"]h$]h&]j<uh1jhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMohj,hhubj?)}(hhh]h)}(hfind a pool by phandle propertyh]hfind a pool by phandle property}(hj.hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/core-api/genalloc:143: ./lib/genalloc.chMfhj.hhubah}(h]h ]h"]h$]h&]uh1j>hj,hhhj-hMgubeh}(h]h ](j_functioneh"]h$]h&]j_j_j`j.jaj.jbuh1jhhhhhNhNubjd)}(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]jn)}(hj.h]h Parameters}(hhhj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj.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}(hhhj.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.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}(hhhj/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(/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)}(hjF/h]h int index}(hhhjH/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD/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}(hja/hj_/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]jn)}(hj/h]h Description}(hhhj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jmhj/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.}(hj/hj/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&]uh1jchhhhhNhNubeh}(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.confapep_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_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}posted]hasrefids}nameids}(j/j/hhu nametypes}(j/Nhuh}(j/hhhjjjBjGjjjNjSjY j^ j|jjjjjjjj\jajjj j j$j$j{'j'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.