Bsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget /translations/zh_CN/bpf/cpumasksmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/zh_TW/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/it_IT/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ja_JP/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/ko_KR/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/pt_BR/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget /translations/sp_SP/bpf/cpumasksmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh:/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks.rsthKubhtarget)}(h.. _cpumasks-header-label:h]h}(h]h ]h"]h$]h&]refidcpumasks-header-labeluh1hhKhhhhhhubhsection)}(hhh](htitle)}(hBPF cpumask kfuncsh]hBPF cpumask kfuncs}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h1. Introductionh]h1. Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hX8``struct cpumask`` is a bitmap data structure in the kernel whose indices reflect the CPUs on the system. Commonly, cpumasks are used to track which CPUs a task is affinitized to, but they can also be used to e.g. track which cores are associated with a scheduling domain, which cores on a machine are idle, etc.h](hliteral)}(h``struct cpumask``h]hstruct cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhubhX& is a bitmap data structure in the kernel whose indices reflect the CPUs on the system. Commonly, cpumasks are used to track which CPUs a task is affinitized to, but they can also be used to e.g. track which cores are associated with a scheduling domain, which cores on a machine are idle, etc.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(h~BPF provides programs with a set of :ref:`kfuncs-header-label` that can be used to allocate, mutate, query, and free cpumasks.h](h$BPF provides programs with a set of }(hjhhhNhNubh)}(h:ref:`kfuncs-header-label`h]hinline)}(hj&h]hkfuncs-header-label}(hj*hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j(hj$ubah}(h]h ]h"]h$]h&]refdoc bpf/cpumasks refdomainj5reftyperef refexplicitrefwarn reftargetkfuncs-header-labeluh1hhhhKhjubh@ that can be used to allocate, mutate, query, and free cpumasks.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] introductionah ]h"]1. introductionah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h2. BPF cpumask objectsh]h2. BPF cpumask objects}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hhhhhKubh)}(hKThere are two different types of cpumasks that can be used by BPF programs.h]hKThere are two different types of cpumasks that can be used by BPF programs.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[hhubh)}(hhh](h)}(h2.1 ``struct bpf_cpumask *``h](h2.1 }(hj}hhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1hhjzhhhhhKubh)}(hX``struct bpf_cpumask *`` is a cpumask that is allocated by BPF, on behalf of a BPF program, and whose lifecycle is entirely controlled by BPF. These cpumasks are RCU-protected, can be mutated, can be used as kptrs, and can be safely cast to a ``struct cpumask *``.h](j)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is a cpumask that is allocated by BPF, on behalf of a BPF program, and whose lifecycle is entirely controlled by BPF. These cpumasks are RCU-protected, can be mutated, can be used as kptrs, and can be safely cast to a }(hjhhhNhNubj)}(h``struct cpumask *``h]hstruct cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjzhhubeh}(h]struct-bpf-cpumaskah ]h"]2.1 struct bpf_cpumask *ah$]h&]uh1hhj[hhhhhKubh)}(hhh](h)}(h(2.1.1 ``struct bpf_cpumask *`` lifecycleh](h2.1.1 }(hjhhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh lifecycle}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhK#ubh)}(h_A ``struct bpf_cpumask *`` is allocated, acquired, and released, using the following functions:h](hA }(hjhhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhE is allocated, acquired, and released, using the following functions:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK%hjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlebpf_cpumask_create (C function)c.bpf_cpumask_createhNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h:__bpf_kfunc struct bpf_cpumask * bpf_cpumask_create (void)h]hdesc_signature_line)}(h8__bpf_kfunc struct bpf_cpumask *bpf_cpumask_create(void)h](h __bpf_kfunc}(hj0hhhNhNubhdesc_sig_space)}(h h]h }(hj:hhhNhNubah}(h]h ]wah"]h$]h&]uh1j8hj0hhhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK(ubhdesc_sig_keyword)}(hstructh]hstruct}(hjLhhhNhNubah}(h]h ]kah"]h$]h&]uh1jJhj0hhhjIhK(ubj9)}(h h]h }(hj[hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj0hhhjIhK(ubh)}(hhh]h desc_sig_name)}(h bpf_cpumaskh]h bpf_cpumask}(hjnhhhNhNubah}(h]h ]nah"]h$]h&]uh1jlhjiubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjpmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jbpf_cpumask_createsbc.bpf_cpumask_createasbuh1hhj0hhhjIhK(ubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj0hhhjIhK(ubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhj0hhhjIhK(ubh desc_name)}(hbpf_cpumask_createh]jm)}(hjh]hbpf_cpumask_create}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhj0hhhjIhK(ubhdesc_parameterlist)}(h(void)h]hdesc_parameter)}(hvoidh]hdesc_sig_keyword_type)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhj0hhhjIhK(ubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1j.sphinx_line_type declaratorhj*hhhjIhK(ubah}(h]j!ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j(hjIhK(hj%hhubh desc_content)}(hhh]h)}(hCreate a mutable BPF cpumask.h]hCreate a mutable BPF cpumask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK(hjhhubah}(h]h ]h"]h$]h&]uh1jhj%hhhjIhK(ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypej.desctypej.noindex noindexentrynocontentsentryuh1j#hhhjhNhNubh container)}(hX**Parameters** ``void`` no arguments **Description** Allocates a cpumask that can be queried, mutated, acquired, and released by a BPF program. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release(). bpf_cpumask_create() allocates memory using the BPF memory allocator, and will not block. It may return NULL if no memory is available. **Return** * A pointer to a new struct bpf_cpumask instance on success. * NULL if the BPF memory allocator is out of memory.h](h)}(h**Parameters**h]hstrong)}(hj@h]h Parameters}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj>ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK,hj:ubhdefinition_list)}(hhh]hdefinition_list_item)}(h``void`` no arguments h](hterm)}(h``void``h]j)}(hjgh]hvoid}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubah}(h]h ]h"]h$]h&]uh1jchQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chKhj_ubh definition)}(hhh]h)}(h no argumentsh]h no arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hKhjubah}(h]h ]h"]h$]h&]uh1j}hj_ubeh}(h]h ]h"]h$]h&]uh1j]hj|hKhjZubah}(h]h ]h"]h$]h&]uh1jXhj:ubh)}(h**Description**h]jC)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chKhj:ubh)}(hAllocates a cpumask that can be queried, mutated, acquired, and released by a BPF program. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release().h]hAllocates a cpumask that can be queried, mutated, acquired, and released by a BPF program. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK)hj:ubh)}(hbpf_cpumask_create() allocates memory using the BPF memory allocator, and will not block. It may return NULL if no memory is available.h]hbpf_cpumask_create() allocates memory using the BPF memory allocator, and will not block. It may return NULL if no memory is available.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK-hj:ubh)}(h **Return**h]jC)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK0hj:ubh bullet_list)}(hhh](h list_item)}(h:A pointer to a new struct bpf_cpumask instance on success.h]h)}(hjh]h:A pointer to a new struct bpf_cpumask instance on success.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK1hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h2NULL if the BPF memory allocator is out of memory.h]h)}(hjh]h2NULL if the BPF memory allocator is out of memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:40: ./kernel/bpf/cpumask.chK2hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bulletjuh1jhjhK1hj:ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_acquire (C function)c.bpf_cpumask_acquirehNtauh1jhjhhhNhNubj$)}(hhh](j))}(hR__bpf_kfunc struct bpf_cpumask * bpf_cpumask_acquire (struct bpf_cpumask *cpumask)h]j/)}(hP__bpf_kfunc struct bpf_cpumask *bpf_cpumask_acquire(struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjJhhhNhNubj9)}(h h]h }(hjRhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjJhhhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKGubjK)}(hjNh]hstruct}(hjahhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjJhhhj`hKGubj9)}(h h]h }(hjnhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjJhhhj`hKGubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj|ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jbpf_cpumask_acquiresbc.bpf_cpumask_acquireasbuh1hhjJhhhj`hKGubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjJhhhj`hKGubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJhhhj`hKGubj)}(hbpf_cpumask_acquireh]jm)}(hjh]hbpf_cpumask_acquire}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjJhhhj`hKGubj)}(h(struct bpf_cpumask *cpumask)h]j)}(hstruct bpf_cpumask *cpumaskh](jK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.bpf_cpumask_acquireasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hcpumaskh]hcpumask}(hj1hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjJhhhj`hKGubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjFhhhj`hKGubah}(h]jAah ](j j eh"]h$]h&]jj)jhuh1j(hj`hKGhjChhubj)}(hhh]h)}(h%Acquire a reference to a BPF cpumask.h]h%Acquire a reference to a BPF cpumask.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKGhjXhhubah}(h]h ]h"]h$]h&]uh1jhjChhhj`hKGubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jsj4jsj5j6j7uh1j#hhhjhNhNubj9)}(hXp**Parameters** ``struct bpf_cpumask *cpumask`` The BPF cpumask being acquired. The cpumask must be a trusted pointer. **Description** Acquires a reference to a BPF cpumask. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release(). **Return** * The struct bpf_cpumask pointer passed to the function.h](h)}(h**Parameters**h]jC)}(hj}h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj{ubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKKhjwubjY)}(hhh]j^)}(hg``struct bpf_cpumask *cpumask`` The BPF cpumask being acquired. The cpumask must be a trusted pointer. h](jd)}(h``struct bpf_cpumask *cpumask``h]j)}(hjh]hstruct bpf_cpumask *cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKIhjubj~)}(hhh]h)}(hFThe BPF cpumask being acquired. The cpumask must be a trusted pointer.h]hFThe BPF cpumask being acquired. The cpumask must be a trusted pointer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKHhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hjhKIhjubah}(h]h ]h"]h$]h&]uh1jXhjwubh)}(h**Description**h]jC)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKKhjwubh)}(hAcquires a reference to a BPF cpumask. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release().h]hAcquires a reference to a BPF cpumask. The cpumask returned by this function must either be embedded in a map as a kptr, or freed with bpf_cpumask_release().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKJhjwubh)}(h **Return**h]jC)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKNhjwubj)}(hhh]j)}(h6The struct bpf_cpumask pointer passed to the function.h]h)}(hjh]h6The struct bpf_cpumask pointer passed to the function.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:43: ./kernel/bpf/cpumask.chKOhjubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]j-juh1jhj)hKOhjwubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_release (C function)c.bpf_cpumask_releasehNtauh1jhjhhhNhNubj$)}(hhh](j))}(hB__bpf_kfunc void bpf_cpumask_release (struct bpf_cpumask *cpumask)h]j/)}(hA__bpf_kfunc void bpf_cpumask_release(struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjRhhhNhNubj9)}(h h]h }(hjZhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjRhhhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chKZubj)}(hvoidh]hvoid}(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRhhhjhhKZubj9)}(h h]h }(hjwhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjRhhhjhhKZubj)}(hbpf_cpumask_releaseh]jm)}(hbpf_cpumask_releaseh]hbpf_cpumask_release}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjRhhhjhhKZubj)}(h(struct bpf_cpumask *cpumask)h]j)}(hstruct bpf_cpumask *cpumaskh](jK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.bpf_cpumask_releaseasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjRhhhjhhKZubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjNhhhjhhKZubah}(h]jIah ](j j eh"]h$]h&]jj)jhuh1j(hjhhKZhjKhhubj)}(hhh]h)}(h*Release a previously acquired BPF cpumask.h]h*Release a previously acquired BPF cpumask.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chKZhj%hhubah}(h]h ]h"]h$]h&]uh1jhjKhhhjhhKZubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j@j4j@j5j6j7uh1j#hhhjhNhNubj9)}(hX"**Parameters** ``struct bpf_cpumask *cpumask`` The cpumask being released. **Description** Releases a previously acquired reference to a BPF cpumask. When the final reference of the BPF cpumask has been released, it is subsequently freed in an RCU callback in the BPF memory allocator.h](h)}(h**Parameters**h]jC)}(hjJh]h Parameters}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjHubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chK^hjDubjY)}(hhh]j^)}(h<``struct bpf_cpumask *cpumask`` The cpumask being released. h](jd)}(h``struct bpf_cpumask *cpumask``h]j)}(hjih]hstruct bpf_cpumask *cpumask}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjgubah}(h]h ]h"]h$]h&]uh1jchQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chK[hjcubj~)}(hhh]h)}(hThe cpumask being released.h]hThe cpumask being released.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hK[hjubah}(h]h ]h"]h$]h&]uh1j}hjcubeh}(h]h ]h"]h$]h&]uh1j]hj~hK[hj`ubah}(h]h ]h"]h$]h&]uh1jXhjDubh)}(h**Description**h]jC)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chK]hjDubh)}(hReleases a previously acquired reference to a BPF cpumask. When the final reference of the BPF cpumask has been released, it is subsequently freed in an RCU callback in the BPF memory allocator.h]hReleases a previously acquired reference to a BPF cpumask. When the final reference of the BPF cpumask has been released, it is subsequently freed in an RCU callback in the BPF memory allocator.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhQ/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:46: ./kernel/bpf/cpumask.chK\hjDubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hjhhhNhNubh)}(h For example:h]h For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjhhubh literal_block)}(hXstruct cpumask_map_value { struct bpf_cpumask __kptr * cpumask; }; struct array_map { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct cpumask_map_value); __uint(max_entries, 65536); } cpumask_map SEC(".maps"); static int cpumask_map_insert(struct bpf_cpumask *mask, u32 pid) { struct cpumask_map_value local, *v; long status; struct bpf_cpumask *old; u32 key = pid; local.cpumask = NULL; status = bpf_map_update_elem(&cpumask_map, &key, &local, 0); if (status) { bpf_cpumask_release(mask); return status; } v = bpf_map_lookup_elem(&cpumask_map, &key); if (!v) { bpf_cpumask_release(mask); return -ENOENT; } old = bpf_kptr_xchg(&v->cpumask, mask); if (old) bpf_cpumask_release(old); return 0; } /** * A sample tracepoint showing how a task's cpumask can be queried and * recorded as a kptr. */ SEC("tp_btf/task_newtask") int BPF_PROG(record_task_cpumask, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *cpumask; int ret; cpumask = bpf_cpumask_create(); if (!cpumask) return -ENOMEM; if (!bpf_cpumask_full(task->cpus_ptr)) bpf_printk("task %s has CPU affinity", task->comm); bpf_cpumask_copy(cpumask, task->cpus_ptr); return cpumask_map_insert(cpumask, task->pid); }h]hXstruct cpumask_map_value { struct bpf_cpumask __kptr * cpumask; }; struct array_map { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct cpumask_map_value); __uint(max_entries, 65536); } cpumask_map SEC(".maps"); static int cpumask_map_insert(struct bpf_cpumask *mask, u32 pid) { struct cpumask_map_value local, *v; long status; struct bpf_cpumask *old; u32 key = pid; local.cpumask = NULL; status = bpf_map_update_elem(&cpumask_map, &key, &local, 0); if (status) { bpf_cpumask_release(mask); return status; } v = bpf_map_lookup_elem(&cpumask_map, &key); if (!v) { bpf_cpumask_release(mask); return -ENOENT; } old = bpf_kptr_xchg(&v->cpumask, mask); if (old) bpf_cpumask_release(old); return 0; } /** * A sample tracepoint showing how a task's cpumask can be queried and * recorded as a kptr. */ SEC("tp_btf/task_newtask") int BPF_PROG(record_task_cpumask, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *cpumask; int ret; cpumask = bpf_cpumask_create(); if (!cpumask) return -ENOMEM; if (!bpf_cpumask_full(task->cpus_ptr)) bpf_printk("task %s has CPU affinity", task->comm); bpf_cpumask_copy(cpumask, task->cpus_ptr); return cpumask_map_insert(cpumask, task->pid); }}hjsbah}(h]h ]h"]h$]h&]hhƌforcelanguagejhighlight_args}uh1jhhhK3hjhhubeh}(h]struct-bpf-cpumask-lifecycleah ]h"]$2.1.1 struct bpf_cpumask * lifecycleah$]h&]uh1hhj[hhhhhK#ubh transition)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhKphj[hhubh)}(hhh](h)}(h'2.1.1 ``struct bpf_cpumask *`` as kptrsh](h2.1.1 }(hj hhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh as kptrs}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhhhhhKsubh)}(hX As mentioned and illustrated above, these ``struct bpf_cpumask *`` objects can also be stored in a map and used as kptrs. If a ``struct bpf_cpumask *`` is in a map, the reference can be removed from the map with bpf_kptr_xchg(), or opportunistically acquired using RCU:h](h*As mentioned and illustrated above, these }(hj)hhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh= objects can also be stored in a map and used as kptrs. If a }(hj)hhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubhv is in a map, the reference can be removed from the map with bpf_kptr_xchg(), or opportunistically acquired using RCU:}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhjhhubj)}(hXc/* struct containing the struct bpf_cpumask kptr which is stored in the map. */ struct cpumasks_kfunc_map_value { struct bpf_cpumask __kptr * bpf_cpumask; }; /* The map containing struct cpumasks_kfunc_map_value entries. */ struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct cpumasks_kfunc_map_value); __uint(max_entries, 1); } cpumasks_kfunc_map SEC(".maps"); /* ... */ /** * A simple example tracepoint program showing how a * struct bpf_cpumask * kptr that is stored in a map can * be passed to kfuncs using RCU protection. */ SEC("tp_btf/cgroup_mkdir") int BPF_PROG(cgrp_ancestor_example, struct cgroup *cgrp, const char *path) { struct bpf_cpumask *kptr; struct cpumasks_kfunc_map_value *v; u32 key = 0; /* Assume a bpf_cpumask * kptr was previously stored in the map. */ v = bpf_map_lookup_elem(&cpumasks_kfunc_map, &key); if (!v) return -ENOENT; bpf_rcu_read_lock(); /* Acquire a reference to the bpf_cpumask * kptr that's already stored in the map. */ kptr = v->cpumask; if (!kptr) { /* If no bpf_cpumask was present in the map, it's because * we're racing with another CPU that removed it with * bpf_kptr_xchg() between the bpf_map_lookup_elem() * above, and our load of the pointer from the map. */ bpf_rcu_read_unlock(); return -EBUSY; } bpf_cpumask_setall(kptr); bpf_rcu_read_unlock(); return 0; }h]hXc/* struct containing the struct bpf_cpumask kptr which is stored in the map. */ struct cpumasks_kfunc_map_value { struct bpf_cpumask __kptr * bpf_cpumask; }; /* The map containing struct cpumasks_kfunc_map_value entries. */ struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct cpumasks_kfunc_map_value); __uint(max_entries, 1); } cpumasks_kfunc_map SEC(".maps"); /* ... */ /** * A simple example tracepoint program showing how a * struct bpf_cpumask * kptr that is stored in a map can * be passed to kfuncs using RCU protection. */ SEC("tp_btf/cgroup_mkdir") int BPF_PROG(cgrp_ancestor_example, struct cgroup *cgrp, const char *path) { struct bpf_cpumask *kptr; struct cpumasks_kfunc_map_value *v; u32 key = 0; /* Assume a bpf_cpumask * kptr was previously stored in the map. */ v = bpf_map_lookup_elem(&cpumasks_kfunc_map, &key); if (!v) return -ENOENT; bpf_rcu_read_lock(); /* Acquire a reference to the bpf_cpumask * kptr that's already stored in the map. */ kptr = v->cpumask; if (!kptr) { /* If no bpf_cpumask was present in the map, it's because * we're racing with another CPU that removed it with * bpf_kptr_xchg() between the bpf_map_lookup_elem() * above, and our load of the pointer from the map. */ bpf_rcu_read_unlock(); return -EBUSY; } bpf_cpumask_setall(kptr); bpf_rcu_read_unlock(); return 0; }}hj[sbah}(h]h ]h"]h$]h&]hhjjjj}uh1jhhhKzhjhhubeh}(h]struct-bpf-cpumask-as-kptrsah ]h"]#2.1.1 struct bpf_cpumask * as kptrsah$]h&]uh1hhj[hhhhhKsubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhKhj[hhubh)}(hhh](h)}(h2.2 ``struct cpumask``h](h2.2 }(hjhhhNhNubj)}(h``struct cpumask``h]hstruct cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhj|hhhhhKubh)}(hXi``struct cpumask`` is the object that actually contains the cpumask bitmap being queried, mutated, etc. A ``struct bpf_cpumask`` wraps a ``struct cpumask``, which is why it's safe to cast it as such (note however that it is **not** safe to cast a ``struct cpumask *`` to a ``struct bpf_cpumask *``, and the verifier will reject any program that tries to do so).h](j)}(h``struct cpumask``h]hstruct cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX is the object that actually contains the cpumask bitmap being queried, mutated, etc. A }(hjhhhNhNubj)}(h``struct bpf_cpumask``h]hstruct bpf_cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh wraps a }(hjhhhNhNubj)}(h``struct cpumask``h]hstruct cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhG, which is why it’s safe to cast it as such (note however that it is }(hjhhhNhNubjC)}(h**not**h]hnot}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubh safe to cast a }(hjhhhNhNubj)}(h``struct cpumask *``h]hstruct cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to a }(hjhhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh@, and the verifier will reject any program that tries to do so).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj|hhubh)}(hAs we'll see below, any kfunc that mutates its cpumask argument will take a ``struct bpf_cpumask *`` as that argument. Any argument that simply queries the cpumask will instead take a ``struct cpumask *``.h](hNAs we’ll see below, any kfunc that mutates its cpumask argument will take a }(hj hhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhT as that argument. Any argument that simply queries the cpumask will instead take a }(hj hhhNhNubj)}(h``struct cpumask *``h]hstruct cpumask *}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj|hhubeh}(h]struct-cpumaskah ]h"]2.2 struct cpumaskah$]h&]uh1hhj[hhhhhKubeh}(h]bpf-cpumask-objectsah ]h"]2. bpf cpumask objectsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h3. cpumask kfuncsh]h3. cpumask kfuncs}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjS hhhhhKubh)}(hAbove, we described the kfuncs that can be used to allocate, acquire, release, etc a ``struct bpf_cpumask *``. This section of the document will describe the kfuncs for mutating and querying cpumasks.h](hUAbove, we described the kfuncs that can be used to allocate, acquire, release, etc a }(hjd hhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd ubh[. This section of the document will describe the kfuncs for mutating and querying cpumasks.}(hjd hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjS hhubh)}(hhh](h)}(h3.1 Mutating cpumasksh]h3.1 Mutating cpumasks}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hSome cpumask kfuncs are "read-only" in that they don't mutate any of their arguments, whereas others mutate at least one argument (which means that the argument must be a ``struct bpf_cpumask *``, as described above).h](hSome cpumask kfuncs are “read-only” in that they don’t mutate any of their arguments, whereas others mutate at least one argument (which means that the argument must be a }(hj hhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, as described above).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hThis section will describe all of the cpumask kfuncs which mutate at least one argument. :ref:`cpumasks-querying-label` below describes the read-only kfuncs.h](hYThis section will describe all of the cpumask kfuncs which mutate at least one argument. }(hj hhhNhNubh)}(h:ref:`cpumasks-querying-label`h]j))}(hj h]hcpumasks-querying-label}(hj hhhNhNubah}(h]h ](j4stdstd-refeh"]h$]h&]uh1j(hj ubah}(h]h ]h"]h$]h&]refdocjA refdomainj reftyperef refexplicitrefwarnjGcpumasks-querying-labeluh1hhhhKhj ubh& below describes the read-only kfuncs.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]mutating-cpumasksah ]h"]3.1 mutating cpumasksah$]h&]uh1hhjS hhhhhKubh)}(hhh](h)}(h3.1.1 Setting and clearing CPUsh]h3.1.1 Setting and clearing CPUs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(h~bpf_cpumask_set_cpu() and bpf_cpumask_clear_cpu() can be used to set and clear a CPU in a ``struct bpf_cpumask`` respectively:h](hZbpf_cpumask_set_cpu() and bpf_cpumask_clear_cpu() can be used to set and clear a CPU in a }(hj hhhNhNubj)}(h``struct bpf_cpumask``h]hstruct bpf_cpumask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh respectively:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j bpf_cpumask_set_cpu (C function)c.bpf_cpumask_set_cpuhNtauh1jhj hhhNhNubj$)}(hhh](j))}(hK__bpf_kfunc void bpf_cpumask_set_cpu (u32 cpu, struct bpf_cpumask *cpumask)h]j/)}(hJ__bpf_kfunc void bpf_cpumask_set_cpu(u32 cpu, struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hj5 hhhNhNubj9)}(h h]h }(hj= hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj5 hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKubj)}(hvoidh]hvoid}(hjL hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5 hhhjK hKubj9)}(h h]h }(hjZ hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj5 hhhjK hKubj)}(hbpf_cpumask_set_cpuh]jm)}(hbpf_cpumask_set_cpuh]hbpf_cpumask_set_cpu}(hjl hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjh ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj5 hhhjK hKubj)}(h&(u32 cpu, struct bpf_cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jm)}(hu32h]hu32}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j)}jjn sbc.bpf_cpumask_set_cpuasbuh1hhj ubj9)}(h h]h }(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubjm)}(hcpuh]hcpu}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubj)}(hstruct bpf_cpumask *cpumaskh](jK)}(hjNh]hstruct}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj9)}(h h]h }(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j c.bpf_cpumask_set_cpuasbuh1hhj ubj9)}(h h]h }(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjm)}(hcpumaskh]hcpumask}(hj) hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj ubeh}(h]h ]h"]h$]h&]hhuh1jhj5 hhhjK hKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj1 hhhjK hKubah}(h]j, ah ](j j eh"]h$]h&]jj)jhuh1j(hjK hKhj. hhubj)}(hhh]h)}(h%Set a bit for a CPU in a BPF cpumask.h]h%Set a bit for a CPU in a BPF cpumask.}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhjP hhubah}(h]h ]h"]h$]h&]uh1jhj. hhhjK hKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jk j4jk j5j6j7uh1j#hhhj hNhNubj9)}(h**Parameters** ``u32 cpu`` The CPU to be set in the cpumask. ``struct bpf_cpumask *cpumask`` The BPF cpumask in which a bit is being set.h](h)}(h**Parameters**h]jC)}(hju h]h Parameters}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjs ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhjo ubjY)}(hhh](j^)}(h.``u32 cpu`` The CPU to be set in the cpumask. h](jd)}(h ``u32 cpu``h]j)}(hj h]hu32 cpu}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubj~)}(hhh]h)}(h!The CPU to be set in the cpumask.h]h!The CPU to be set in the cpumask.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j}hj ubeh}(h]h ]h"]h$]h&]uh1j]hj hKhj ubj^)}(hL``struct bpf_cpumask *cpumask`` The BPF cpumask in which a bit is being set.h](jd)}(h``struct bpf_cpumask *cpumask``h]j)}(hj h]hstruct bpf_cpumask *cpumask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubj~)}(hhh]h)}(h,The BPF cpumask in which a bit is being set.h]h,The BPF cpumask in which a bit is being set.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubah}(h]h ]h"]h$]h&]uh1j}hj ubeh}(h]h ]h"]h$]h&]uh1j]hj hKhj ubeh}(h]h ]h"]h$]h&]uh1jXhjo ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"bpf_cpumask_clear_cpu (C function)c.bpf_cpumask_clear_cpuhNtauh1jhj hhhNhNubj$)}(hhh](j))}(hM__bpf_kfunc void bpf_cpumask_clear_cpu (u32 cpu, struct bpf_cpumask *cpumask)h]j/)}(hL__bpf_kfunc void bpf_cpumask_clear_cpu(u32 cpu, struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hj# hhhNhNubj9)}(h h]h }(hj+ hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj# hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKubj)}(hvoidh]hvoid}(hj: hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj# hhhj9 hKubj9)}(h h]h }(hjH hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj# hhhj9 hKubj)}(hbpf_cpumask_clear_cpuh]jm)}(hbpf_cpumask_clear_cpuh]hbpf_cpumask_clear_cpu}(hjZ hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjV ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj# hhhj9 hKubj)}(h&(u32 cpu, struct bpf_cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jm)}(hu32h]hu32}(hjy hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjv ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj{ modnameN classnameNjj)}j]j)}jj\ sbc.bpf_cpumask_clear_cpuasbuh1hhjr ubj9)}(h h]h }(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjr ubjm)}(hcpuh]hcpu}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjr ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjn ubj)}(hstruct bpf_cpumask *cpumaskh](jK)}(hjNh]hstruct}(hj hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj9)}(h h]h }(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]j c.bpf_cpumask_clear_cpuasbuh1hhj ubj9)}(h h]h }(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjm)}(hcpumaskh]hcpumask}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjn ubeh}(h]h ]h"]h$]h&]hhuh1jhj# hhhj9 hKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj hhhj9 hKubah}(h]j ah ](j j eh"]h$]h&]jj)jhuh1j(hj9 hKhj hhubj)}(hhh]h)}(h'Clear a bit for a CPU in a BPF cpumask.h]h'Clear a bit for a CPU in a BPF cpumask.}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj> hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj9 hKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jY j4jY j5j6j7uh1j#hhhj hNhNubj9)}(h**Parameters** ``u32 cpu`` The CPU to be cleared from the cpumask. ``struct bpf_cpumask *cpumask`` The BPF cpumask in which a bit is being cleared.h](h)}(h**Parameters**h]jC)}(hjc h]h Parameters}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhja ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj] ubjY)}(hhh](j^)}(h4``u32 cpu`` The CPU to be cleared from the cpumask. h](jd)}(h ``u32 cpu``h]j)}(hj h]hu32 cpu}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj| ubj~)}(hhh]h)}(h'The CPU to be cleared from the cpumask.h]h'The CPU to be cleared from the cpumask.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1j}hj| ubeh}(h]h ]h"]h$]h&]uh1j]hj hKhjy ubj^)}(hP``struct bpf_cpumask *cpumask`` The BPF cpumask in which a bit is being cleared.h](jd)}(h``struct bpf_cpumask *cpumask``h]j)}(hj h]hstruct bpf_cpumask *cpumask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubj~)}(hhh]h)}(h0The BPF cpumask in which a bit is being cleared.h]h0The BPF cpumask in which a bit is being cleared.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:213: ./kernel/bpf/cpumask.chKhj ubah}(h]h ]h"]h$]h&]uh1j}hj ubeh}(h]h ]h"]h$]h&]uh1j]hj hKhjy ubeh}(h]h ]h"]h$]h&]uh1jXhj] ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj hhhNhNubh)}(hRThese kfuncs are pretty straightforward, and can be used, for example, as follows:h]hRThese kfuncs are pretty straightforward, and can be used, for example, as follows:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hX/** * A sample tracepoint showing how a cpumask can be queried. */ SEC("tp_btf/task_newtask") int BPF_PROG(test_set_clear_cpu, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *cpumask; cpumask = bpf_cpumask_create(); if (!cpumask) return -ENOMEM; bpf_cpumask_set_cpu(0, cpumask); if (!bpf_cpumask_test_cpu(0, cast(cpumask))) /* Should never happen. */ goto release_exit; bpf_cpumask_clear_cpu(0, cpumask); if (bpf_cpumask_test_cpu(0, cast(cpumask))) /* Should never happen. */ goto release_exit; /* struct cpumask * pointers such as task->cpus_ptr can also be queried. */ if (bpf_cpumask_test_cpu(0, task->cpus_ptr)) bpf_printk("task %s can use CPU %d", task->comm, 0); release_exit: bpf_cpumask_release(cpumask); return 0; }h]hX/** * A sample tracepoint showing how a cpumask can be queried. */ SEC("tp_btf/task_newtask") int BPF_PROG(test_set_clear_cpu, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *cpumask; cpumask = bpf_cpumask_create(); if (!cpumask) return -ENOMEM; bpf_cpumask_set_cpu(0, cpumask); if (!bpf_cpumask_test_cpu(0, cast(cpumask))) /* Should never happen. */ goto release_exit; bpf_cpumask_clear_cpu(0, cpumask); if (bpf_cpumask_test_cpu(0, cast(cpumask))) /* Should never happen. */ goto release_exit; /* struct cpumask * pointers such as task->cpus_ptr can also be queried. */ if (bpf_cpumask_test_cpu(0, task->cpus_ptr)) bpf_printk("task %s can use CPU %d", task->comm, 0); release_exit: bpf_cpumask_release(cpumask); return 0; }}hj sbah}(h]h ]h"]h$]h&]hhjjjj}uh1jhhhKhj hhubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhKhj hhubh)}(hbpf_cpumask_test_and_set_cpu() and bpf_cpumask_test_and_clear_cpu() are complementary kfuncs that allow callers to atomically test and set (or clear) CPUs:h]hbpf_cpumask_test_and_set_cpu() and bpf_cpumask_test_and_clear_cpu() are complementary kfuncs that allow callers to atomically test and set (or clear) CPUs:}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j)bpf_cpumask_test_and_set_cpu (C function)c.bpf_cpumask_test_and_set_cpuhNtauh1jhj hhhNhNubj$)}(hhh](j))}(hT__bpf_kfunc bool bpf_cpumask_test_and_set_cpu (u32 cpu, struct bpf_cpumask *cpumask)h]j/)}(hS__bpf_kfunc bool bpf_cpumask_test_and_set_cpu(u32 cpu, struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjFhhhNhNubj9)}(h h]h }(hjNhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjFhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKubj)}(hboolh]hbool}(hj]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFhhhj\hKubj9)}(h h]h }(hjkhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjFhhhj\hKubj)}(hbpf_cpumask_test_and_set_cpuh]jm)}(hbpf_cpumask_test_and_set_cpuh]hbpf_cpumask_test_and_set_cpu}(hj}hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjyubah}(h]h ](jjeh"]h$]h&]hhuh1jhjFhhhj\hKubj)}(h&(u32 cpu, struct bpf_cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jm)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.bpf_cpumask_test_and_set_cpuasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubjm)}(hcpuh]hcpu}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct bpf_cpumask *cpumaskh](jK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.bpf_cpumask_test_and_set_cpuasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hcpumaskh]hcpumask}(hj:hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjFhhhj\hKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjBhhhj\hKubah}(h]j=ah ](j j eh"]h$]h&]jj)jhuh1j(hj\hKhj?hhubj)}(hhh]h)}(h/Atomically test and set a CPU in a BPF cpumask.h]h/Atomically test and set a CPU in a BPF cpumask.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjahhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj\hKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j|j4j|j5j6j7uh1j#hhhj hNhNubj9)}(hX**Parameters** ``u32 cpu`` The CPU being set and queried for. ``struct bpf_cpumask *cpumask`` The BPF cpumask being set and queried for containing a CPU. **Return** * true - **cpu** is set in the cpumask * false - **cpu** was not set in the cpumask, or **cpu** is invalid.h](h)}(h**Parameters**h]jC)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubjY)}(hhh](j^)}(h/``u32 cpu`` The CPU being set and queried for. h](jd)}(h ``u32 cpu``h]j)}(hjh]hu32 cpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubj~)}(hhh]h)}(h"The CPU being set and queried for.h]h"The CPU being set and queried for.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hjhKhjubj^)}(h\``struct bpf_cpumask *cpumask`` The BPF cpumask being set and queried for containing a CPU. h](jd)}(h``struct bpf_cpumask *cpumask``h]j)}(hjh]hstruct bpf_cpumask *cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubj~)}(hhh]h)}(h;The BPF cpumask being set and queried for containing a CPU.h]h;The BPF cpumask being set and queried for containing a CPU.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hjhKhjubeh}(h]h ]h"]h$]h&]uh1jXhjubh)}(h **Return**h]jC)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubj)}(hhh](j)}(h%true - **cpu** is set in the cpumaskh]h)}(hj4h](htrue - }(hj6hhhNhNubjC)}(h**cpu**h]hcpu}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj6ubh is set in the cpumask}(hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhj2ubah}(h]h ]h"]h$]h&]uh1jhj/ubj)}(hBfalse - **cpu** was not set in the cpumask, or **cpu** is invalid.h]h)}(hj^h](hfalse - }(hj`hhhNhNubjC)}(h**cpu**h]hcpu}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj`ubh was not set in the cpumask, or }(hj`hhhNhNubjC)}(h**cpu**h]hcpu}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj`ubh is invalid.}(hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhj\ubah}(h]h ]h"]h$]h&]uh1jhj/ubeh}(h]h ]h"]h$]h&]j-juh1jhjUhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j+bpf_cpumask_test_and_clear_cpu (C function) c.bpf_cpumask_test_and_clear_cpuhNtauh1jhj hhhNhNubj$)}(hhh](j))}(hV__bpf_kfunc bool bpf_cpumask_test_and_clear_cpu (u32 cpu, struct bpf_cpumask *cpumask)h]j/)}(hU__bpf_kfunc bool bpf_cpumask_test_and_clear_cpu(u32 cpu, struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjhhhNhNubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKubj)}(hj_h]hbool}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhjhKubj)}(hbpf_cpumask_test_and_clear_cpuh]jm)}(hbpf_cpumask_test_and_clear_cpuh]hbpf_cpumask_test_and_clear_cpu}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj)}(h&(u32 cpu, struct bpf_cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jm)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsb c.bpf_cpumask_test_and_clear_cpuasbuh1hhjubj9)}(h h]h }(hj/hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubjm)}(hcpuh]hcpu}(hj=hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hstruct bpf_cpumask *cpumaskh](jK)}(hjNh]hstruct}(hjVhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjRubj9)}(h h]h }(hjchhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjRubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hjthhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjqubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjvmodnameN classnameNjj)}j]j+ c.bpf_cpumask_test_and_clear_cpuasbuh1hhjRubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjRubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjRubjm)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjRubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjhhhjhKubah}(h]jah ](j j eh"]h$]h&]jj)jhuh1j(hjhKhjhhubj)}(hhh]h)}(h1Atomically test and clear a CPU in a BPF cpumask.h]h1Atomically test and clear a CPU in a BPF cpumask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jj4jj5j6j7uh1j#hhhj hNhNubj9)}(hX!**Parameters** ``u32 cpu`` The CPU being cleared and queried for. ``struct bpf_cpumask *cpumask`` The BPF cpumask being cleared and queried for containing a CPU. **Return** * true - **cpu** is set in the cpumask * false - **cpu** was not set in the cpumask, or **cpu** is invalid.h](h)}(h**Parameters**h]jC)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubjY)}(hhh](j^)}(h3``u32 cpu`` The CPU being cleared and queried for. h](jd)}(h ``u32 cpu``h]j)}(hjh]hu32 cpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubj~)}(hhh]h)}(h&The CPU being cleared and queried for.h]h&The CPU being cleared and queried for.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hKhj.ubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hj-hKhjubj^)}(h```struct bpf_cpumask *cpumask`` The BPF cpumask being cleared and queried for containing a CPU. h](jd)}(h``struct bpf_cpumask *cpumask``h]j)}(hjQh]hstruct bpf_cpumask *cpumask}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjKubj~)}(hhh]h)}(h?The BPF cpumask being cleared and queried for containing a CPU.h]h?The BPF cpumask being cleared and queried for containing a CPU.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhKhjgubah}(h]h ]h"]h$]h&]uh1j}hjKubeh}(h]h ]h"]h$]h&]uh1j]hjfhKhjubeh}(h]h ]h"]h$]h&]uh1jXhjubh)}(h **Return**h]jC)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubj)}(hhh](j)}(h%true - **cpu** is set in the cpumaskh]h)}(hjh](htrue - }(hjhhhNhNubjC)}(h**cpu**h]hcpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubh is set in the cpumask}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hBfalse - **cpu** was not set in the cpumask, or **cpu** is invalid.h]h)}(hjh](hfalse - }(hjhhhNhNubjC)}(h**cpu**h]hcpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubh was not set in the cpumask, or }(hjhhhNhNubjC)}(h**cpu**h]hcpu}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubh is invalid.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:258: ./kernel/bpf/cpumask.chKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]j-juh1jhjhKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj hhhNhNubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhMhj hhubh)}(hWe can also set and clear entire ``struct bpf_cpumask *`` objects in one operation using bpf_cpumask_setall() and bpf_cpumask_clear():h](h!We can also set and clear entire }(hj"hhhNhNubj)}(h``struct bpf_cpumask *``h]hstruct bpf_cpumask *}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubhM objects in one operation using bpf_cpumask_setall() and bpf_cpumask_clear():}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_setall (C function)c.bpf_cpumask_setallhNtauh1jhj hhhNhNubj$)}(hhh](j))}(hA__bpf_kfunc void bpf_cpumask_setall (struct bpf_cpumask *cpumask)h]j/)}(h@__bpf_kfunc void bpf_cpumask_setall(struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjWhhhNhNubj9)}(h h]h }(hj_hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjWhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKubj)}(hvoidh]hvoid}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWhhhjmhKubj9)}(h h]h }(hj|hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjWhhhjmhKubj)}(hbpf_cpumask_setallh]jm)}(hbpf_cpumask_setallh]hbpf_cpumask_setall}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjWhhhjmhKubj)}(h(struct bpf_cpumask *cpumask)h]j)}(hstruct bpf_cpumask *cpumaskh](jK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.bpf_cpumask_setallasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjWhhhjmhKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjShhhjmhKubah}(h]jNah ](j j eh"]h$]h&]jj)jhuh1j(hjmhKhjPhhubj)}(hhh]h)}(h%Set all of the bits in a BPF cpumask.h]h%Set all of the bits in a BPF cpumask.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhj*hhubah}(h]h ]h"]h$]h&]uh1jhjPhhhjmhKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jEj4jEj5j6j7uh1j#hhhj hNhNubj9)}(h]**Parameters** ``struct bpf_cpumask *cpumask`` The BPF cpumask having all of its bits set.h](h)}(h**Parameters**h]jC)}(hjOh]h Parameters}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjMubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjIubjY)}(hhh]j^)}(hK``struct bpf_cpumask *cpumask`` The BPF cpumask having all of its bits set.h](jd)}(h``struct bpf_cpumask *cpumask``h]j)}(hjnh]hstruct bpf_cpumask *cpumask}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjhubj~)}(hhh]h)}(h+The BPF cpumask having all of its bits set.h]h+The BPF cpumask having all of its bits set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjubah}(h]h ]h"]h$]h&]uh1j}hjhubeh}(h]h ]h"]h$]h&]uh1j]hjhKhjeubah}(h]h ]h"]h$]h&]uh1jXhjIubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_clear (C function)c.bpf_cpumask_clearhNtauh1jhj hhhNhNubj$)}(hhh](j))}(h@__bpf_kfunc void bpf_cpumask_clear (struct bpf_cpumask *cpumask)h]j/)}(h?__bpf_kfunc void bpf_cpumask_clear(struct bpf_cpumask *cpumask)h](h __bpf_kfunc}(hjhhhNhNubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKubj)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjhhhjhKubj)}(hbpf_cpumask_clearh]jm)}(hbpf_cpumask_clearh]hbpf_cpumask_clear}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubj)}(h(struct bpf_cpumask *cpumask)h]j)}(hstruct bpf_cpumask *cpumaskh](jK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hj$hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hj5hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj7modnameN classnameNjj)}j]j)}jjsbc.bpf_cpumask_clearasbuh1hhjubj9)}(h h]h }(hjUhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hcpumaskh]hcpumask}(hjphhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubah}(h]h ]h"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjhhhjhKubah}(h]jah ](j j eh"]h$]h&]jj)jhuh1j(hjhKhjhhubj)}(hhh]h)}(h'Clear all of the bits in a BPF cpumask.h]h'Clear all of the bits in a BPF cpumask.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jj4jj5j6j7uh1j#hhhj hNhNubj9)}(hP**Parameters** ``struct bpf_cpumask *cpumask`` The BPF cpumask being cleared.h](h)}(h**Parameters**h]jC)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjubjY)}(hhh]j^)}(h>``struct bpf_cpumask *cpumask`` The BPF cpumask being cleared.h](jd)}(h``struct bpf_cpumask *cpumask``h]j)}(hjh]hstruct bpf_cpumask *cpumask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjubj~)}(hhh]h)}(hThe BPF cpumask being cleared.h]hThe BPF cpumask being cleared.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:266: ./kernel/bpf/cpumask.chKhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hjhKhjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj hhhNhNubeh}(h]setting-and-clearing-cpusah ]h"]3.1.1 setting and clearing cpusah$]h&]uh1hhjS hhhhhKubh)}(hhh](h)}(h!3.1.2 Operations between cpumasksh]h!3.1.2 Operations between cpumasks}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hhhhhMubh)}(hIn addition to setting and clearing individual CPUs in a single cpumask, callers can also perform bitwise operations between multiple cpumasks using bpf_cpumask_and(), bpf_cpumask_or(), and bpf_cpumask_xor():h]hIn addition to setting and clearing individual CPUs in a single cpumask, callers can also perform bitwise operations between multiple cpumasks using bpf_cpumask_and(), bpf_cpumask_or(), and bpf_cpumask_xor():}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_and (C function)c.bpf_cpumask_andhNtauh1jhj$hhhNhNubj$)}(hhh](j))}(hr__bpf_kfunc bool bpf_cpumask_and (struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h]j/)}(hq__bpf_kfunc bool bpf_cpumask_and(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hjXhhhNhNubj9)}(h h]h }(hj`hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjXhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMubj)}(hj_h]hbool}(hjohhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXhhhjnhMubj9)}(h h]h }(hj|hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjXhhhjnhMubj)}(hbpf_cpumask_andh]jm)}(hbpf_cpumask_andh]hbpf_cpumask_and}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjXhhhjnhMubj)}(hQ(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](j)}(hstruct bpf_cpumask *dsth](jK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.bpf_cpumask_andasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hdsth]hdst}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct cpumask *src1h](jK)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hj*hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubjK)}(hjNh]hstruct}(hj8hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjEhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hjVhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjSubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjXmodnameN classnameNjj)}j]jc.bpf_cpumask_andasbuh1hhjubj9)}(h h]h }(hjthhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hsrc1h]hsrc1}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct cpumask *src2h](jK)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubjK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.bpf_cpumask_andasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hsrc2h]hsrc2}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjXhhhjnhMubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjThhhjnhMubah}(h]jOah ](j j eh"]h$]h&]jj)jhuh1j(hjnhMhjQhhubj)}(hhh]h)}(h&AND two cpumasks and store the result.h]h&AND two cpumasks and store the result.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjAhhubah}(h]h ]h"]h$]h&]uh1jhjQhhhjnhMubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j\j4j\j5j6j7uh1j#hhhj$hNhNubj9)}(hX**Parameters** ``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Return** * true - **dst** has at least one bit set following the operation * false - **dst** is empty following the operation **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]jC)}(hjfh]h Parameters}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjdubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhj`ubjY)}(hhh](j^)}(hN``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. h](jd)}(h``struct bpf_cpumask *dst``h]j)}(hjh]hstruct bpf_cpumask *dst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubj~)}(hhh]h)}(h1The BPF cpumask where the result is being stored.h]h1The BPF cpumask where the result is being stored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hjhMhj|ubj^)}(h0``const struct cpumask *src1`` The first input. h](jd)}(h``const struct cpumask *src1``h]j)}(hjh]hconst struct cpumask *src1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubj~)}(hhh]h)}(hThe first input.h]hThe first input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hjhMhj|ubj^)}(h1``const struct cpumask *src2`` The second input. h](jd)}(h``const struct cpumask *src2``h]j)}(hjh]hconst struct cpumask *src2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubj~)}(hhh]h)}(hThe second input.h]hThe second input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hj hMhj|ubeh}(h]h ]h"]h$]h&]uh1jXhj`ubh)}(h **Return**h]jC)}(hj2h]hReturn}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj0ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhj`ubj)}(hhh](j)}(h@true - **dst** has at least one bit set following the operationh]h)}(hjMh](htrue - }(hjOhhhNhNubjC)}(h**dst**h]hdst}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjOubh1 has at least one bit set following the operation}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjKubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(h1false - **dst** is empty following the operation h]h)}(h0false - **dst** is empty following the operationh](hfalse - }(hjyhhhNhNubjC)}(h**dst**h]hdst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjyubh! is empty following the operation}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjuubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]j-juh1jhjnhMhj`ubh)}(h**Description**h]jC)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM hj`ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hjhhhNhNubjC)}(h**src1**h]hsrc1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubh and }(hjhhhNhNubjC)}(h**src2**h]hsrc2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM hj`ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_or (C function)c.bpf_cpumask_orhNtauh1jhj$hhhNhNubj$)}(hhh](j))}(hq__bpf_kfunc void bpf_cpumask_or (struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h]j/)}(hp__bpf_kfunc void bpf_cpumask_or(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj hhhNhNubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMubj)}(hvoidh]hvoid}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj#hMubj9)}(h h]h }(hj2hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj hhhj#hMubj)}(hbpf_cpumask_orh]jm)}(hbpf_cpumask_orh]hbpf_cpumask_or}(hjDhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj@ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj#hMubj)}(hQ(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](j)}(hstruct bpf_cpumask *dsth](jK)}(hjNh]hstruct}(hj`hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj\ubj9)}(h h]h }(hjmhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj\ubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hj~hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj{ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjFsbc.bpf_cpumask_orasbuh1hhj\ubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj\ubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\ubjm)}(hdsth]hdst}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj\ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjXubj)}(hconst struct cpumask *src1h](jK)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubjK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj modnameN classnameNjj)}j]jc.bpf_cpumask_orasbuh1hhjubj9)}(h h]h }(hj)hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hsrc1h]hsrc1}(hjDhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjXubj)}(hconst struct cpumask *src2h](jK)}(hjh]hconst}(hj]hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjYubj9)}(h h]h }(hjjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjYubjK)}(hjNh]hstruct}(hjxhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjYubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjYubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.bpf_cpumask_orasbuh1hhjYubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjYubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYubjm)}(hsrc2h]hsrc2}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjYubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjXubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj#hMubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj hhhj#hMubah}(h]jah ](j j eh"]h$]h&]jj)jhuh1j(hj#hMhjhhubj)}(hhh]h)}(h%OR two cpumasks and store the result.h]h%OR two cpumasks and store the result.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj#hMubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jj4jj5j6j7uh1j#hhhj$hNhNubj9)}(hX#**Parameters** ``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]jC)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubjY)}(hhh](j^)}(hN``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. h](jd)}(h``struct bpf_cpumask *dst``h]j)}(hj:h]hstruct bpf_cpumask *dst}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhj4ubj~)}(hhh]h)}(h1The BPF cpumask where the result is being stored.h]h1The BPF cpumask where the result is being stored.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjPubah}(h]h ]h"]h$]h&]uh1j}hj4ubeh}(h]h ]h"]h$]h&]uh1j]hjOhMhj1ubj^)}(h0``const struct cpumask *src1`` The first input. h](jd)}(h``const struct cpumask *src1``h]j)}(hjsh]hconst struct cpumask *src1}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjqubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjmubj~)}(hhh]h)}(hThe first input.h]hThe first input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j}hjmubeh}(h]h ]h"]h$]h&]uh1j]hjhMhj1ubj^)}(h1``const struct cpumask *src2`` The second input. h](jd)}(h``const struct cpumask *src2``h]j)}(hjh]hconst struct cpumask *src2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubj~)}(hhh]h)}(hThe second input.h]hThe second input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hjhMhj1ubeh}(h]h ]h"]h$]h&]uh1jXhjubh)}(h**Description**h]jC)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hjhhhNhNubjC)}(h**src1**h]hsrc1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubh and }(hjhhhNhNubjC)}(h**src2**h]hsrc2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj$hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_xor (C function)c.bpf_cpumask_xorhNtauh1jhj$hhhNhNubj$)}(hhh](j))}(hr__bpf_kfunc void bpf_cpumask_xor (struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h]j/)}(hq__bpf_kfunc void bpf_cpumask_xor(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hjLhhhNhNubj9)}(h h]h }(hjThhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjLhhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM#ubj)}(hvoidh]hvoid}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLhhhjbhM#ubj9)}(h h]h }(hjqhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjLhhhjbhM#ubj)}(hbpf_cpumask_xorh]jm)}(hbpf_cpumask_xorh]hbpf_cpumask_xor}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjLhhhjbhM#ubj)}(hQ(struct bpf_cpumask *dst, const struct cpumask *src1, const struct cpumask *src2)h](j)}(hstruct bpf_cpumask *dsth](jK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]j)}jjsbc.bpf_cpumask_xorasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hdsth]hdst}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct cpumask *src1h](jK)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubjK)}(hjNh]hstruct}(hj,hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj ubj9)}(h h]h }(hj9hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hjJhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjGubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjLmodnameN classnameNjj)}j]jc.bpf_cpumask_xorasbuh1hhj ubj9)}(h h]h }(hjhhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj ubj)}(hjh]h*}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjm)}(hsrc1h]hsrc1}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(hconst struct cpumask *src2h](jK)}(hjh]hconst}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubjK)}(hjNh]hstruct}(hjhhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj)}j]jc.bpf_cpumask_xorasbuh1hhjubj9)}(h h]h }(hjhhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubjm)}(hsrc2h]hsrc2}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjLhhhjbhM#ubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjHhhhjbhM#ubah}(h]jCah ](j j eh"]h$]h&]jj)jhuh1j(hjbhM#hjEhhubj)}(hhh]h)}(h&XOR two cpumasks and store the result.h]h&XOR two cpumasks and store the result.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM#hj5hhubah}(h]h ]h"]h$]h&]uh1jhjEhhhjbhM#ubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jPj4jPj5j6j7uh1j#hhhj$hNhNubj9)}(hX#**Parameters** ``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]jC)}(hjZh]h Parameters}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjXubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM'hjTubjY)}(hhh](j^)}(hN``struct bpf_cpumask *dst`` The BPF cpumask where the result is being stored. h](jd)}(h``struct bpf_cpumask *dst``h]j)}(hjyh]hstruct bpf_cpumask *dst}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM$hjsubj~)}(hhh]h)}(h1The BPF cpumask where the result is being stored.h]h1The BPF cpumask where the result is being stored.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM$hjubah}(h]h ]h"]h$]h&]uh1j}hjsubeh}(h]h ]h"]h$]h&]uh1j]hjhM$hjpubj^)}(h0``const struct cpumask *src1`` The first input. h](jd)}(h``const struct cpumask *src1``h]j)}(hjh]hconst struct cpumask *src1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM%hjubj~)}(hhh]h)}(hThe first input.h]hThe first input.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM%hjubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hjhM%hjpubj^)}(h1``const struct cpumask *src2`` The second input. h](jd)}(h``const struct cpumask *src2``h]j)}(hjh]hconst struct cpumask *src2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM&hjubj~)}(hhh]h)}(hThe second input.h]hThe second input.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hM&hj ubah}(h]h ]h"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]uh1j]hj hM&hjpubeh}(h]h ]h"]h$]h&]uh1jXhjTubh)}(h**Description**h]jC)}(hj& h]h Description}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj$ ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM(hjTubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hj< hhhNhNubjC)}(h**src1**h]hsrc1}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj< ubh and }(hj< hhhNhNubjC)}(h**src2**h]hsrc2}(hjV hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj< ubh.}(hj< hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:276: ./kernel/bpf/cpumask.chM'hjTubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj$hhhNhNubh)}(hThe following is an example of how they may be used. Note that some of the kfuncs shown in this example will be covered in more detail below.h]hThe following is an example of how they may be used. Note that some of the kfuncs shown in this example will be covered in more detail below.}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$hhubj)}(hX/** * A sample tracepoint showing how a cpumask can be mutated using bitwise operators (and queried). */ SEC("tp_btf/task_newtask") int BPF_PROG(test_and_or_xor, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *mask1, *mask2, *dst1, *dst2; mask1 = bpf_cpumask_create(); if (!mask1) return -ENOMEM; mask2 = bpf_cpumask_create(); if (!mask2) { bpf_cpumask_release(mask1); return -ENOMEM; } // ...Safely create the other two masks... */ bpf_cpumask_set_cpu(0, mask1); bpf_cpumask_set_cpu(1, mask2); bpf_cpumask_and(dst1, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_empty((const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; bpf_cpumask_or(dst1, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_test_cpu(0, (const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; if (!bpf_cpumask_test_cpu(1, (const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; bpf_cpumask_xor(dst2, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_equal((const struct cpumask *)dst1, (const struct cpumask *)dst2)) /* Should never happen. */ goto release_exit; release_exit: bpf_cpumask_release(mask1); bpf_cpumask_release(mask2); bpf_cpumask_release(dst1); bpf_cpumask_release(dst2); return 0; }h]hX/** * A sample tracepoint showing how a cpumask can be mutated using bitwise operators (and queried). */ SEC("tp_btf/task_newtask") int BPF_PROG(test_and_or_xor, struct task_struct *task, u64 clone_flags) { struct bpf_cpumask *mask1, *mask2, *dst1, *dst2; mask1 = bpf_cpumask_create(); if (!mask1) return -ENOMEM; mask2 = bpf_cpumask_create(); if (!mask2) { bpf_cpumask_release(mask1); return -ENOMEM; } // ...Safely create the other two masks... */ bpf_cpumask_set_cpu(0, mask1); bpf_cpumask_set_cpu(1, mask2); bpf_cpumask_and(dst1, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_empty((const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; bpf_cpumask_or(dst1, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_test_cpu(0, (const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; if (!bpf_cpumask_test_cpu(1, (const struct cpumask *)dst1)) /* Should never happen. */ goto release_exit; bpf_cpumask_xor(dst2, (const struct cpumask *)mask1, (const struct cpumask *)mask2); if (!bpf_cpumask_equal((const struct cpumask *)dst1, (const struct cpumask *)dst2)) /* Should never happen. */ goto release_exit; release_exit: bpf_cpumask_release(mask1); bpf_cpumask_release(mask2); bpf_cpumask_release(dst1); bpf_cpumask_release(dst2); return 0; }}hj sbah}(h]h ]h"]h$]h&]hhjjjj}uh1jhhhMhj$hhubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhMOhj$hhubh)}(hTThe contents of an entire cpumask may be copied to another using bpf_cpumask_copy():h]hTThe contents of an entire cpumask may be copied to another using bpf_cpumask_copy():}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj$hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_copy (C function)c.bpf_cpumask_copyhNtauh1jhj$hhhNhNubj$)}(hhh](j))}(hV__bpf_kfunc void bpf_cpumask_copy (struct bpf_cpumask *dst, const struct cpumask *src)h]j/)}(hU__bpf_kfunc void bpf_cpumask_copy(struct bpf_cpumask *dst, const struct cpumask *src)h](h __bpf_kfunc}(hj hhhNhNubj9)}(h h]h }(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMubj)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hMubj9)}(h h]h }(hj hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj hhhj hMubj)}(hbpf_cpumask_copyh]jm)}(hbpf_cpumask_copyh]hbpf_cpumask_copy}(hj hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hMubj)}(h4(struct bpf_cpumask *dst, const struct cpumask *src)h](j)}(hstruct bpf_cpumask *dsth](jK)}(hjNh]hstruct}(hj!hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj!ubj9)}(h h]h }(hj !hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj!ubh)}(hhh]jm)}(h bpf_cpumaskh]h bpf_cpumask}(hj1!hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj.!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3!modnameN classnameNjj)}j]j)}jj sbc.bpf_cpumask_copyasbuh1hhj!ubj9)}(h h]h }(hjQ!hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj!ubj)}(hjh]h*}(hj_!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubjm)}(hdsth]hdst}(hjl!hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj !ubj)}(hconst struct cpumask *srch](jK)}(hjh]hconst}(hj!hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj!ubj9)}(h h]h }(hj!hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj!ubjK)}(hjNh]hstruct}(hj!hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj!ubj9)}(h h]h }(hj!hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj!ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj!hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj!ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj!modnameN classnameNjj)}j]jM!c.bpf_cpumask_copyasbuh1hhj!ubj9)}(h h]h }(hj!hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj!ubj)}(hjh]h*}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubjm)}(hsrch]hsrc}(hj!hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj !ubeh}(h]h ]h"]h$]h&]hhuh1jhj hhhj hMubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj hhhj hMubah}(h]j ah ](j j eh"]h$]h&]jj)jhuh1j(hj hMhj hhubj)}(hhh]h)}(h2Copy the contents of a cpumask into a BPF cpumask.h]h2Copy the contents of a cpumask into a BPF cpumask.}(hj!"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj"hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hMubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j9"j4j9"j5j6j7uh1j#hhhj$hNhNubj9)}(h**Parameters** ``struct bpf_cpumask *dst`` The BPF cpumask being copied into. ``const struct cpumask *src`` The cpumask being copied. **Description** A struct bpf_cpumask pointer may be safely passed to **src**.h](h)}(h**Parameters**h]jC)}(hjC"h]h Parameters}(hjE"hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjA"ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj="ubjY)}(hhh](j^)}(h?``struct bpf_cpumask *dst`` The BPF cpumask being copied into. h](jd)}(h``struct bpf_cpumask *dst``h]j)}(hjb"h]hstruct bpf_cpumask *dst}(hjd"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`"ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj\"ubj~)}(hhh]h)}(h"The BPF cpumask being copied into.h]h"The BPF cpumask being copied into.}(hj{"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw"hMhjx"ubah}(h]h ]h"]h$]h&]uh1j}hj\"ubeh}(h]h ]h"]h$]h&]uh1j]hjw"hMhjY"ubj^)}(h8``const struct cpumask *src`` The cpumask being copied. h](jd)}(h``const struct cpumask *src``h]j)}(hj"h]hconst struct cpumask *src}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj"ubj~)}(hhh]h)}(hThe cpumask being copied.h]hThe cpumask being copied.}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMhj"ubah}(h]h ]h"]h$]h&]uh1j}hj"ubeh}(h]h ]h"]h$]h&]uh1j]hj"hMhjY"ubeh}(h]h ]h"]h$]h&]uh1jXhj="ubh)}(h**Description**h]jC)}(hj"h]h Description}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj"ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj="ubh)}(h=A struct bpf_cpumask pointer may be safely passed to **src**.h](h5A struct bpf_cpumask pointer may be safely passed to }(hj"hhhNhNubjC)}(h**src**h]hsrc}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj"ubh.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:340: ./kernel/bpf/cpumask.chMhj="ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj$hhhNhNubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhMWhj$hhubh)}(h.. _cpumasks-querying-label:h]h}(h]h ]h"]h$]h&]hԌcpumasks-querying-labeluh1hhMYhj$hhhhubeh}(h]operations-between-cpumasksah ]h"]!3.1.2 operations between cpumasksah$]h&]uh1hhjS hhhhhMubh)}(hhh](h)}(h3.2 Querying cpumasksh]h3.2 Querying cpumasks}(hj4#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1#hhhhhM\ubh)}(h|In addition to the above kfuncs, there is also a set of read-only kfuncs that can be used to query the contents of cpumasks.h]h|In addition to the above kfuncs, there is also a set of read-only kfuncs that can be used to query the contents of cpumasks.}(hjB#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hj1#hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_first (C function)c.bpf_cpumask_firsthNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(hA__bpf_kfunc u32 bpf_cpumask_first (const struct cpumask *cpumask)h]j/)}(h@__bpf_kfunc u32 bpf_cpumask_first(const struct cpumask *cpumask)h](h __bpf_kfunc}(hje#hhhNhNubj9)}(h h]h }(hjm#hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hje#hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKpubh)}(hhh]jm)}(hu32h]hu32}(hj#hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj|#ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj#modnameN classnameNjj)}j]j)}jbpf_cpumask_firstsbc.bpf_cpumask_firstasbuh1hhje#hhhj{#hKpubj9)}(h h]h }(hj#hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hje#hhhj{#hKpubj)}(hbpf_cpumask_firsth]jm)}(hj#h]hbpf_cpumask_first}(hj#hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj#ubah}(h]h ](jjeh"]h$]h&]hhuh1jhje#hhhj{#hKpubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](jK)}(hjh]hconst}(hj#hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj#ubj9)}(h h]h }(hj#hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj#ubjK)}(hjNh]hstruct}(hj#hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj#ubj9)}(h h]h }(hj#hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj#ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj$hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj$ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj$modnameN classnameNjj)}j]j#c.bpf_cpumask_firstasbuh1hhj#ubj9)}(h h]h }(hj$$hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj#ubj)}(hjh]h*}(hj2$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubjm)}(hcpumaskh]hcpumask}(hj?$hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj#ubah}(h]h ]h"]h$]h&]hhuh1jhje#hhhj{#hKpubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhja#hhhj{#hKpubah}(h]j\#ah ](j j eh"]h$]h&]jj)jhuh1j(hj{#hKphj^#hhubj)}(hhh]h)}(h6Get the index of the first nonzero bit in the cpumask.h]h6Get the index of the first nonzero bit in the cpumask.}(hji$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKphjf$hhubah}(h]h ]h"]h$]h&]uh1jhj^#hhhj{#hKpubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j$j4j$j5j6j7uh1j#hhhj1#hNhNubj9)}(hX%**Parameters** ``const struct cpumask *cpumask`` The cpumask being queried. **Description** Find the index of the first nonzero bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function. **Return** * The index of the first nonzero bit in the struct cpumask.h](h)}(h**Parameters**h]jC)}(hj$h]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj$ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKthj$ubjY)}(hhh]j^)}(h=``const struct cpumask *cpumask`` The cpumask being queried. h](jd)}(h!``const struct cpumask *cpumask``h]j)}(hj$h]hconst struct cpumask *cpumask}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKqhj$ubj~)}(hhh]h)}(hThe cpumask being queried.h]hThe cpumask being queried.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hKqhj$ubah}(h]h ]h"]h$]h&]uh1j}hj$ubeh}(h]h ]h"]h$]h&]uh1j]hj$hKqhj$ubah}(h]h ]h"]h$]h&]uh1jXhj$ubh)}(h**Description**h]jC)}(hj$h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj$ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKshj$ubh)}(h{Find the index of the first nonzero bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function.h]h{Find the index of the first nonzero bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKrhj$ubh)}(h **Return**h]jC)}(hj %h]hReturn}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj %ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKuhj$ubj)}(hhh]j)}(h9The index of the first nonzero bit in the struct cpumask.h]h)}(hj'%h]h9The index of the first nonzero bit in the struct cpumask.}(hj)%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKvhj%%ubah}(h]h ]h"]h$]h&]uh1jhj"%ubah}(h]h ]h"]h$]h&]j-juh1jhj6%hKvhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#bpf_cpumask_first_zero (C function)c.bpf_cpumask_first_zerohNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(hF__bpf_kfunc u32 bpf_cpumask_first_zero (const struct cpumask *cpumask)h]j/)}(hE__bpf_kfunc u32 bpf_cpumask_first_zero(const struct cpumask *cpumask)h](h __bpf_kfunc}(hj_%hhhNhNubj9)}(h h]h }(hjg%hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj_%hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKubh)}(hhh]jm)}(hu32h]hu32}(hjy%hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjv%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj{%modnameN classnameNjj)}j]j)}jbpf_cpumask_first_zerosbc.bpf_cpumask_first_zeroasbuh1hhj_%hhhju%hKubj9)}(h h]h }(hj%hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj_%hhhju%hKubj)}(hbpf_cpumask_first_zeroh]jm)}(hj%h]hbpf_cpumask_first_zero}(hj%hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj%ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj_%hhhju%hKubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](jK)}(hjh]hconst}(hj%hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj%ubj9)}(h h]h }(hj%hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj%ubjK)}(hjNh]hstruct}(hj%hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj%ubj9)}(h h]h }(hj%hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj%ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj&hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj%ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj&modnameN classnameNjj)}j]j%c.bpf_cpumask_first_zeroasbuh1hhj%ubj9)}(h h]h }(hj&hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj%ubj)}(hjh]h*}(hj,&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubjm)}(hcpumaskh]hcpumask}(hj9&hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj%ubah}(h]h ]h"]h$]h&]hhuh1jhj_%hhhju%hKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj[%hhhju%hKubah}(h]jV%ah ](j j eh"]h$]h&]jj)jhuh1j(hju%hKhjX%hhubj)}(hhh]h)}(h4Get the index of the first unset bit in the cpumask.h]h4Get the index of the first unset bit in the cpumask.}(hjc&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj`&hhubah}(h]h ]h"]h$]h&]uh1jhjX%hhhju%hKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j{&j4j{&j5j6j7uh1j#hhhj1#hNhNubj9)}(hX **Parameters** ``const struct cpumask *cpumask`` The cpumask being queried. **Description** Find the index of the first unset bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function. **Return** * The index of the first zero bit in the struct cpumask.h](h)}(h**Parameters**h]jC)}(hj&h]h Parameters}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj&ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj&ubjY)}(hhh]j^)}(h=``const struct cpumask *cpumask`` The cpumask being queried. h](jd)}(h!``const struct cpumask *cpumask``h]j)}(hj&h]hconst struct cpumask *cpumask}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj&ubj~)}(hhh]h)}(hThe cpumask being queried.h]hThe cpumask being queried.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hKhj&ubah}(h]h ]h"]h$]h&]uh1j}hj&ubeh}(h]h ]h"]h$]h&]uh1j]hj&hKhj&ubah}(h]h ]h"]h$]h&]uh1jXhj&ubh)}(h**Description**h]jC)}(hj&h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj&ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj&ubh)}(hyFind the index of the first unset bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function.h]hyFind the index of the first unset bit of the cpumask. A struct bpf_cpumask pointer may be safely passed to this function.}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj&ubh)}(h **Return**h]jC)}(hj'h]hReturn}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj'ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj&ubj)}(hhh]j)}(h6The index of the first zero bit in the struct cpumask.h]h)}(hj!'h]h6The index of the first zero bit in the struct cpumask.}(hj#'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj'ubah}(h]h ]h"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]j-juh1jhj0'hKhj&ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j"bpf_cpumask_first_and (C function)c.bpf_cpumask_first_andhNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(h^__bpf_kfunc u32 bpf_cpumask_first_and (const struct cpumask *src1, const struct cpumask *src2)h]j/)}(h]__bpf_kfunc u32 bpf_cpumask_first_and(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hjY'hhhNhNubj9)}(h h]h }(hja'hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjY'hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKubh)}(hhh]jm)}(hu32h]hu32}(hjs'hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjp'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetju'modnameN classnameNjj)}j]j)}jbpf_cpumask_first_andsbc.bpf_cpumask_first_andasbuh1hhjY'hhhjo'hKubj9)}(h h]h }(hj'hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjY'hhhjo'hKubj)}(hbpf_cpumask_first_andh]jm)}(hj'h]hbpf_cpumask_first_and}(hj'hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj'ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjY'hhhjo'hKubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](jK)}(hjh]hconst}(hj'hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj'ubj9)}(h h]h }(hj'hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj'ubjK)}(hjNh]hstruct}(hj'hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj'ubj9)}(h h]h }(hj'hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj'ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj'hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj'ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj'modnameN classnameNjj)}j]j'c.bpf_cpumask_first_andasbuh1hhj'ubj9)}(h h]h }(hj(hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj'ubj)}(hjh]h*}(hj&(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'ubjm)}(hsrc1h]hsrc1}(hj3(hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubj)}(hconst struct cpumask *src2h](jK)}(hjh]hconst}(hjL(hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjH(ubj9)}(h h]h }(hjY(hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjH(ubjK)}(hjNh]hstruct}(hjg(hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjH(ubj9)}(h h]h }(hjt(hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjH(ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj(hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj(ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj(modnameN classnameNjj)}j]j'c.bpf_cpumask_first_andasbuh1hhjH(ubj9)}(h h]h }(hj(hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjH(ubj)}(hjh]h*}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjH(ubjm)}(hsrc2h]hsrc2}(hj(hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjH(ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj'ubeh}(h]h ]h"]h$]h&]hhuh1jhjY'hhhjo'hKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhjU'hhhjo'hKubah}(h]jP'ah ](j j eh"]h$]h&]jj)jhuh1j(hjo'hKhjR'hhubj)}(hhh]h)}(hGReturn the index of the first nonzero bit from the AND of two cpumasks.h]hGReturn the index of the first nonzero bit from the AND of two cpumasks.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj(hhubah}(h]h ]h"]h$]h&]uh1jhjR'hhhjo'hKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j)j4j)j5j6j7uh1j#hhhj1#hNhNubj9)}(hXo**Parameters** ``const struct cpumask *src1`` The first cpumask. ``const struct cpumask *src2`` The second cpumask. **Description** Find the index of the first nonzero bit of the AND of two cpumasks. struct bpf_cpumask pointers may be safely passed to **src1** and **src2**. **Return** * The index of the first bit that is nonzero in both cpumask instances.h](h)}(h**Parameters**h]jC)}(hj )h]h Parameters}(hj )hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj)ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj)ubjY)}(hhh](j^)}(h2``const struct cpumask *src1`` The first cpumask. h](jd)}(h``const struct cpumask *src1``h]j)}(hj))h]hconst struct cpumask *src1}(hj+)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj')ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj#)ubj~)}(hhh]h)}(hThe first cpumask.h]hThe first cpumask.}(hjB)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>)hKhj?)ubah}(h]h ]h"]h$]h&]uh1j}hj#)ubeh}(h]h ]h"]h$]h&]uh1j]hj>)hKhj )ubj^)}(h3``const struct cpumask *src2`` The second cpumask. h](jd)}(h``const struct cpumask *src2``h]j)}(hjb)h]hconst struct cpumask *src2}(hjd)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj`)ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj\)ubj~)}(hhh]h)}(hThe second cpumask.h]hThe second cpumask.}(hj{)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw)hKhjx)ubah}(h]h ]h"]h$]h&]uh1j}hj\)ubeh}(h]h ]h"]h$]h&]uh1j]hjw)hKhj )ubeh}(h]h ]h"]h$]h&]uh1jXhj)ubh)}(h**Description**h]jC)}(hj)h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj)ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj)ubh)}(hFind the index of the first nonzero bit of the AND of two cpumasks. struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](hxFind the index of the first nonzero bit of the AND of two cpumasks. struct bpf_cpumask pointers may be safely passed to }(hj)hhhNhNubjC)}(h**src1**h]hsrc1}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj)ubh and }(hj)hhhNhNubjC)}(h**src2**h]hsrc2}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj)ubh)}(h **Return**h]jC)}(hj)h]hReturn}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj)ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj)ubj)}(hhh]j)}(hEThe index of the first bit that is nonzero in both cpumask instances.h]h)}(hj*h]hEThe index of the first bit that is nonzero in both cpumask instances.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj*ubah}(h]h ]h"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&]j-juh1jhj*hKhj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j!bpf_cpumask_test_cpu (C function)c.bpf_cpumask_test_cpuhNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(hN__bpf_kfunc bool bpf_cpumask_test_cpu (u32 cpu, const struct cpumask *cpumask)h]j/)}(hM__bpf_kfunc bool bpf_cpumask_test_cpu(u32 cpu, const struct cpumask *cpumask)h](h __bpf_kfunc}(hj;*hhhNhNubj9)}(h h]h }(hjC*hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj;*hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKubj)}(hj_h]hbool}(hjR*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;*hhhjQ*hKubj9)}(h h]h }(hj_*hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj;*hhhjQ*hKubj)}(hbpf_cpumask_test_cpuh]jm)}(hbpf_cpumask_test_cpuh]hbpf_cpumask_test_cpu}(hjq*hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjm*ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj;*hhhjQ*hKubj)}(h((u32 cpu, const struct cpumask *cpumask)h](j)}(hu32 cpuh](h)}(hhh]jm)}(hu32h]hu32}(hj*hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj*ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj*modnameN classnameNjj)}j]j)}jjs*sbc.bpf_cpumask_test_cpuasbuh1hhj*ubj9)}(h h]h }(hj*hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj*ubjm)}(hcpuh]hcpu}(hj*hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj*ubj)}(hconst struct cpumask *cpumaskh](jK)}(hjh]hconst}(hj*hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj*ubj9)}(h h]h }(hj*hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj*ubjK)}(hjNh]hstruct}(hj*hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj*ubj9)}(h h]h }(hj*hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj*ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj+hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj +ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj+modnameN classnameNjj)}j]j*c.bpf_cpumask_test_cpuasbuh1hhj*ubj9)}(h h]h }(hj.+hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj*ubj)}(hjh]h*}(hj<+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubjm)}(hcpumaskh]hcpumask}(hjI+hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj*ubeh}(h]h ]h"]h$]h&]hhuh1jhj;*hhhjQ*hKubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj7*hhhjQ*hKubah}(h]j2*ah ](j j eh"]h$]h&]jj)jhuh1j(hjQ*hKhj4*hhubj)}(hhh]h)}(h'Test whether a CPU is set in a cpumask.h]h'Test whether a CPU is set in a cpumask.}(hjs+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjp+hhubah}(h]h ]h"]h$]h&]uh1jhj4*hhhjQ*hKubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j+j4j+j5j6j7uh1j#hhhj1#hNhNubj9)}(hX**Parameters** ``u32 cpu`` The CPU being queried for. ``const struct cpumask *cpumask`` The cpumask being queried for containing a CPU. **Return** * true - **cpu** is set in the cpumask * false - **cpu** was not set in the cpumask, or **cpu** is an invalid cpu.h](h)}(h**Parameters**h]jC)}(hj+h]h Parameters}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj+ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj+ubjY)}(hhh](j^)}(h'``u32 cpu`` The CPU being queried for. h](jd)}(h ``u32 cpu``h]j)}(hj+h]hu32 cpu}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj+ubj~)}(hhh]h)}(hThe CPU being queried for.h]hThe CPU being queried for.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hKhj+ubah}(h]h ]h"]h$]h&]uh1j}hj+ubeh}(h]h ]h"]h$]h&]uh1j]hj+hKhj+ubj^)}(hR``const struct cpumask *cpumask`` The cpumask being queried for containing a CPU. h](jd)}(h!``const struct cpumask *cpumask``h]j)}(hj+h]hconst struct cpumask *cpumask}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj+ubj~)}(hhh]h)}(h/The cpumask being queried for containing a CPU.h]h/The cpumask being queried for containing a CPU.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hKhj,ubah}(h]h ]h"]h$]h&]uh1j}hj+ubeh}(h]h ]h"]h$]h&]uh1j]hj,hKhj+ubeh}(h]h ]h"]h$]h&]uh1jXhj+ubh)}(h **Return**h]jC)}(hj(,h]hReturn}(hj*,hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj&,ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhj+ubj)}(hhh](j)}(h%true - **cpu** is set in the cpumaskh]h)}(hjC,h](htrue - }(hjE,hhhNhNubjC)}(h**cpu**h]hcpu}(hjL,hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjE,ubh is set in the cpumask}(hjE,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjA,ubah}(h]h ]h"]h$]h&]uh1jhj>,ubj)}(hIfalse - **cpu** was not set in the cpumask, or **cpu** is an invalid cpu.h]h)}(hjm,h](hfalse - }(hjo,hhhNhNubjC)}(h**cpu**h]hcpu}(hjv,hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjo,ubh was not set in the cpumask, or }(hjo,hhhNhNubjC)}(h**cpu**h]hcpu}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjo,ubh is an invalid cpu.}(hjo,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chKhjk,ubah}(h]h ]h"]h$]h&]uh1jhj>,ubeh}(h]h ]h"]h$]h&]j-juh1jhjd,hKhj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_weight (C function)c.bpf_cpumask_weighthNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(hB__bpf_kfunc u32 bpf_cpumask_weight (const struct cpumask *cpumask)h]j/)}(hA__bpf_kfunc u32 bpf_cpumask_weight(const struct cpumask *cpumask)h](h __bpf_kfunc}(hj,hhhNhNubj9)}(h h]h }(hj,hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj,hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMubh)}(hhh]jm)}(hu32h]hu32}(hj,hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj,ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj,modnameN classnameNjj)}j]j)}jbpf_cpumask_weightsbc.bpf_cpumask_weightasbuh1hhj,hhhj,hMubj9)}(h h]h }(hj-hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj,hhhj,hMubj)}(hbpf_cpumask_weighth]jm)}(hj-h]hbpf_cpumask_weight}(hj-hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj-ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj,hhhj,hMubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](jK)}(hjh]hconst}(hj1-hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj--ubj9)}(h h]h }(hj>-hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj--ubjK)}(hjNh]hstruct}(hjL-hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj--ubj9)}(h h]h }(hjY-hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj--ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hjj-hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjg-ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjl-modnameN classnameNjj)}j]j,c.bpf_cpumask_weightasbuh1hhj--ubj9)}(h h]h }(hj-hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj--ubj)}(hjh]h*}(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj--ubjm)}(hcpumaskh]hcpumask}(hj-hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj--ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj)-ubah}(h]h ]h"]h$]h&]hhuh1jhj,hhhj,hMubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj,hhhj,hMubah}(h]j,ah ](j j eh"]h$]h&]jj)jhuh1j(hj,hMhj,hhubj)}(hhh]h)}(h)Return the number of bits in **cpumask**.h](hReturn the number of bits in }(hj-hhhNhNubjC)}(h **cpumask**h]hcpumask}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj-ubh.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-hhubah}(h]h ]h"]h$]h&]uh1jhj,hhhj,hMubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j-j4j-j5j6j7uh1j#hhhj1#hNhNubj9)}(h**Parameters** ``const struct cpumask *cpumask`` The cpumask being queried. **Description** Count the number of set bits in the given cpumask. **Return** * The number of bits set in the mask.h](h)}(h**Parameters**h]jC)}(hj.h]h Parameters}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj-ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-ubjY)}(hhh]j^)}(h=``const struct cpumask *cpumask`` The cpumask being queried. h](jd)}(h!``const struct cpumask *cpumask``h]j)}(hj .h]hconst struct cpumask *cpumask}(hj".hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj.ubj~)}(hhh]h)}(hThe cpumask being queried.h]hThe cpumask being queried.}(hj9.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5.hMhj6.ubah}(h]h ]h"]h$]h&]uh1j}hj.ubeh}(h]h ]h"]h$]h&]uh1j]hj5.hMhj.ubah}(h]h ]h"]h$]h&]uh1jXhj-ubh)}(h**Description**h]jC)}(hj[.h]h Description}(hj].hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjY.ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-ubh)}(h2Count the number of set bits in the given cpumask.h]h2Count the number of set bits in the given cpumask.}(hjq.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-ubh)}(h **Return**h]jC)}(hj.h]hReturn}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj.ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj-ubj)}(hhh]j)}(h#The number of bits set in the mask.h]h)}(hj.h]h#The number of bits set in the mask.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:353: ./kernel/bpf/cpumask.chMhj.ubah}(h]h ]h"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]j-juh1jhj.hMhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_equal (C function)c.bpf_cpumask_equalhNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(h[__bpf_kfunc bool bpf_cpumask_equal (const struct cpumask *src1, const struct cpumask *src2)h]j/)}(hZ__bpf_kfunc bool bpf_cpumask_equal(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj.hhhNhNubj9)}(h h]h }(hj.hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj.hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM2ubj)}(hj_h]hbool}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj.hM2ubj9)}(h h]h }(hj.hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj.hhhj.hM2ubj)}(hbpf_cpumask_equalh]jm)}(hbpf_cpumask_equalh]hbpf_cpumask_equal}(hj /hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj/ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj.hhhj.hM2ubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](jK)}(hjh]hconst}(hj'/hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj#/ubj9)}(h h]h }(hj4/hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj#/ubjK)}(hjNh]hstruct}(hjB/hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj#/ubj9)}(h h]h }(hjO/hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj#/ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj`/hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj]/ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjb/modnameN classnameNjj)}j]j)}jj /sbc.bpf_cpumask_equalasbuh1hhj#/ubj9)}(h h]h }(hj/hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj#/ubj)}(hjh]h*}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#/ubjm)}(hsrc1h]hsrc1}(hj/hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj#/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj/ubj)}(hconst struct cpumask *src2h](jK)}(hjh]hconst}(hj/hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj/ubj9)}(h h]h }(hj/hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj/ubjK)}(hjNh]hstruct}(hj/hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj/ubj9)}(h h]h }(hj/hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj/ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj/hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj/ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj/modnameN classnameNjj)}j]j|/c.bpf_cpumask_equalasbuh1hhj/ubj9)}(h h]h }(hj 0hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj/ubj)}(hjh]h*}(hj0hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj/ubjm)}(hsrc2h]hsrc2}(hj&0hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj/ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj/ubeh}(h]h ]h"]h$]h&]hhuh1jhj.hhhj.hM2ubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj.hhhj.hM2ubah}(h]j.ah ](j j eh"]h$]h&]jj)jhuh1j(hj.hM2hj.hhubj)}(hhh]h)}(h Check two cpumasks for equality.h]h Check two cpumasks for equality.}(hjP0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM2hjM0hhubah}(h]h ]h"]h$]h&]uh1jhj.hhhj.hM2ubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jh0j4jh0j5j6j7uh1j#hhhj1#hNhNubj9)}(hXU**Parameters** ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Return** * true - **src1** and **src2** have the same bits set. * false - **src1** and **src2** differ in at least one bit. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]jC)}(hjr0h]h Parameters}(hjt0hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjp0ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM6hjl0ubjY)}(hhh](j^)}(h0``const struct cpumask *src1`` The first input. h](jd)}(h``const struct cpumask *src1``h]j)}(hj0h]hconst struct cpumask *src1}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM3hj0ubj~)}(hhh]h)}(hThe first input.h]hThe first input.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hM3hj0ubah}(h]h ]h"]h$]h&]uh1j}hj0ubeh}(h]h ]h"]h$]h&]uh1j]hj0hM3hj0ubj^)}(h1``const struct cpumask *src2`` The second input. h](jd)}(h``const struct cpumask *src2``h]j)}(hj0h]hconst struct cpumask *src2}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM4hj0ubj~)}(hhh]h)}(hThe second input.h]hThe second input.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hM4hj0ubah}(h]h ]h"]h$]h&]uh1j}hj0ubeh}(h]h ]h"]h$]h&]uh1j]hj0hM4hj0ubeh}(h]h ]h"]h$]h&]uh1jXhjl0ubh)}(h **Return**h]jC)}(hj1h]hReturn}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj1ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM6hjl0ubj)}(hhh](j)}(h6true - **src1** and **src2** have the same bits set.h]h)}(hj 1h](h true - }(hj"1hhhNhNubjC)}(h**src1**h]hsrc1}(hj)1hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj"1ubh and }(hj"1hhhNhNubjC)}(h**src2**h]hsrc2}(hj;1hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj"1ubh have the same bits set.}(hj"1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM6hj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubj)}(h;false - **src1** and **src2** differ in at least one bit. h]h)}(h:false - **src1** and **src2** differ in at least one bit.h](h false - }(hj^1hhhNhNubjC)}(h**src1**h]hsrc1}(hjf1hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj^1ubh and }(hj^1hhhNhNubjC)}(h**src2**h]hsrc2}(hjx1hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj^1ubh differ in at least one bit.}(hj^1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM7hjZ1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]j-juh1jhjS1hM6hjl0ubh)}(h**Description**h]jC)}(hj1h]h Description}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj1ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM9hjl0ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hj1hhhNhNubjC)}(h**src1**h]hsrc1}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj1ubh and }(hj1hhhNhNubjC)}(h**src2**h]hsrc2}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj1ubh.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chM9hjl0ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j#bpf_cpumask_intersects (C function)c.bpf_cpumask_intersectshNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(h`__bpf_kfunc bool bpf_cpumask_intersects (const struct cpumask *src1, const struct cpumask *src2)h]j/)}(h___bpf_kfunc bool bpf_cpumask_intersects(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj2hhhNhNubj9)}(h h]h }(hj 2hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj2hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMBubj)}(hj_h]hbool}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2hhhj2hMBubj9)}(h h]h }(hj(2hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj2hhhj2hMBubj)}(hbpf_cpumask_intersectsh]jm)}(hbpf_cpumask_intersectsh]hbpf_cpumask_intersects}(hj:2hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj62ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj2hhhj2hMBubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](jK)}(hjh]hconst}(hjV2hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjR2ubj9)}(h h]h }(hjc2hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjR2ubjK)}(hjNh]hstruct}(hjq2hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjR2ubj9)}(h h]h }(hj~2hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjR2ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj2hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj2ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj2modnameN classnameNjj)}j]j)}jj<2sbc.bpf_cpumask_intersectsasbuh1hhjR2ubj9)}(h h]h }(hj2hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjR2ubj)}(hjh]h*}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR2ubjm)}(hsrc1h]hsrc1}(hj2hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjR2ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjN2ubj)}(hconst struct cpumask *src2h](jK)}(hjh]hconst}(hj2hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj2ubj9)}(h h]h }(hj2hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj2ubjK)}(hjNh]hstruct}(hj2hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj2ubj9)}(h h]h }(hj 3hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj2ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj3hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj3ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj3modnameN classnameNjj)}j]j2c.bpf_cpumask_intersectsasbuh1hhj2ubj9)}(h h]h }(hj:3hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj2ubj)}(hjh]h*}(hjH3hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubjm)}(hsrc2h]hsrc2}(hjU3hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj2ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjN2ubeh}(h]h ]h"]h$]h&]hhuh1jhj2hhhj2hMBubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj2hhhj2hMBubah}(h]j1ah ](j j eh"]h$]h&]jj)jhuh1j(hj2hMBhj1hhubj)}(hhh]h)}(hCheck two cpumasks for overlap.h]hCheck two cpumasks for overlap.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMBhj|3hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhj2hMBubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j3j4j3j5j6j7uh1j#hhhj1#hNhNubj9)}(hXn**Parameters** ``const struct cpumask *src1`` The first input. ``const struct cpumask *src2`` The second input. **Return** * true - **src1** and **src2** have at least one of the same bits set. * false - **src1** and **src2** don't have any of the same bits set. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]jC)}(hj3h]h Parameters}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj3ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMFhj3ubjY)}(hhh](j^)}(h0``const struct cpumask *src1`` The first input. h](jd)}(h``const struct cpumask *src1``h]j)}(hj3h]hconst struct cpumask *src1}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMChj3ubj~)}(hhh]h)}(hThe first input.h]hThe first input.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hMChj3ubah}(h]h ]h"]h$]h&]uh1j}hj3ubeh}(h]h ]h"]h$]h&]uh1j]hj3hMChj3ubj^)}(h1``const struct cpumask *src2`` The second input. h](jd)}(h``const struct cpumask *src2``h]j)}(hj3h]hconst struct cpumask *src2}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMDhj3ubj~)}(hhh]h)}(hThe second input.h]hThe second input.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hMDhj4ubah}(h]h ]h"]h$]h&]uh1j}hj3ubeh}(h]h ]h"]h$]h&]uh1j]hj4hMDhj3ubeh}(h]h ]h"]h$]h&]uh1jXhj3ubh)}(h **Return**h]jC)}(hj44h]hReturn}(hj64hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj24ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMFhj3ubj)}(hhh](j)}(hFtrue - **src1** and **src2** have at least one of the same bits set.h]h)}(hjO4h](h true - }(hjQ4hhhNhNubjC)}(h**src1**h]hsrc1}(hjX4hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjQ4ubh and }(hjQ4hhhNhNubjC)}(h**src2**h]hsrc2}(hjj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjQ4ubh( have at least one of the same bits set.}(hjQ4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMFhjM4ubah}(h]h ]h"]h$]h&]uh1jhjJ4ubj)}(hDfalse - **src1** and **src2** don't have any of the same bits set. h]h)}(hCfalse - **src1** and **src2** don't have any of the same bits set.h](h false - }(hj4hhhNhNubjC)}(h**src1**h]hsrc1}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj4ubh and }(hj4hhhNhNubjC)}(h**src2**h]hsrc2}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj4ubh' don’t have any of the same bits set.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMGhj4ubah}(h]h ]h"]h$]h&]uh1jhjJ4ubeh}(h]h ]h"]h$]h&]j-juh1jhj4hMFhj3ubh)}(h**Description**h]jC)}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj4ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMIhj3ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hj4hhhNhNubjC)}(h**src1**h]hsrc1}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj4ubh and }(hj4hhhNhNubjC)}(h**src2**h]hsrc2}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj4ubh.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMIhj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_subset (C function)c.bpf_cpumask_subsethNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(h\__bpf_kfunc bool bpf_cpumask_subset (const struct cpumask *src1, const struct cpumask *src2)h]j/)}(h[__bpf_kfunc bool bpf_cpumask_subset(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj35hhhNhNubj9)}(h h]h }(hj;5hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj35hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMRubj)}(hj_h]hbool}(hjJ5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj35hhhjI5hMRubj9)}(h h]h }(hjW5hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj35hhhjI5hMRubj)}(hbpf_cpumask_subseth]jm)}(hbpf_cpumask_subseth]hbpf_cpumask_subset}(hji5hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhje5ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj35hhhjI5hMRubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](jK)}(hjh]hconst}(hj5hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj5ubj9)}(h h]h }(hj5hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj5ubjK)}(hjNh]hstruct}(hj5hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj5ubj9)}(h h]h }(hj5hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj5ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj5hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj5ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj5modnameN classnameNjj)}j]j)}jjk5sbc.bpf_cpumask_subsetasbuh1hhj5ubj9)}(h h]h }(hj5hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj5ubj)}(hjh]h*}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj5ubjm)}(hsrc1h]hsrc1}(hj5hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj5ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj}5ubj)}(hconst struct cpumask *src2h](jK)}(hjh]hconst}(hj6hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj6ubj9)}(h h]h }(hj6hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj6ubjK)}(hjNh]hstruct}(hj-6hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj6ubj9)}(h h]h }(hj:6hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj6ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hjK6hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjH6ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjM6modnameN classnameNjj)}j]j5c.bpf_cpumask_subsetasbuh1hhj6ubj9)}(h h]h }(hji6hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj6ubj)}(hjh]h*}(hjw6hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6ubjm)}(hsrc2h]hsrc2}(hj6hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj6ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj}5ubeh}(h]h ]h"]h$]h&]hhuh1jhj35hhhjI5hMRubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj/5hhhjI5hMRubah}(h]j*5ah ](j j eh"]h$]h&]jj)jhuh1j(hjI5hMRhj,5hhubj)}(hhh]h)}(h*Check if a cpumask is a subset of another.h]h*Check if a cpumask is a subset of another.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMRhj6hhubah}(h]h ]h"]h$]h&]uh1jhj,5hhhjI5hMRubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j6j4j6j5j6j7uh1j#hhhj1#hNhNubj9)}(hX**Parameters** ``const struct cpumask *src1`` The first cpumask being checked as a subset. ``const struct cpumask *src2`` The second cpumask being checked as a superset. **Return** * true - All of the bits of **src1** are set in **src2**. * false - At least one bit in **src1** is not set in **src2**. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]jC)}(hj6h]h Parameters}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj6ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMVhj6ubjY)}(hhh](j^)}(hL``const struct cpumask *src1`` The first cpumask being checked as a subset. h](jd)}(h``const struct cpumask *src1``h]j)}(hj6h]hconst struct cpumask *src1}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMShj6ubj~)}(hhh]h)}(h,The first cpumask being checked as a subset.h]h,The first cpumask being checked as a subset.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMShj7ubah}(h]h ]h"]h$]h&]uh1j}hj6ubeh}(h]h ]h"]h$]h&]uh1j]hj7hMShj6ubj^)}(hO``const struct cpumask *src2`` The second cpumask being checked as a superset. h](jd)}(h``const struct cpumask *src2``h]j)}(hj(7h]hconst struct cpumask *src2}(hj*7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&7ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMThj"7ubj~)}(hhh]h)}(h/The second cpumask being checked as a superset.h]h/The second cpumask being checked as a superset.}(hjA7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=7hMThj>7ubah}(h]h ]h"]h$]h&]uh1j}hj"7ubeh}(h]h ]h"]h$]h&]uh1j]hj=7hMThj6ubeh}(h]h ]h"]h$]h&]uh1jXhj6ubh)}(h **Return**h]jC)}(hjc7h]hReturn}(hje7hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhja7ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMVhj6ubj)}(hhh](j)}(h9true - All of the bits of **src1** are set in **src2**.h]h)}(hj~7h](htrue - All of the bits of }(hj7hhhNhNubjC)}(h**src1**h]hsrc1}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj7ubh are set in }(hj7hhhNhNubjC)}(h**src2**h]hsrc2}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj7ubh.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMVhj|7ubah}(h]h ]h"]h$]h&]uh1jhjy7ubj)}(h>false - At least one bit in **src1** is not set in **src2**. h]h)}(h=false - At least one bit in **src1** is not set in **src2**.h](hfalse - At least one bit in }(hj7hhhNhNubjC)}(h**src1**h]hsrc1}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj7ubh is not set in }(hj7hhhNhNubjC)}(h**src2**h]hsrc2}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj7ubh.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMWhj7ubah}(h]h ]h"]h$]h&]uh1jhjy7ubeh}(h]h ]h"]h$]h&]j-juh1jhj7hMVhj6ubh)}(h**Description**h]jC)}(hj7h]h Description}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj7ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMYhj6ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hj8hhhNhNubjC)}(h**src1**h]hsrc1}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj8ubh and }(hj8hhhNhNubjC)}(h**src2**h]hsrc2}(hj-8hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj8ubh.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMYhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_empty (C function)c.bpf_cpumask_emptyhNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(hB__bpf_kfunc bool bpf_cpumask_empty (const struct cpumask *cpumask)h]j/)}(hA__bpf_kfunc bool bpf_cpumask_empty(const struct cpumask *cpumask)h](h __bpf_kfunc}(hjb8hhhNhNubj9)}(h h]h }(hjj8hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjb8hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMbubj)}(hj_h]hbool}(hjy8hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjb8hhhjx8hMbubj9)}(h h]h }(hj8hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjb8hhhjx8hMbubj)}(hbpf_cpumask_emptyh]jm)}(hbpf_cpumask_emptyh]hbpf_cpumask_empty}(hj8hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj8ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjb8hhhjx8hMbubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](jK)}(hjh]hconst}(hj8hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj8ubj9)}(h h]h }(hj8hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj8ubjK)}(hjNh]hstruct}(hj8hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj8ubj9)}(h h]h }(hj8hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj8ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj8hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj8ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj8modnameN classnameNjj)}j]j)}jj8sbc.bpf_cpumask_emptyasbuh1hhj8ubj9)}(h h]h }(hj 9hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj8ubj)}(hjh]h*}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubjm)}(hcpumaskh]hcpumask}(hj(9hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj8ubah}(h]h ]h"]h$]h&]hhuh1jhjb8hhhjx8hMbubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj^8hhhjx8hMbubah}(h]jY8ah ](j j eh"]h$]h&]jj)jhuh1j(hjx8hMbhj[8hhubj)}(hhh]h)}(hCheck if a cpumask is empty.h]hCheck if a cpumask is empty.}(hjR9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMbhjO9hhubah}(h]h ]h"]h$]h&]uh1jhj[8hhhjx8hMbubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3jj9j4jj9j5j6j7uh1j#hhhj1#hNhNubj9)}(hX**Parameters** ``const struct cpumask *cpumask`` The cpumask being checked. **Return** * true - None of the bits in **cpumask** are set. * false - At least one bit in **cpumask** is set. **Description** A struct bpf_cpumask pointer may be safely passed to **cpumask**.h](h)}(h**Parameters**h]jC)}(hjt9h]h Parameters}(hjv9hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjr9ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMfhjn9ubjY)}(hhh]j^)}(h=``const struct cpumask *cpumask`` The cpumask being checked. h](jd)}(h!``const struct cpumask *cpumask``h]j)}(hj9h]hconst struct cpumask *cpumask}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMchj9ubj~)}(hhh]h)}(hThe cpumask being checked.h]hThe cpumask being checked.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMchj9ubah}(h]h ]h"]h$]h&]uh1j}hj9ubeh}(h]h ]h"]h$]h&]uh1j]hj9hMchj9ubah}(h]h ]h"]h$]h&]uh1jXhjn9ubh)}(h **Return**h]jC)}(hj9h]hReturn}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj9ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMehjn9ubj)}(hhh](j)}(h1true - None of the bits in **cpumask** are set.h]h)}(hj9h](htrue - None of the bits in }(hj9hhhNhNubjC)}(h **cpumask**h]hcpumask}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj9ubh are set.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMehj9ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(h1false - At least one bit in **cpumask** is set. h]h)}(h0false - At least one bit in **cpumask** is set.h](hfalse - At least one bit in }(hj:hhhNhNubjC)}(h **cpumask**h]hcpumask}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj:ubh is set.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMfhj:ubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]j-juh1jhj :hMehjn9ubh)}(h**Description**h]jC)}(hjD:h]h Description}(hjF:hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjB:ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMhhjn9ubh)}(hAA struct bpf_cpumask pointer may be safely passed to **cpumask**.h](h5A struct bpf_cpumask pointer may be safely passed to }(hjZ:hhhNhNubjC)}(h **cpumask**h]hcpumask}(hjb:hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjZ:ubh.}(hjZ:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMhhjn9ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jbpf_cpumask_full (C function)c.bpf_cpumask_fullhNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(hA__bpf_kfunc bool bpf_cpumask_full (const struct cpumask *cpumask)h]j/)}(h@__bpf_kfunc bool bpf_cpumask_full(const struct cpumask *cpumask)h](h __bpf_kfunc}(hj:hhhNhNubj9)}(h h]h }(hj:hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj:hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMqubj)}(hj_h]hbool}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:hhhj:hMqubj9)}(h h]h }(hj:hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj:hhhj:hMqubj)}(hbpf_cpumask_fullh]jm)}(hbpf_cpumask_fullh]hbpf_cpumask_full}(hj:hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj:ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj:hhhj:hMqubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](jK)}(hjh]hconst}(hj:hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj:ubj9)}(h h]h }(hj:hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj:ubjK)}(hjNh]hstruct}(hj;hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj:ubj9)}(h h]h }(hj;hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj:ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj";hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj;ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj$;modnameN classnameNjj)}j]j)}jj:sbc.bpf_cpumask_fullasbuh1hhj:ubj9)}(h h]h }(hjB;hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj:ubj)}(hjh]h*}(hjP;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:ubjm)}(hcpumaskh]hcpumask}(hj];hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj:ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj:ubah}(h]h ]h"]h$]h&]hhuh1jhj:hhhj:hMqubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj:hhhj:hMqubah}(h]j:ah ](j j eh"]h$]h&]jj)jhuh1j(hj:hMqhj:hhubj)}(hhh]h)}(h$Check if a cpumask has all bits set.h]h$Check if a cpumask has all bits set.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMqhj;hhubah}(h]h ]h"]h$]h&]uh1jhj:hhhj:hMqubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j;j4j;j5j6j7uh1j#hhhj1#hNhNubj9)}(hX**Parameters** ``const struct cpumask *cpumask`` The cpumask being checked. **Return** * true - All of the bits in **cpumask** are set. * false - At least one bit in **cpumask** is cleared. **Description** A struct bpf_cpumask pointer may be safely passed to **cpumask**.h](h)}(h**Parameters**h]jC)}(hj;h]h Parameters}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj;ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMuhj;ubjY)}(hhh]j^)}(h=``const struct cpumask *cpumask`` The cpumask being checked. h](jd)}(h!``const struct cpumask *cpumask``h]j)}(hj;h]hconst struct cpumask *cpumask}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMrhj;ubj~)}(hhh]h)}(hThe cpumask being checked.h]hThe cpumask being checked.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMrhj;ubah}(h]h ]h"]h$]h&]uh1j}hj;ubeh}(h]h ]h"]h$]h&]uh1j]hj;hMrhj;ubah}(h]h ]h"]h$]h&]uh1jXhj;ubh)}(h **Return**h]jC)}(hj<h]hReturn}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj<ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMthj;ubj)}(hhh](j)}(h0true - All of the bits in **cpumask** are set.h]h)}(hj<h](htrue - All of the bits in }(hj <hhhNhNubjC)}(h **cpumask**h]hcpumask}(hj'<hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj <ubh are set.}(hj <hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMthj<ubah}(h]h ]h"]h$]h&]uh1jhj<ubj)}(h5false - At least one bit in **cpumask** is cleared. h]h)}(h4false - At least one bit in **cpumask** is cleared.h](hfalse - At least one bit in }(hjJ<hhhNhNubjC)}(h **cpumask**h]hcpumask}(hjR<hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjJ<ubh is cleared.}(hjJ<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMuhjF<ubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]j-juh1jhj?<hMthj;ubh)}(h**Description**h]jC)}(hjy<h]h Description}(hj{<hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjw<ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMwhj;ubh)}(hAA struct bpf_cpumask pointer may be safely passed to **cpumask**.h](h5A struct bpf_cpumask pointer may be safely passed to }(hj<hhhNhNubjC)}(h **cpumask**h]hcpumask}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj<ubh.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:357: ./kernel/bpf/cpumask.chMwhj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j'bpf_cpumask_any_distribute (C function)c.bpf_cpumask_any_distributehNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(hJ__bpf_kfunc u32 bpf_cpumask_any_distribute (const struct cpumask *cpumask)h]j/)}(hI__bpf_kfunc u32 bpf_cpumask_any_distribute(const struct cpumask *cpumask)h](h __bpf_kfunc}(hj<hhhNhNubj9)}(h h]h }(hj<hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj<hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMubh)}(hhh]jm)}(hu32h]hu32}(hj<hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj<ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj<modnameN classnameNjj)}j]j)}jbpf_cpumask_any_distributesbc.bpf_cpumask_any_distributeasbuh1hhj<hhhj<hMubj9)}(h h]h }(hj=hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj<hhhj<hMubj)}(hbpf_cpumask_any_distributeh]jm)}(hj=h]hbpf_cpumask_any_distribute}(hj=hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj=ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj<hhhj<hMubj)}(h(const struct cpumask *cpumask)h]j)}(hconst struct cpumask *cpumaskh](jK)}(hjh]hconst}(hj4=hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj0=ubj9)}(h h]h }(hjA=hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj0=ubjK)}(hjNh]hstruct}(hjO=hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj0=ubj9)}(h h]h }(hj\=hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj0=ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hjm=hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjj=ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjo=modnameN classnameNjj)}j]j=c.bpf_cpumask_any_distributeasbuh1hhj0=ubj9)}(h h]h }(hj=hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj0=ubj)}(hjh]h*}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj0=ubjm)}(hcpumaskh]hcpumask}(hj=hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj0=ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhj,=ubah}(h]h ]h"]h$]h&]hhuh1jhj<hhhj<hMubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj<hhhj<hMubah}(h]j<ah ](j j eh"]h$]h&]jj)jhuh1j(hj<hMhj<hhubj)}(hhh]h)}(h'Return a random set CPU from a cpumask.h]h'Return a random set CPU from a cpumask.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=hhubah}(h]h ]h"]h$]h&]uh1jhj<hhhj<hMubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j=j4j=j5j6j7uh1j#hhhj1#hNhNubj9)}(hX**Parameters** ``const struct cpumask *cpumask`` The cpumask being queried. **Return** * A random set bit within [0, num_cpus) if at least one bit is set. * >= num_cpus if no bit is set. **Description** A struct bpf_cpumask pointer may be safely passed to **src**.h](h)}(h**Parameters**h]jC)}(hj=h]h Parameters}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj=ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubjY)}(hhh]j^)}(h=``const struct cpumask *cpumask`` The cpumask being queried. h](jd)}(h!``const struct cpumask *cpumask``h]j)}(hj>h]hconst struct cpumask *cpumask}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj >ubj~)}(hhh]h)}(hThe cpumask being queried.h]hThe cpumask being queried.}(hj*>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&>hMhj'>ubah}(h]h ]h"]h$]h&]uh1j}hj >ubeh}(h]h ]h"]h$]h&]uh1j]hj&>hMhj>ubah}(h]h ]h"]h$]h&]uh1jXhj=ubh)}(h **Return**h]jC)}(hjL>h]hReturn}(hjN>hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjJ>ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubj)}(hhh](j)}(hAA random set bit within [0, num_cpus) if at least one bit is set.h]h)}(hjg>h]hAA random set bit within [0, num_cpus) if at least one bit is set.}(hji>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhje>ubah}(h]h ]h"]h$]h&]uh1jhjb>ubj)}(h>= num_cpus if no bit is set. h]h)}(h>= num_cpus if no bit is set.h]h>= num_cpus if no bit is set.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj}>ubah}(h]h ]h"]h$]h&]uh1jhjb>ubeh}(h]h ]h"]h$]h&]j-juh1jhjv>hMhj=ubh)}(h**Description**h]jC)}(hj>h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj>ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubh)}(h=A struct bpf_cpumask pointer may be safely passed to **src**.h](h5A struct bpf_cpumask pointer may be safely passed to }(hj>hhhNhNubjC)}(h**src**h]hsrc}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj>ubh.}(hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj=ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j+bpf_cpumask_any_and_distribute (C function) c.bpf_cpumask_any_and_distributehNtauh1jhj1#hhhNhNubj$)}(hhh](j))}(hg__bpf_kfunc u32 bpf_cpumask_any_and_distribute (const struct cpumask *src1, const struct cpumask *src2)h]j/)}(hf__bpf_kfunc u32 bpf_cpumask_any_and_distribute(const struct cpumask *src1, const struct cpumask *src2)h](h __bpf_kfunc}(hj>hhhNhNubj9)}(h h]h }(hj>hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj>hhhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMubh)}(hhh]jm)}(hu32h]hu32}(hj ?hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj?ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj ?modnameN classnameNjj)}j]j)}jbpf_cpumask_any_and_distributesb c.bpf_cpumask_any_and_distributeasbuh1hhj>hhhj?hMubj9)}(h h]h }(hj,?hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj>hhhj?hMubj)}(hbpf_cpumask_any_and_distributeh]jm)}(hj)?h]hbpf_cpumask_any_and_distribute}(hj>?hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj:?ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj>hhhj?hMubj)}(h8(const struct cpumask *src1, const struct cpumask *src2)h](j)}(hconst struct cpumask *src1h](jK)}(hjh]hconst}(hjY?hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjU?ubj9)}(h h]h }(hjf?hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjU?ubjK)}(hjNh]hstruct}(hjt?hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhjU?ubj9)}(h h]h }(hj?hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjU?ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj?hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj?ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj?modnameN classnameNjj)}j]j'? c.bpf_cpumask_any_and_distributeasbuh1hhjU?ubj9)}(h h]h }(hj?hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hjU?ubj)}(hjh]h*}(hj?hhhNhNubah1}(h]h ]jah"]h$]h&]uh1jhjU?ubjm)}(hsrc1h]hsrc1}(hj?hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhjU?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQ?ubj)}(hconst struct cpumask *src2h](jK)}(hjh]hconst}(hj?hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj?ubj9)}(h h]h }(hj?hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj?ubjK)}(hjNh]hstruct}(hj?hhhNhNubah}(h]h ]jWah"]h$]h&]uh1jJhj?ubj9)}(h h]h }(hj @hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj?ubh)}(hhh]jm)}(hcpumaskh]hcpumask}(hj@hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj@ubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj@modnameN classnameNjj)}j]j'? c.bpf_cpumask_any_and_distributeasbuh1hhj?ubj9)}(h h]h }(hj;@hhhNhNubah}(h]h ]jEah"]h$]h&]uh1j8hj?ubj)}(hjh]h*}(hjI@hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubjm)}(hsrc2h]hsrc2}(hjV@hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jlhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjQ?ubeh}(h]h ]h"]h$]h&]hhuh1jhj>hhhj?hMubeh}(h]h ]h"]h$]h&]hhjuh1j.jjhj>hhhj?hMubah}(h]j>ah ](j j eh"]h$]h&]jj)jhuh1j(hj?hMhj>hhubj)}(hhh]h)}(h5Return a random set CPU from the AND of two cpumasks.h]h5Return a random set CPU from the AND of two cpumasks.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj}@hhubah}(h]h ]h"]h$]h&]uh1jhj>hhhj?hMubeh}(h]h ](jfunctioneh"]h$]h&]j2jj3j@j4j@j5j6j7uh1j#hhhj1#hNhNubj9)}(hXg**Parameters** ``const struct cpumask *src1`` The first cpumask. ``const struct cpumask *src2`` The second cpumask. **Return** * A random set bit within [0, num_cpus) from the AND of two cpumasks, if at least one bit is set. * >= num_cpus if no bit is set. **Description** struct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h)}(h**Parameters**h]jC)}(hj@h]h Parameters}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj@ubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubjY)}(hhh](j^)}(h2``const struct cpumask *src1`` The first cpumask. h](jd)}(h``const struct cpumask *src1``h]j)}(hj@h]hconst struct cpumask *src1}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubj~)}(hhh]h)}(hThe first cpumask.h]hThe first cpumask.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1j}hj@ubeh}(h]h ]h"]h$]h&]uh1j]hj@hMhj@ubj^)}(h3``const struct cpumask *src2`` The second cpumask. h](jd)}(h``const struct cpumask *src2``h]j)}(hj@h]hconst struct cpumask *src2}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jchR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubj~)}(hhh]h)}(hThe second cpumask.h]hThe second cpumask.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjAubah}(h]h ]h"]h$]h&]uh1j}hj@ubeh}(h]h ]h"]h$]h&]uh1j]hjAhMhj@ubeh}(h]h ]h"]h$]h&]uh1jXhj@ubh)}(h **Return**h]jC)}(hj5Ah]hReturn}(hj7AhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhj3Aubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubj)}(hhh](j)}(h_A random set bit within [0, num_cpus) from the AND of two cpumasks, if at least one bit is set.h]h)}(h_A random set bit within [0, num_cpus) from the AND of two cpumasks, if at least one bit is set.h]h_A random set bit within [0, num_cpus) from the AND of two cpumasks, if at least one bit is set.}(hjRAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhjNAubah}(h]h ]h"]h$]h&]uh1jhjKAubj)}(h>= num_cpus if no bit is set. h]h)}(h>= num_cpus if no bit is set.h]h>= num_cpus if no bit is set.}(hjkAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhjgAubah}(h]h ]h"]h$]h&]uh1jhjKAubeh}(h]h ]h"]h$]h&]j-juh1jhj`AhMhj@ubh)}(h**Description**h]jC)}(hjAh]h Description}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjAubah}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubh)}(hJstruct bpf_cpumask pointers may be safely passed to **src1** and **src2**.h](h4struct bpf_cpumask pointers may be safely passed to }(hjAhhhNhNubjC)}(h**src1**h]hsrc1}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjAubh and }(hjAhhhNhNubjC)}(h**src2**h]hsrc2}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jBhjAubh.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhR/var/lib/git/docbuild/linux/Documentation/bpf/cpumasks:361: ./kernel/bpf/cpumask.chMhj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1j8hj1#hhhNhNubj)}(h----h]h}(h]h ]h"]h$]h&]uh1jhhhMlhj1#hhubh)}(hX=Some example usages of these querying kfuncs were shown above. We will not replicate those examples here. Note, however, that all of the aforementioned kfuncs are tested in `tools/testing/selftests/bpf/progs/cpumask_success.c`_, so please take a look there if you're looking for more examples of how they can be used.h](hSome example usages of these querying kfuncs were shown above. We will not replicate those examples here. Note, however, that all of the aforementioned kfuncs are tested in }(hjAhhhNhNubh reference)}(h6`tools/testing/selftests/bpf/progs/cpumask_success.c`_h]h3tools/testing/selftests/bpf/progs/cpumask_success.c}(hjAhhhNhNubah}(h]h ]h"]h$]h&]name3tools/testing/selftests/bpf/progs/cpumask_success.crefuriyhttps://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/tools/testing/selftests/bpf/progs/cpumask_success.cuh1jAhjAresolvedKubh\, so please take a look there if you’re looking for more examples of how they can be used.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMnhj1#hhubh)}(h.. _tools/testing/selftests/bpf/progs/cpumask_success.c: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/tools/testing/selftests/bpf/progs/cpumask_success.ch]h}(h]3tools-testing-selftests-bpf-progs-cpumask-success-cah ]h"]3tools/testing/selftests/bpf/progs/cpumask_success.cah$]h&]jAjAuh1hhMthj1#hhhhnj referencedKubeh}(h](querying-cpumasksj(#eh ]h"](3.2 querying cpumaskscpumasks-querying-labeleh$]h&]uh1hhjS hhhhhM\expect_referenced_by_name}jBj#sexpect_referenced_by_id}j(#j#subeh}(h]cpumask-kfuncsah ]h"]3. cpumask kfuncsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h4. Adding BPF cpumask kfuncsh]h4. Adding BPF cpumask kfuncs}(hj.BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+BhhhhhMyubh)}(hXThe set of supported BPF cpumask kfuncs are not (yet) a 1-1 match with the cpumask operations in include/linux/cpumask.h. Any of those cpumask operations could easily be encapsulated in a new kfunc if and when required. If you'd like to support a new cpumask operation, please feel free to submit a patch. If you do add a new cpumask kfunc, please document it here, and add any relevant selftest testcases to the cpumask selftest suite.h]hXThe set of supported BPF cpumask kfuncs are not (yet) a 1-1 match with the cpumask operations in include/linux/cpumask.h. Any of those cpumask operations could easily be encapsulated in a new kfunc if and when required. If you’d like to support a new cpumask operation, please feel free to submit a patch. If you do add a new cpumask kfunc, please document it here, and add any relevant selftest testcases to the cpumask selftest suite.}(hjj>jBj BjLBj+Bu 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](hsystem_message)}(hhh]h)}(hhh]h;Hyperlink target "cpumasks-header-label" is not referenced.}hjBsbah}(h]h ]h"]h$]h&]uh1hhjBubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehnjlineKuh1jBubjB)}(hhh]h)}(hhh]h=Hyperlink target "cpumasks-querying-label" is not referenced.}hjCsbah}(h]h ]h"]h$]h&]uh1hhjCubah}(h]h ]h"]h$]h&]levelKtypejCsourcehnjlineMYuh1jBube transformerN include_log] decorationNhhub.