€•‡ªŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ&/translations/zh_CN/gpu/nova/core/todo”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/zh_TW/gpu/nova/core/todo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/it_IT/gpu/nova/core/todo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/ja_JP/gpu/nova/core/todo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/ko_KR/gpu/nova/core/todo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/pt_BR/gpu/nova/core/todo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ&/translations/sp_SP/gpu/nova/core/todo”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ*SPDX-License-Identifier: (GPL-2.0+ OR MIT)”h]”hŒ*SPDX-License-Identifier: (GPL-2.0+ OR MIT)”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ@/var/lib/git/docbuild/linux/Documentation/gpu/nova/core/todo.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ Task List”h]”hŒ Task List”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒ$Tasks may have the following fields:”h]”hŒ$Tasks may have the following fields:”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒÖ``Complexity``: Describes the required familiarity with Rust and / or the corresponding kernel APIs or subsystems. There are four different complexities, ``Beginner``, ``Intermediate``, ``Advanced`` and ``Expert``.”h]”hÞ)”}”(hŒÖ``Complexity``: Describes the required familiarity with Rust and / or the corresponding kernel APIs or subsystems. There are four different complexities, ``Beginner``, ``Intermediate``, ``Advanced`` and ``Expert``.”h]”(hŒliteral”“”)”}”(hŒ``Complexity``”h]”hŒ Complexity”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühhøubhŒŒ: Describes the required familiarity with Rust and / or the corresponding kernel APIs or subsystems. There are four different complexities, ”…””}”(hhøh²hh³Nh´Nubhý)”}”(hŒ ``Beginner``”h]”hŒBeginner”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühhøubhŒ, ”…””}”(hhøh²hh³Nh´Nubhý)”}”(hŒ``Intermediate``”h]”hŒ Intermediate”…””}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühhøubhŒ, ”…””}”hhøsbhý)”}”(hŒ ``Advanced``”h]”hŒAdvanced”…””}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühhøubhŒ and ”…””}”(hhøh²hh³Nh´Nubhý)”}”(hŒ ``Expert``”h]”hŒExpert”…””}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühhøubhŒ.”…””}”(hhøh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hhôubah}”(h]”h ]”h"]”h$]”h&]”uh1hòhhïh²hh³hÇh´Nubhó)”}”(hŒ)``Reference``: References to other tasks.”h]”hÞ)”}”(hjfh]”(hý)”}”(hŒ ``Reference``”h]”hŒ Reference”…””}”(hjkh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjhubhŒ: References to other tasks.”…””}”(hjhh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hjdubah}”(h]”h ]”h"]”h$]”h&]”uh1hòhhïh²hh³hÇh´Nubhó)”}”(hŒ&``Link``: Links to external resources.”h]”hÞ)”}”(hj‹h]”(hý)”}”(hŒ``Link``”h]”hŒLink”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjubhŒ: Links to external resources.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hj‰ubah}”(h]”h ]”h"]”h$]”h&]”uh1hòhhïh²hh³hÇh´Nubhó)”}”(hŒV``Contact``: The person that can be contacted for further information about the task. ”h]”hÞ)”}”(hŒU``Contact``: The person that can be contacted for further information about the task.”h]”(hý)”}”(hŒ ``Contact``”h]”hŒContact”…””}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühj²ubhŒJ: The person that can be contacted for further information about the task.”…””}”(hj²h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj®ubah}”(h]”h ]”h"]”h$]”h&]”uh1hòhhïh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1híh³hÇh´K hhÊh²hubhÞ)”}”(hŒ}A task might have `[ABCD]` code after its name. This code can be used to grep into the code for `TODO` entries related to it.”h]”(hŒA task might have ”…””}”(hjÜh²hh³Nh´NubhŒtitle_reference”“”)”}”(hŒ`[ABCD]`”h]”hŒ[ABCD]”…””}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjÜubhŒF code after its name. This code can be used to grep into the code for ”…””}”(hjÜh²hh³Nh´Nubjå)”}”(hŒ`TODO`”h]”hŒTODO”…””}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähjÜubhŒ entries related to it.”…””}”(hjÜh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒEnablement (Rust)”h]”hŒEnablement (Rust)”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´KubhÞ)”}”(hŒbTasks that are not directly related to nova-core, but are preconditions in terms of required APIs.”h]”hŒbTasks that are not directly related to nova-core, but are preconditions in terms of required APIs.”…””}”(hj!h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khjh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒFromPrimitive API [FPRI]”h]”hŒFromPrimitive API [FPRI]”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj/h²hh³hÇh´KubhÞ)”}”(hŒSSometimes the need arises to convert a number to a value of an enum or a structure.”h]”hŒSSometimes the need arises to convert a number to a value of an enum or a structure.”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj/h²hubhÞ)”}”(hXoA good example from nova-core would be the ``Chipset`` enum type, which defines the value ``AD102``. When probing the GPU the value ``0x192`` can be read from a certain register indication the chipset AD102. Hence, the enum value ``AD102`` should be derived from the number ``0x192``. Currently, nova-core uses a custom implementation (``Chipset::from_u32`` for this.”h]”(hŒ+A good example from nova-core would be the ”…””}”(hjNh²hh³Nh´Nubhý)”}”(hŒ ``Chipset``”h]”hŒChipset”…””}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjNubhŒ$ enum type, which defines the value ”…””}”(hjNh²hh³Nh´Nubhý)”}”(hŒ ``AD102``”h]”hŒAD102”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjNubhŒ!. When probing the GPU the value ”…””}”(hjNh²hh³Nh´Nubhý)”}”(hŒ ``0x192``”h]”hŒ0x192”…””}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjNubhŒY can be read from a certain register indication the chipset AD102. Hence, the enum value ”…””}”(hjNh²hh³Nh´Nubhý)”}”(hŒ ``AD102``”h]”hŒAD102”…””}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjNubhŒ# should be derived from the number ”…””}”(hjNh²hh³Nh´Nubhý)”}”(hŒ ``0x192``”h]”hŒ0x192”…””}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjNubhŒ5. Currently, nova-core uses a custom implementation (”…””}”(hjNh²hh³Nh´Nubhý)”}”(hŒ``Chipset::from_u32``”h]”hŒChipset::from_u32”…””}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjNubhŒ for this.”…””}”(hjNh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hj/h²hubhÞ)”}”(hŒiInstead, it would be desirable to have something like the ``FromPrimitive`` trait [1] from the num crate.”h]”(hŒ:Instead, it would be desirable to have something like the ”…””}”(hjÈh²hh³Nh´Nubhý)”}”(hŒ``FromPrimitive``”h]”hŒ FromPrimitive”…””}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hühjÈubhŒ trait [1] from the num crate.”…””}”(hjÈh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K&hj/h²hubhÞ)”}”(hŒHaving this generalization also helps with implementing a generic macro that automatically generates the corresponding mappings between a value and a number.”h]”hŒHaving this generalization also helps with implementing a generic macro that automatically generates the corresponding mappings between a value and a number.”…””}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K)hj/h²hubhÞ)”}”(hŒ^FromPrimitive support has been worked on in the past, but hasn't been followed since then [1].”h]”hŒ`FromPrimitive support has been worked on in the past, but hasn’t been followed since then [1].”…””}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K,hj/h²hubhÞ)”}”(hŒ7There also have been considerations of ToPrimitive [2].”h]”hŒ7There also have been considerations of ToPrimitive [2].”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K/hj/h²hubhŒ line_block”“”)”}”(hhh]”(hh´“”)”}”(hŒComplexity: Beginner”h]”hŒComplexity: Beginner”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h´Œindent”Khjh²hh³hÇh´K1ubj)”}”(hŒ=Link: https://docs.rs/num/latest/num/trait.FromPrimitive.html”h]”(hŒLink: ”…””}”(hj'h²hh³Nh´NubhŒ reference”“”)”}”(hŒ7https://docs.rs/num/latest/num/trait.FromPrimitive.html”h]”hŒ7https://docs.rs/num/latest/num/trait.FromPrimitive.html”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j3uh1j/hj'ubeh}”(h]”h ]”h"]”h$]”h&]”uh1h´j&Khjh²hh³hÇh´K2ubj)”}”(hŒNLink: https://lore.kernel.org/all/cover.1750689857.git.y.j3ms.n@gmail.com/ [1]”h]”(hŒLink: ”…””}”(hjFh²hh³Nh´Nubj0)”}”(hŒDhttps://lore.kernel.org/all/cover.1750689857.git.y.j3ms.n@gmail.com/”h]”hŒDhttps://lore.kernel.org/all/cover.1750689857.git.y.j3ms.n@gmail.com/”…””}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jPuh1j/hjFubhŒ [1]”…””}”(hjFh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h´j&Khjh²hh³hÇh´K3ubj)”}”(hŒ³Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Implement.20.60FromPrimitive.60.20trait.20.2B.20derive.20macro.20for.20nova-core/with/541971854 [2]”h]”(hŒLink: ”…””}”(hjgh²hh³Nh´Nubj0)”}”(hŒ©https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Implement.20.60FromPrimitive.60.20trait.20.2B.20derive.20macro.20for.20nova-core/with/541971854”h]”hŒ©https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Implement.20.60FromPrimitive.60.20trait.20.2B.20derive.20macro.20for.20nova-core/with/541971854”…””}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jquh1j/hjgubhŒ [2]”…””}”(hjgh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h´j&Khjh²hh³hÇh´K4ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj/h²hh³hÇh´K1ubeh}”(h]”Œfromprimitive-api-fpri”ah ]”h"]”Œfromprimitive api [fpri]”ah$]”h&]”uh1hÈhjh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒNumerical operations [NUMM]”h]”hŒNumerical operations [NUMM]”…””}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj–h²hh³hÇh´K7ubhÞ)”}”(hŒŽNova uses integer operations that are not part of the standard library (or not implemented in an optimized way for the kernel). These include:”h]”hŒŽNova uses integer operations that are not part of the standard library (or not implemented in an optimized way for the kernel). These include:”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K9hj–h²hubhî)”}”(hhh]”hó)”}”(hŒPThe "Find Last Set Bit" (`fls` function of the C part of the kernel) operation. ”h]”hÞ)”}”(hŒOThe "Find Last Set Bit" (`fls` function of the C part of the kernel) operation.”h]”(hŒThe “Find Last Set Bit†(”…””}”(hj¼h²hh³Nh´Nubjå)”}”(hŒ`fls`”h]”hŒfls”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jähj¼ubhŒ1 function of the C part of the kernel) operation.”…””}”(hj¼h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K