sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/driver-api/pm/cpuidlemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/driver-api/pm/cpuidlemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/driver-api/pm/cpuidlemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/driver-api/pm/cpuidlemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/driver-api/pm/cpuidlemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/pt_BR/driver-api/pm/cpuidlemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/driver-api/pm/cpuidlemodnameN 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:spacepreserveuh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/driver-api/pm/cpuidle.rsthKubh)}(h4This data file has been placed in the public domain.h]h4This data file has been placed in the public domain.}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhho/srv/docbuild/lib/venvs/build-kernel-docs/lib64/python3.9/site-packages/docutils/parsers/rst/include/isonum.txthKubh)}(hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .h]hDerived from the Unicode character mappings available from . Processed by unicode2rstsubs.py, part of Docutils: .}hhsbah}(h]h ]h"]h$]h&]hhuh1hhhhhhhhKubhsubstitution_definition)}(h*.. |amp| unicode:: U+00026 .. AMPERSANDh]h&}hhsbah}(h]h ]h"]ampah$]h&]uh1hhhhKhhhhubh)}(h+.. |apos| unicode:: U+00027 .. APOSTROPHEh]h'}hhsbah}(h]h ]h"]aposah$]h&]uh1hhhhKhhhhubh)}(h).. |ast| unicode:: U+0002A .. ASTERISKh]h*}hjsbah}(h]h ]h"]astah$]h&]uh1hhhhK hhhhubh)}(h+.. |brvbar| unicode:: U+000A6 .. BROKEN BARh]h¦}hjsbah}(h]h ]h"]brvbarah$]h&]uh1hhhhK hhhhubh)}(h0.. |bsol| unicode:: U+0005C .. REVERSE SOLIDUSh]h\}hj#sbah}(h]h ]h"]bsolah$]h&]uh1hhhhK hhhhubh)}(h*.. |cent| unicode:: U+000A2 .. CENT SIGNh]h¢}hj2sbah}(h]h ]h"]centah$]h&]uh1hhhhK hhhhubh)}(h&.. |colon| unicode:: U+0003A .. COLONh]h:}hjAsbah}(h]h ]h"]colonah$]h&]uh1hhhhK hhhhubh)}(h&.. |comma| unicode:: U+0002C .. COMMAh]h,}hjPsbah}(h]h ]h"]commaah$]h&]uh1hhhhKhhhhubh)}(h... |commat| unicode:: U+00040 .. COMMERCIAL ATh]h@}hj_sbah}(h]h ]h"]commatah$]h&]uh1hhhhKhhhhubh)}(h/.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGNh]h©}hjnsbah}(h]h ]h"]copyah$]h&]uh1hhhhKhhhhubh)}(h... |curren| unicode:: U+000A4 .. CURRENCY SIGNh]h¤}hj}sbah}(h]h ]h"]currenah$]h&]uh1hhhhKhhhhubh)}(h0.. |darr| unicode:: U+02193 .. DOWNWARDS ARROWh]h↓}hjsbah}(h]h ]h"]darrah$]h&]uh1hhhhKhhhhubh)}(h,.. |deg| unicode:: U+000B0 .. DEGREE SIGNh]h°}hjsbah}(h]h ]h"]degah$]h&]uh1hhhhKhhhhubh)}(h... |divide| unicode:: U+000F7 .. DIVISION SIGNh]h÷}hjsbah}(h]h ]h"]divideah$]h&]uh1hhhhKhhhhubh)}(h,.. |dollar| unicode:: U+00024 .. DOLLAR SIGNh]h$}hjsbah}(h]h ]h"]dollarah$]h&]uh1hhhhKhhhhubh)}(h,.. |equals| unicode:: U+0003D .. EQUALS SIGNh]h=}hjsbah}(h]h ]h"]equalsah$]h&]uh1hhhhKhhhhubh)}(h1.. |excl| unicode:: U+00021 .. EXCLAMATION MARKh]h!}hjsbah}(h]h ]h"]exclah$]h&]uh1hhhhKhhhhubh)}(h9.. |frac12| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjsbah}(h]h ]h"]frac12ah$]h&]uh1hhhhKhhhhubh)}(h<.. |frac14| unicode:: U+000BC .. VULGAR FRACTION ONE QUARTERh]h¼}hjsbah}(h]h ]h"]frac14ah$]h&]uh1hhhhKhhhhubh)}(h;.. |frac18| unicode:: U+0215B .. VULGAR FRACTION ONE EIGHTHh]h⅛}hjsbah}(h]h ]h"]frac18ah$]h&]uh1hhhhKhhhhubh)}(h?.. |frac34| unicode:: U+000BE .. VULGAR FRACTION THREE QUARTERSh]h¾}hjsbah}(h]h ]h"]frac34ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac38| unicode:: U+0215C .. VULGAR FRACTION THREE EIGHTHSh]h⅜}hj"sbah}(h]h ]h"]frac38ah$]h&]uh1hhhhKhhhhubh)}(h=.. |frac58| unicode:: U+0215D .. VULGAR FRACTION FIVE EIGHTHSh]h⅝}hj1sbah}(h]h ]h"]frac58ah$]h&]uh1hhhhKhhhhubh)}(h>.. |frac78| unicode:: U+0215E .. VULGAR FRACTION SEVEN EIGHTHSh]h⅞}hj@sbah}(h]h ]h"]frac78ah$]h&]uh1hhhhKhhhhubh)}(h2.. |gt| unicode:: U+0003E .. GREATER-THAN SIGNh]h>}hjOsbah}(h]h ]h"]gtah$]h&]uh1hhhhKhhhhubh)}(h9.. |half| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hj^sbah}(h]h ]h"]halfah$]h&]uh1hhhhK hhhhubh)}(h/.. |horbar| unicode:: U+02015 .. HORIZONTAL BARh]h―}hjmsbah}(h]h ]h"]horbarah$]h&]uh1hhhhK!hhhhubh)}(h'.. |hyphen| unicode:: U+02010 .. HYPHENh]h‐}hj|sbah}(h]h ]h"]hyphenah$]h&]uh1hhhhK"hhhhubh)}(h:.. |iexcl| unicode:: U+000A1 .. INVERTED EXCLAMATION MARKh]h¡}hjsbah}(h]h ]h"]iexclah$]h&]uh1hhhhK#hhhhubh)}(h7.. |iquest| unicode:: U+000BF .. INVERTED QUESTION MARKh]h¿}hjsbah}(h]h ]h"]iquestah$]h&]uh1hhhhK$hhhhubh)}(hJ.. |laquo| unicode:: U+000AB .. LEFT-POINTING DOUBLE ANGLE QUOTATION MARKh]h«}hjsbah}(h]h ]h"]laquoah$]h&]uh1hhhhK%hhhhubh)}(h0.. |larr| unicode:: U+02190 .. LEFTWARDS ARROWh]h←}hjsbah}(h]h ]h"]larrah$]h&]uh1hhhhK&hhhhubh)}(h3.. |lcub| unicode:: U+0007B .. LEFT CURLY BRACKETh]h{}hjsbah}(h]h ]h"]lcubah$]h&]uh1hhhhK'hhhhubh)}(h;.. |ldquo| unicode:: U+0201C .. LEFT DOUBLE QUOTATION MARKh]h“}hjsbah}(h]h ]h"]ldquoah$]h&]uh1hhhhK(hhhhubh)}(h).. |lowbar| unicode:: U+0005F .. LOW LINEh]h_}hjsbah}(h]h ]h"]lowbarah$]h&]uh1hhhhK)hhhhubh)}(h1.. |lpar| unicode:: U+00028 .. LEFT PARENTHESISh]h(}hjsbah}(h]h ]h"]lparah$]h&]uh1hhhhK*hhhhubh)}(h4.. |lsqb| unicode:: U+0005B .. LEFT SQUARE BRACKETh]h[}hjsbah}(h]h ]h"]lsqbah$]h&]uh1hhhhK+hhhhubh)}(h;.. |lsquo| unicode:: U+02018 .. LEFT SINGLE QUOTATION MARKh]h‘}hjsbah}(h]h ]h"]lsquoah$]h&]uh1hhhhK,hhhhubh)}(h/.. |lt| unicode:: U+0003C .. LESS-THAN SIGNh]h<}hj!sbah}(h]h ]h"]ltah$]h&]uh1hhhhK-hhhhubh)}(h+.. |micro| unicode:: U+000B5 .. MICRO SIGNh]hµ}hj0sbah}(h]h ]h"]microah$]h&]uh1hhhhK.hhhhubh)}(h+.. |middot| unicode:: U+000B7 .. MIDDLE DOTh]h·}hj?sbah}(h]h ]h"]middotah$]h&]uh1hhhhK/hhhhubh)}(h/.. |nbsp| unicode:: U+000A0 .. NO-BREAK SPACEh]h }hjNsbah}(h]h ]h"]nbspah$]h&]uh1hhhhK0hhhhubh)}(h).. |not| unicode:: U+000AC .. NOT SIGNh]h¬}hj]sbah}(h]h ]h"]notah$]h&]uh1hhhhK1hhhhubh)}(h,.. |num| unicode:: U+00023 .. NUMBER SIGNh]h#}hjlsbah}(h]h ]h"]numah$]h&]uh1hhhhK2hhhhubh)}(h).. |ohm| unicode:: U+02126 .. OHM SIGNh]hΩ}hj{sbah}(h]h ]h"]ohmah$]h&]uh1hhhhK3hhhhubh)}(h;.. |ordf| unicode:: U+000AA .. FEMININE ORDINAL INDICATORh]hª}hjsbah}(h]h ]h"]ordfah$]h&]uh1hhhhK4hhhhubh)}(h<.. |ordm| unicode:: U+000BA .. MASCULINE ORDINAL INDICATORh]hº}hjsbah}(h]h ]h"]ordmah$]h&]uh1hhhhK5hhhhubh)}(h-.. |para| unicode:: U+000B6 .. PILCROW SIGNh]h¶}hjsbah}(h]h ]h"]paraah$]h&]uh1hhhhK6hhhhubh)}(h-.. |percnt| unicode:: U+00025 .. PERCENT SIGNh]h%}hjsbah}(h]h ]h"]percntah$]h&]uh1hhhhK7hhhhubh)}(h*.. |period| unicode:: U+0002E .. FULL STOPh]h.}hjsbah}(h]h ]h"]periodah$]h&]uh1hhhhK8hhhhubh)}(h*.. |plus| unicode:: U+0002B .. PLUS SIGNh]h+}hjsbah}(h]h ]h"]plusah$]h&]uh1hhhhK9hhhhubh)}(h0.. |plusmn| unicode:: U+000B1 .. PLUS-MINUS SIGNh]h±}hjsbah}(h]h ]h"]plusmnah$]h&]uh1hhhhK:hhhhubh)}(h+.. |pound| unicode:: U+000A3 .. POUND SIGNh]h£}hjsbah}(h]h ]h"]poundah$]h&]uh1hhhhK;hhhhubh)}(h... |quest| unicode:: U+0003F .. QUESTION MARKh]h?}hjsbah}(h]h ]h"]questah$]h&]uh1hhhhKhhhhubh)}(h1.. |rarr| unicode:: U+02192 .. RIGHTWARDS ARROWh]h→}hj/sbah}(h]h ]h"]rarrah$]h&]uh1hhhhK?hhhhubh)}(h4.. |rcub| unicode:: U+0007D .. RIGHT CURLY BRACKETh]h}}hj>sbah}(h]h ]h"]rcubah$]h&]uh1hhhhK@hhhhubh)}(h<.. |rdquo| unicode:: U+0201D .. RIGHT DOUBLE QUOTATION MARKh]h”}hjMsbah}(h]h ]h"]rdquoah$]h&]uh1hhhhKAhhhhubh)}(h0.. |reg| unicode:: U+000AE .. REGISTERED SIGNh]h®}hj\sbah}(h]h ]h"]regah$]h&]uh1hhhhKBhhhhubh)}(h2.. |rpar| unicode:: U+00029 .. RIGHT PARENTHESISh]h)}hjksbah}(h]h ]h"]rparah$]h&]uh1hhhhKChhhhubh)}(h5.. |rsqb| unicode:: U+0005D .. RIGHT SQUARE BRACKETh]h]}hjzsbah}(h]h ]h"]rsqbah$]h&]uh1hhhhKDhhhhubh)}(h<.. |rsquo| unicode:: U+02019 .. RIGHT SINGLE QUOTATION MARKh]h’}hjsbah}(h]h ]h"]rsquoah$]h&]uh1hhhhKEhhhhubh)}(h-.. |sect| unicode:: U+000A7 .. SECTION SIGNh]h§}hjsbah}(h]h ]h"]sectah$]h&]uh1hhhhKFhhhhubh)}(h*.. |semi| unicode:: U+0003B .. SEMICOLONh]h;}hjsbah}(h]h ]h"]semiah$]h&]uh1hhhhKGhhhhubh)}(h,.. |shy| unicode:: U+000AD .. SOFT HYPHENh]h­}hjsbah}(h]h ]h"]shyah$]h&]uh1hhhhKHhhhhubh)}(h(.. |sol| unicode:: U+0002F .. SOLIDUSh]h/}hjsbah}(h]h ]h"]solah$]h&]uh1hhhhKIhhhhubh)}(h,.. |sung| unicode:: U+0266A .. EIGHTH NOTEh]h♪}hjsbah}(h]h ]h"]sungah$]h&]uh1hhhhKJhhhhubh)}(h0.. |sup1| unicode:: U+000B9 .. SUPERSCRIPT ONEh]h¹}hjsbah}(h]h ]h"]sup1ah$]h&]uh1hhhhKKhhhhubh)}(h0.. |sup2| unicode:: U+000B2 .. SUPERSCRIPT TWOh]h²}hjsbah}(h]h ]h"]sup2ah$]h&]uh1hhhhKLhhhhubh)}(h2.. |sup3| unicode:: U+000B3 .. SUPERSCRIPT THREEh]h³}hjsbah}(h]h ]h"]sup3ah$]h&]uh1hhhhKMhhhhubh)}(h4.. |times| unicode:: U+000D7 .. MULTIPLICATION SIGNh]h×}hjsbah}(h]h ]h"]timesah$]h&]uh1hhhhKNhhhhubh)}(h0.. |trade| unicode:: U+02122 .. TRADE MARK SIGNh]h™}hjsbah}(h]h ]h"]tradeah$]h&]uh1hhhhKOhhhhubh)}(h... |uarr| unicode:: U+02191 .. UPWARDS ARROWh]h↑}hj.sbah}(h]h ]h"]uarrah$]h&]uh1hhhhKPhhhhubh)}(h... |verbar| unicode:: U+0007C .. VERTICAL LINEh]h|}hj=sbah}(h]h ]h"]verbarah$]h&]uh1hhhhKQhhhhubh)}(h*.. |yen| unicode:: U+000A5 .. YEN SIGN h]h¥}hjLsbah}(h]h ]h"]yenah$]h&]uh1hhhhKRhhhhubhsection)}(hhh](htitle)}(hCPU Idle Time Managementh]hCPU Idle Time Management}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj]hhhhhKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(h Copyrighth]h Copyright}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjwhhhKubh field_body)}(h|copy| 2019 Intel Corporation h]h paragraph)}(h|copy| 2019 Intel Corporationh](h©}(hjhhhNhNubh 2019 Intel Corporation}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]uh1juhhhKhjrhhubjv)}(hhh](j{)}(hAuthorh]hAuthor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jzhjhhhKubj)}(h0Rafael J. Wysocki h]j)}(h.Rafael J. Wysocki h](hRafael J. Wysocki <}(hjhhhNhNubh reference)}(hrafael.j.wysocki@intel.comh]hrafael.j.wysocki@intel.com}(hjhhhNhNubah}(h]h ]h"]h$]h&]refuri!mailto:rafael.j.wysocki@intel.comuh1jhjubh>}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1juhhhK hjrhhubeh}(h]h ]h"]h$]h&]uh1jphj]hhhhhKubj\)}(hhh](ja)}(h"CPU Idle Time Management Subsystemh]h"CPU Idle Time Management Subsystem}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjhhhhhKubj)}(hXaEvery time one of the logical CPUs in the system (the entities that appear to fetch and execute instructions: hardware threads, if present, or processor cores) is idle after an interrupt or equivalent wakeup event, which means that there are no tasks to run on it except for the special "idle" task associated with it, there is an opportunity to save energy for the processor that it belongs to. That can be done by making the idle logical CPU stop fetching instructions from memory and putting some of the processor's functional units depended on by it into an idle state in which they will draw less power.h]hXgEvery time one of the logical CPUs in the system (the entities that appear to fetch and execute instructions: hardware threads, if present, or processor cores) is idle after an interrupt or equivalent wakeup event, which means that there are no tasks to run on it except for the special “idle” task associated with it, there is an opportunity to save energy for the processor that it belongs to. That can be done by making the idle logical CPU stop fetching instructions from memory and putting some of the processor’s functional units depended on by it into an idle state in which they will draw less power.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX_However, there may be multiple different idle states that can be used in such a situation in principle, so it may be necessary to find the most suitable one (from the kernel perspective) and ask the processor to use (or "enter") that particular idle state. That is the role of the CPU idle time management subsystem in the kernel, called ``CPUIdle``.h](hXWHowever, there may be multiple different idle states that can be used in such a situation in principle, so it may be necessary to find the most suitable one (from the kernel perspective) and ask the processor to use (or “enter”) that particular idle state. That is the role of the CPU idle time management subsystem in the kernel, called }(hjhhhNhNubhliteral)}(h ``CPUIdle``h]hCPUIdle}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hX The design of ``CPUIdle`` is modular and based on the code duplication avoidance principle, so the generic code that in principle need not depend on the hardware or platform design details in it is separate from the code that interacts with the hardware. It generally is divided into three categories of functional units: *governors* responsible for selecting idle states to ask the processor to enter, *drivers* that pass the governors' decisions on to the hardware and the *core* providing a common framework for them.h](hThe design of }(hj<hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj<ubhX* is modular and based on the code duplication avoidance principle, so the generic code that in principle need not depend on the hardware or platform design details in it is separate from the code that interacts with the hardware. It generally is divided into three categories of functional units: }(hj<hhhNhNubhemphasis)}(h *governors*h]h governors}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jVhj<ubhF responsible for selecting idle states to ask the processor to enter, }(hj<hhhNhNubjW)}(h *drivers*h]hdrivers}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jVhj<ubhA that pass the governors’ decisions on to the hardware and the }(hj<hhhNhNubjW)}(h*core*h]hcore}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jVhj<ubh' providing a common framework for them.}(hj<hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]"cpu-idle-time-management-subsystemah ]h"]"cpu idle time management subsystemah$]h&]uh1j[hj]hhhhhKubj\)}(hhh](ja)}(hCPU Idle Time Governorsh]hCPU Idle Time Governors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjhhhhhK)ubj)}(hA CPU idle time (``CPUIdle``) governor is a bundle of policy code invoked when one of the logical CPUs in the system turns out to be idle. Its role is to select an idle state to ask the processor to enter in order to save some energy.h](hA CPU idle time (}(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh) governor is a bundle of policy code invoked when one of the logical CPUs in the system turns out to be idle. Its role is to select an idle state to ask the processor to enter in order to save some energy.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK+hjhhubj)}(h``CPUIdle`` governors are generic and each of them can be used on any hardware platform that the Linux kernel can run on. For this reason, data structures operated on by them cannot depend on any hardware architecture or platform design details as well.h](j#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh governors are generic and each of them can be used on any hardware platform that the Linux kernel can run on. For this reason, data structures operated on by them cannot depend on any hardware architecture or platform design details as well.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK/hjhhubj)}(hXThe governor itself is represented by a struct cpuidle_governor object containing four callback pointers, :c:member:`enable`, :c:member:`disable`, :c:member:`select`, :c:member:`reflect`, a :c:member:`rating` field described below, and a name (string) used for identifying it.h](hjThe governor itself is represented by a struct cpuidle_governor object containing four callback pointers, }(hjhhhNhNubh)}(h:c:member:`enable`h]j#)}(hjh]henable}(hjhhhNhNubah}(h]h ](xrefcc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocdriver-api/pm/cpuidle refdomainjreftypemember refexplicitrefwarn reftargetenableuh1hhhhK4hjubh, }(hjhhhNhNubh)}(h:c:member:`disable`h]j#)}(hjh]hdisable}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjdisableuh1hhhhK4hjubh, }(hjhhhNhNubh)}(h:c:member:`select`h]j#)}(hj=h]hselect}(hj?hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj;ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjselectuh1hhhhK4hjubh, }hjsbh)}(h:c:member:`reflect`h]j#)}(hj`h]hreflect}(hjbhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj^ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjreflectuh1hhhhK4hjubh, a }(hjhhhNhNubh)}(h:c:member:`rating`h]j#)}(hjh]hrating}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjratinguh1hhhhK4hjubhD field described below, and a name (string) used for identifying it.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK4hjhhubj)}(hX-For the governor to be available at all, that object needs to be registered with the ``CPUIdle`` core by calling :c:func:`cpuidle_register_governor()` with a pointer to it passed as the argument. If successful, that causes the core to add the governor to the global list of available governors and, if it is the only one in the list (that is, the list was empty before) or the value of its :c:member:`rating` field is greater than the value of that field for the governor currently in use, or the name of the new governor was passed to the kernel as the value of the ``cpuidle.governor=`` command line parameter, the new governor will be used from that point on (there can be only one ``CPUIdle`` governor in use at a time). Also, user space can choose the ``CPUIdle`` governor to use at run time via ``sysfs``.h](hUFor the governor to be available at all, that object needs to be registered with the }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh core by calling }(hjhhhNhNubh)}(h%:c:func:`cpuidle_register_governor()`h]j#)}(hjh]hcpuidle_register_governor()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_register_governoruh1hhhhK9hjubh with a pointer to it passed as the argument. If successful, that causes the core to add the governor to the global list of available governors and, if it is the only one in the list (that is, the list was empty before) or the value of its }(hjhhhNhNubh)}(h:c:member:`rating`h]j#)}(hjh]hrating}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjratinguh1hhhhK9hjubh field is greater than the value of that field for the governor currently in use, or the name of the new governor was passed to the kernel as the value of the }(hjhhhNhNubj#)}(h``cpuidle.governor=``h]hcpuidle.governor=}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubha command line parameter, the new governor will be used from that point on (there can be only one }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh> governor in use at a time). Also, user space can choose the }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh! governor to use at run time via }(hjhhhNhNubj#)}(h ``sysfs``h]hsysfs}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK9hjhhubj)}(hOnce registered, ``CPUIdle`` governors cannot be unregistered, so it is not practical to put them into loadable kernel modules.h](hOnce registered, }(hjXhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjXubhc governors cannot be unregistered, so it is not practical to put them into loadable kernel modules.}(hjXhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKEhjhhubj)}(hTThe interface between ``CPUIdle`` governors and the core consists of four callbacks:h](hThe interface between }(hjxhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjxubh3 governors and the core consists of four callbacks:}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKHhjhhubhdefinition_list)}(hhh](hdefinition_list_item)}(hXQ:c:member:`enable` :: int (*enable) (struct cpuidle_driver *drv, struct cpuidle_device *dev); The role of this callback is to prepare the governor for handling the (logical) CPU represented by the struct cpuidle_device object pointed to by the ``dev`` argument. The struct cpuidle_driver object pointed to by the ``drv`` argument represents the ``CPUIdle`` driver to be used with that CPU (among other things, it should contain the list of struct cpuidle_state objects representing idle states that the processor holding the given CPU can be asked to enter). It may fail, in which case it is expected to return a negative error code, and that causes the kernel to run the architecture-specific default code for idle CPUs on the CPU in question instead of ``CPUIdle`` until the ``->enable()`` governor callback is invoked for that CPU again. h](hterm)}(h:c:member:`enable`h]h)}(hjh]j#)}(hjh]henable}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjenableuh1hhhhK\hjubah}(h]h ]h"]h$]h&]uh1jhhhK\hjubh definition)}(hhh](h literal_block)}(hGint (*enable) (struct cpuidle_driver *drv, struct cpuidle_device *dev);h]hGint (*enable) (struct cpuidle_driver *drv, struct cpuidle_device *dev);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKNhjubj)}(hXThe role of this callback is to prepare the governor for handling the (logical) CPU represented by the struct cpuidle_device object pointed to by the ``dev`` argument. The struct cpuidle_driver object pointed to by the ``drv`` argument represents the ``CPUIdle`` driver to be used with that CPU (among other things, it should contain the list of struct cpuidle_state objects representing idle states that the processor holding the given CPU can be asked to enter).h](hThe role of this callback is to prepare the governor for handling the (logical) CPU represented by the struct cpuidle_device object pointed to by the }(hjhhhNhNubj#)}(h``dev``h]hdev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh? argument. The struct cpuidle_driver object pointed to by the }(hjhhhNhNubj#)}(h``drv``h]hdrv}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh argument represents the }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh driver to be used with that CPU (among other things, it should contain the list of struct cpuidle_state objects representing idle states that the processor holding the given CPU can be asked to enter).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKPhjubj)}(hXIt may fail, in which case it is expected to return a negative error code, and that causes the kernel to run the architecture-specific default code for idle CPUs on the CPU in question instead of ``CPUIdle`` until the ``->enable()`` governor callback is invoked for that CPU again.h](hIt may fail, in which case it is expected to return a negative error code, and that causes the kernel to run the architecture-specific default code for idle CPUs on the CPU in question instead of }(hj& hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj& ubh until the }(hj& hhhNhNubj#)}(h``->enable()``h]h ->enable()}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj& ubh1 governor callback is invoked for that CPU again.}(hj& hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKXhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK\hjubj)}(hX:c:member:`disable` :: void (*disable) (struct cpuidle_driver *drv, struct cpuidle_device *dev); Called to make the governor stop handling the (logical) CPU represented by the struct cpuidle_device object pointed to by the ``dev`` argument. It is expected to reverse any changes made by the ``->enable()`` callback when it was last invoked for the target CPU, free all memory allocated by that callback and so on. h](j)}(h:c:member:`disable`h]h)}(hjj h]j#)}(hjj h]hdisable}(hjo hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjl ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjdisableuh1hhhhKihjh ubah}(h]h ]h"]h$]h&]uh1jhhhKihjd ubj)}(hhh](j)}(hIvoid (*disable) (struct cpuidle_driver *drv, struct cpuidle_device *dev);h]hIvoid (*disable) (struct cpuidle_driver *drv, struct cpuidle_device *dev);}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhKahj ubj)}(hCalled to make the governor stop handling the (logical) CPU represented by the struct cpuidle_device object pointed to by the ``dev`` argument.h](h~Called to make the governor stop handling the (logical) CPU represented by the struct cpuidle_device object pointed to by the }(hj hhhNhNubj#)}(h``dev``h]hdev}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh argument.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKchj ubj)}(hIt is expected to reverse any changes made by the ``->enable()`` callback when it was last invoked for the target CPU, free all memory allocated by that callback and so on.h](h2It is expected to reverse any changes made by the }(hj hhhNhNubj#)}(h``->enable()``h]h ->enable()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubhl callback when it was last invoked for the target CPU, free all memory allocated by that callback and so on.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKghj ubeh}(h]h ]h"]h$]h&]uh1jhjd ubeh}(h]h ]h"]h$]h&]uh1jhhhKihjhhubj)}(hXs:c:member:`select` :: int (*select) (struct cpuidle_driver *drv, struct cpuidle_device *dev, bool *stop_tick); Called to select an idle state for the processor holding the (logical) CPU represented by the struct cpuidle_device object pointed to by the ``dev`` argument. The list of idle states to take into consideration is represented by the :c:member:`states` array of struct cpuidle_state objects held by the struct cpuidle_driver object pointed to by the ``drv`` argument (which represents the ``CPUIdle`` driver to be used with the CPU at hand). The value returned by this callback is interpreted as an index into that array (unless it is a negative error code). The ``stop_tick`` argument is used to indicate whether or not to stop the scheduler tick before asking the processor to enter the selected idle state. When the ``bool`` variable pointed to by it (which is set to ``true`` before invoking this callback) is cleared to ``false``, the processor will be asked to enter the selected idle state without stopping the scheduler tick on the given CPU (if the tick has been stopped on that CPU already, however, it will not be restarted before asking the processor to enter the idle state). This callback is mandatory (i.e. the :c:member:`select` callback pointer in struct cpuidle_governor must not be ``NULL`` for the registration of the governor to succeed). h](j)}(h:c:member:`select`h]h)}(hj h]j#)}(hj h]hselect}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjselectuh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh](j)}(hgint (*select) (struct cpuidle_driver *drv, struct cpuidle_device *dev, bool *stop_tick);h]hgint (*select) (struct cpuidle_driver *drv, struct cpuidle_device *dev, bool *stop_tick);}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhKnhj ubj)}(hCalled to select an idle state for the processor holding the (logical) CPU represented by the struct cpuidle_device object pointed to by the ``dev`` argument.h](hCalled to select an idle state for the processor holding the (logical) CPU represented by the struct cpuidle_device object pointed to by the }(hj* hhhNhNubj#)}(h``dev``h]hdev}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj* ubh argument.}(hj* hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKqhj ubj)}(hXThe list of idle states to take into consideration is represented by the :c:member:`states` array of struct cpuidle_state objects held by the struct cpuidle_driver object pointed to by the ``drv`` argument (which represents the ``CPUIdle`` driver to be used with the CPU at hand). The value returned by this callback is interpreted as an index into that array (unless it is a negative error code).h](hIThe list of idle states to take into consideration is represented by the }(hjJ hhhNhNubh)}(h:c:member:`states`h]j#)}(hjT h]hstates}(hjV hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjR ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjstatesuh1hhhhKuhjJ ubhb array of struct cpuidle_state objects held by the struct cpuidle_driver object pointed to by the }(hjJ hhhNhNubj#)}(h``drv``h]hdrv}(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjJ ubh argument (which represents the }(hjJ hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjJ ubh driver to be used with the CPU at hand). The value returned by this callback is interpreted as an index into that array (unless it is a negative error code).}(hjJ hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKuhj ubj)}(hXThe ``stop_tick`` argument is used to indicate whether or not to stop the scheduler tick before asking the processor to enter the selected idle state. When the ``bool`` variable pointed to by it (which is set to ``true`` before invoking this callback) is cleared to ``false``, the processor will be asked to enter the selected idle state without stopping the scheduler tick on the given CPU (if the tick has been stopped on that CPU already, however, it will not be restarted before asking the processor to enter the idle state).h](hThe }(hj hhhNhNubj#)}(h ``stop_tick``h]h stop_tick}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh argument is used to indicate whether or not to stop the scheduler tick before asking the processor to enter the selected idle state. When the }(hj hhhNhNubj#)}(h``bool``h]hbool}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh, variable pointed to by it (which is set to }(hj hhhNhNubj#)}(h``true``h]htrue}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh. before invoking this callback) is cleared to }(hj hhhNhNubj#)}(h ``false``h]hfalse}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh, the processor will be asked to enter the selected idle state without stopping the scheduler tick on the given CPU (if the tick has been stopped on that CPU already, however, it will not be restarted before asking the processor to enter the idle state).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhK|hj ubj)}(hThis callback is mandatory (i.e. the :c:member:`select` callback pointer in struct cpuidle_governor must not be ``NULL`` for the registration of the governor to succeed).h](h%This callback is mandatory (i.e. the }(hj hhhNhNubh)}(h:c:member:`select`h]j#)}(hj h]hselect}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjselectuh1hhhhKhj ubh9 callback pointer in struct cpuidle_governor must not be }(hj hhhNhNubj#)}(h``NULL``h]hNULL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh2 for the registration of the governor to succeed).}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(hXN:c:member:`reflect` :: void (*reflect) (struct cpuidle_device *dev, int index); Called to allow the governor to evaluate the accuracy of the idle state selection made by the ``->select()`` callback (when it was invoked last time) and possibly use the result of that to improve the accuracy of idle state selections in the future. h](j)}(h:c:member:`reflect`h]h)}(hjJ h]j#)}(hjJ h]hreflect}(hjO hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjL ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjreflectuh1hhhhKhjH ubah}(h]h ]h"]h$]h&]uh1jhhhKhjD ubj)}(hhh](j)}(h8void (*reflect) (struct cpuidle_device *dev, int index);h]h8void (*reflect) (struct cpuidle_device *dev, int index);}hjs sbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjp ubj)}(hCalled to allow the governor to evaluate the accuracy of the idle state selection made by the ``->select()`` callback (when it was invoked last time) and possibly use the result of that to improve the accuracy of idle state selections in the future.h](h^Called to allow the governor to evaluate the accuracy of the idle state selection made by the }(hj hhhNhNubj#)}(h``->select()``h]h ->select()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh callback (when it was invoked last time) and possibly use the result of that to improve the accuracy of idle state selections in the future.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjp ubeh}(h]h ]h"]h$]h&]uh1jhjD ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hX8In addition, ``CPUIdle`` governors are required to take power management quality of service (PM QoS) constraints on the processor wakeup latency into account when selecting idle states. In order to obtain the current effective PM QoS wakeup latency constraint for a given CPU, a ``CPUIdle`` governor is expected to pass the number of the CPU to :c:func:`cpuidle_governor_latency_req()`. Then, the governor's ``->select()`` callback must not return the index of an indle state whose :c:member:`exit_latency` value is greater than the number returned by that function.h](h In addition, }(hj hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubhX governors are required to take power management quality of service (PM QoS) constraints on the processor wakeup latency into account when selecting idle states. In order to obtain the current effective PM QoS wakeup latency constraint for a given CPU, a }(hj hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh7 governor is expected to pass the number of the CPU to }(hj hhhNhNubh)}(h(:c:func:`cpuidle_governor_latency_req()`h]j#)}(hj h]hcpuidle_governor_latency_req()}(hj hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_governor_latency_requh1hhhhKhj ubh. Then, the governor’s }(hj hhhNhNubj#)}(h``->select()``h]h ->select()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh< callback must not return the index of an indle state whose }(hj hhhNhNubh)}(h:c:member:`exit_latency`h]j#)}(hj h]h exit_latency}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnj exit_latencyuh1hhhhKhj ubh< value is greater than the number returned by that function.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]cpu-idle-time-governorsah ]h"]cpu idle time governorsah$]h&]uh1j[hj]hhhhhK)ubj\)}(hhh](ja)}(h CPU Idle Time Management Driversh]h CPU Idle Time Management Drivers}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjE hhhhhKubj)}(h|CPU idle time management (``CPUIdle``) drivers provide an interface between the other parts of ``CPUIdle`` and the hardware.h](hCPU idle time management (}(hjV hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjV ubh:) drivers provide an interface between the other parts of }(hjV hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjV ubh and the hardware.}(hjV hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hXiFirst of all, a ``CPUIdle`` driver has to populate the :c:member:`states` array of struct cpuidle_state objects included in the struct cpuidle_driver object representing it. Going forward this array will represent the list of available idle states that the processor hardware can be asked to enter shared by all of the logical CPUs handled by the given driver.h](hFirst of all, a }(hj hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj ubh driver has to populate the }(hj hhhNhNubh)}(h:c:member:`states`h]j#)}(hj h]hstates}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjstatesuh1hhhhKhj ubhX  array of struct cpuidle_state objects included in the struct cpuidle_driver object representing it. Going forward this array will represent the list of available idle states that the processor hardware can be asked to enter shared by all of the logical CPUs handled by the given driver.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hXThe entries in the :c:member:`states` array are expected to be sorted by the value of the :c:member:`target_residency` field in struct cpuidle_state in the ascending order (that is, index 0 should correspond to the idle state with the minimum value of :c:member:`target_residency`). [Since the :c:member:`target_residency` value is expected to reflect the "depth" of the idle state represented by the struct cpuidle_state object holding it, this sorting order should be the same as the ascending sorting order by the idle state "depth".]h](hThe entries in the }(hj hhhNhNubh)}(h:c:member:`states`h]j#)}(hj h]hstates}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjstatesuh1hhhhKhj ubh5 array are expected to be sorted by the value of the }(hj hhhNhNubh)}(h:c:member:`target_residency`h]j#)}(hj h]htarget_residency}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjtarget_residencyuh1hhhhKhj ubh field in struct cpuidle_state in the ascending order (that is, index 0 should correspond to the idle state with the minimum value of }(hj hhhNhNubh)}(h:c:member:`target_residency`h]j#)}(hj h]htarget_residency}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjtarget_residencyuh1hhhhKhj ubh). [Since the }(hj hhhNhNubh)}(h:c:member:`target_residency`h]j#)}(hj> h]htarget_residency}(hj@ hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj< ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjtarget_residencyuh1hhhhKhj ubh value is expected to reflect the “depth” of the idle state represented by the struct cpuidle_state object holding it, this sorting order should be the same as the ascending sorting order by the idle state “depth”.]}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hThree fields in struct cpuidle_state are used by the existing ``CPUIdle`` governors for computations related to idle state selection:h](h>Three fields in struct cpuidle_state are used by the existing }(hje hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hje ubh< governors for computations related to idle state selection:}(hje hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hhh](j)}(hX:c:member:`target_residency` Minimum time to spend in this idle state including the time needed to enter it (which may be substantial) to save more energy than could be saved by staying in a shallower idle state for the same amount of time, in microseconds. h](j)}(h:c:member:`target_residency`h]h)}(hj h]j#)}(hj h]htarget_residency}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjtarget_residencyuh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]j)}(hMinimum time to spend in this idle state including the time needed to enter it (which may be substantial) to save more energy than could be saved by staying in a shallower idle state for the same amount of time, in microseconds.h]hMinimum time to spend in this idle state including the time needed to enter it (which may be substantial) to save more energy than could be saved by staying in a shallower idle state for the same amount of time, in microseconds.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(h:c:member:`exit_latency` Maximum time it will take a CPU asking the processor to enter this idle state to start executing the first instruction after a wakeup from it, in microseconds. h](j)}(h:c:member:`exit_latency`h]h)}(hj h]j#)}(hj h]h exit_latency}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnj exit_latencyuh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubj)}(hhh]j)}(hMaximum time it will take a CPU asking the processor to enter this idle state to start executing the first instruction after a wakeup from it, in microseconds.h]hMaximum time it will take a CPU asking the processor to enter this idle state to start executing the first instruction after a wakeup from it, in microseconds.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj hhubj)}(hX:c:member:`flags` Flags representing idle state properties. Currently, governors only use the ``CPUIDLE_FLAG_POLLING`` flag which is set if the given object does not represent a real idle state, but an interface to a software "loop" that can be used in order to avoid asking the processor to enter any idle state at all. [There are other flags used by the ``CPUIdle`` core in special situations.] h](j)}(h:c:member:`flags`h]h)}(hj h]j#)}(hj h]hflags}(hj%hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj"ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjflagsuh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]j)}(hX|Flags representing idle state properties. Currently, governors only use the ``CPUIDLE_FLAG_POLLING`` flag which is set if the given object does not represent a real idle state, but an interface to a software "loop" that can be used in order to avoid asking the processor to enter any idle state at all. [There are other flags used by the ``CPUIdle`` core in special situations.]h](hMFlags representing idle state properties. Currently, governors only use the }(hjIhhhNhNubj#)}(h``CPUIDLE_FLAG_POLLING``h]hCPUIDLE_FLAG_POLLING}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjIubh flag which is set if the given object does not represent a real idle state, but an interface to a software “loop” that can be used in order to avoid asking the processor to enter any idle state at all. [There are other flags used by the }(hjIhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjIubh core in special situations.]}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjFubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj hhubeh}(h]h ]h"]h$]h&]uh1jhjE hhhhhNubj)}(hThe :c:member:`enter` callback pointer in struct cpuidle_state, which must not be ``NULL``, points to the routine to execute in order to ask the processor to enter this particular idle state:h](hThe }(hjhhhNhNubh)}(h:c:member:`enter`h]j#)}(hjh]henter}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjenteruh1hhhhKhjubh= callback pointer in struct cpuidle_state, which must not be }(hjhhhNhNubj#)}(h``NULL``h]hNULL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubhe, points to the routine to execute in order to ask the processor to enter this particular idle state:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(havoid (*enter) (struct cpuidle_device *dev, struct cpuidle_driver *drv, int index);h]havoid (*enter) (struct cpuidle_device *dev, struct cpuidle_driver *drv, int index);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjE hhubj)}(hXpThe first two arguments of it point to the struct cpuidle_device object representing the logical CPU running this callback and the struct cpuidle_driver object representing the driver itself, respectively, and the last one is an index of the struct cpuidle_state entry in the driver's :c:member:`states` array representing the idle state to ask the processor to enter.h](hXThe first two arguments of it point to the struct cpuidle_device object representing the logical CPU running this callback and the struct cpuidle_driver object representing the driver itself, respectively, and the last one is an index of the struct cpuidle_state entry in the driver’s }(hjhhhNhNubh)}(h:c:member:`states`h]j#)}(hjh]hstates}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjstatesuh1hhhhKhjubhA array representing the idle state to ask the processor to enter.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hX{The analogous ``->enter_s2idle()`` callback in struct cpuidle_state is used only for implementing the suspend-to-idle system-wide power management feature. The difference between in and ``->enter()`` is that it must not re-enable interrupts at any point (even temporarily) or attempt to change the states of clock event devices, which the ``->enter()`` callback may do sometimes.h](hThe analogous }(hjhhhNhNubj#)}(h``->enter_s2idle()``h]h->enter_s2idle()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh callback in struct cpuidle_state is used only for implementing the suspend-to-idle system-wide power management feature. The difference between in and }(hjhhhNhNubj#)}(h ``->enter()``h]h ->enter()}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh is that it must not re-enable interrupts at any point (even temporarily) or attempt to change the states of clock event devices, which the }(hjhhhNhNubj#)}(h ``->enter()``h]h ->enter()}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh callback may do sometimes.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hXDOnce the :c:member:`states` array has been populated, the number of valid entries in it has to be stored in the :c:member:`state_count` field of the struct cpuidle_driver object representing the driver. Moreover, if any entries in the :c:member:`states` array represent "coupled" idle states (that is, idle states that can only be asked for if multiple related logical CPUs are idle), the :c:member:`safe_state_index` field in struct cpuidle_driver needs to be the index of an idle state that is not "coupled" (that is, one that can be asked for if only one logical CPU is idle).h](h Once the }(hjShhhNhNubh)}(h:c:member:`states`h]j#)}(hj]h]hstates}(hj_hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj[ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjstatesuh1hhhhKhjSubhU array has been populated, the number of valid entries in it has to be stored in the }(hjShhhNhNubh)}(h:c:member:`state_count`h]j#)}(hjh]h state_count}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hj~ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnj state_countuh1hhhhKhjSubhe field of the struct cpuidle_driver object representing the driver. Moreover, if any entries in the }(hjShhhNhNubh)}(h:c:member:`states`h]j#)}(hjh]hstates}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjstatesuh1hhhhKhjSubh array represent “coupled” idle states (that is, idle states that can only be asked for if multiple related logical CPUs are idle), the }(hjShhhNhNubh)}(h:c:member:`safe_state_index`h]j#)}(hjh]hsafe_state_index}(hjhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjsafe_state_indexuh1hhhhKhjSubh field in struct cpuidle_driver needs to be the index of an idle state that is not “coupled” (that is, one that can be asked for if only one logical CPU is idle).}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hIn addition to that, if the given ``CPUIdle`` driver is only going to handle a subset of logical CPUs in the system, the :c:member:`cpumask` field in its struct cpuidle_driver object must point to the set (mask) of CPUs that will be handled by it.h](h"In addition to that, if the given }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubhL driver is only going to handle a subset of logical CPUs in the system, the }(hjhhhNhNubh)}(h:c:member:`cpumask`h]j#)}(hj h]hcpumask}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjcpumaskuh1hhhhKhjubhk field in its struct cpuidle_driver object must point to the set (mask) of CPUs that will be handled by it.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hX[A ``CPUIdle`` driver can only be used after it has been registered. If there are no "coupled" idle state entries in the driver's :c:member:`states` array, that can be accomplished by passing the driver's struct cpuidle_driver object to :c:func:`cpuidle_register_driver()`. Otherwise, :c:func:`cpuidle_register()` should be used for this purpose.h](hA }(hj0hhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j"hj0ubh{ driver can only be used after it has been registered. If there are no “coupled” idle state entries in the driver’s }(hj0hhhNhNubh)}(h:c:member:`states`h]j#)}(hjLh]hstates}(hjNhhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjJubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjstatesuh1hhhhKhj0ubh[ array, that can be accomplished by passing the driver’s struct cpuidle_driver object to }(hj0hhhNhNubh)}(h#:c:func:`cpuidle_register_driver()`h]j#)}(hjoh]hcpuidle_register_driver()}(hjqhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjmubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_register_driveruh1hhhhKhj0ubh. Otherwise, }(hj0hhhNhNubh)}(h:c:func:`cpuidle_register()`h]j#)}(hjh]hcpuidle_register()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_registeruh1hhhhKhj0ubh! should be used for this purpose.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hXHowever, it also is necessary to register struct cpuidle_device objects for all of the logical CPUs to be handled by the given ``CPUIdle`` driver with the help of :c:func:`cpuidle_register_device()` after the driver has been registered and :c:func:`cpuidle_register_driver()`, unlike :c:func:`cpuidle_register()`, does not do that automatically. For this reason, the drivers that use :c:func:`cpuidle_register_driver()` to register themselves must also take care of registering the struct cpuidle_device objects as needed, so it is generally recommended to use :c:func:`cpuidle_register()` for ``CPUIdle`` driver registration in all cases.h](hHowever, it also is necessary to register struct cpuidle_device objects for all of the logical CPUs to be handled by the given }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh driver with the help of }(hjhhhNhNubh)}(h#:c:func:`cpuidle_register_device()`h]j#)}(hjh]hcpuidle_register_device()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_register_deviceuh1hhhhKhjubh* after the driver has been registered and }(hjhhhNhNubh)}(h#:c:func:`cpuidle_register_driver()`h]j#)}(hjh]hcpuidle_register_driver()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_register_driveruh1hhhhKhjubh , unlike }(hj4hhhNhNubh)}(h:c:func:`cpuidle_register()`h]j#)}(hjh]hcpuidle_register()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_registeruh1hhhhKhjubhI, does not do that automatically. For this reason, the drivers that use }(hjhhhNhNubh)}(h#:c:func:`cpuidle_register_driver()`h]j#)}(hj>h]hcpuidle_register_driver()}(hj@hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hj<ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_register_driveruh1hhhhKhjubh to register themselves must also take care of registering the struct cpuidle_device objects as needed, so it is generally recommended to use }(hjhhhNhNubh)}(h:c:func:`cpuidle_register()`h]j#)}(hjah]hcpuidle_register()}(hjchhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hj_ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_registeruh1hhhhKhjubh for }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh" driver registration in all cases.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hX$The registration of a struct cpuidle_device object causes the ``CPUIdle`` ``sysfs`` interface to be created and the governor's ``->enable()`` callback to be invoked for the logical CPU represented by it, so it must take place after registering the driver that will handle the CPU in question.h](h>The registration of a struct cpuidle_device object causes the }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh }(hjhhhNhNubj#)}(h ``sysfs``h]hsysfs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh. interface to be created and the governor’s }(hjhhhNhNubj#)}(h``->enable()``h]h ->enable()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh callback to be invoked for the logical CPU represented by it, so it must take place after registering the driver that will handle the CPU in question.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhKhjE hhubj)}(hX``CPUIdle`` drivers and struct cpuidle_device objects can be unregistered when they are not necessary any more which allows some resources associated with them to be released. Due to dependencies between them, all of the struct cpuidle_device objects representing CPUs handled by the given ``CPUIdle`` driver must be unregistered, with the help of :c:func:`cpuidle_unregister_device()`, before calling :c:func:`cpuidle_unregister_driver()` to unregister the driver. Alternatively, :c:func:`cpuidle_unregister()` can be called to unregister a ``CPUIdle`` driver along with all of the struct cpuidle_device objects representing CPUs handled by it.h](j#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubhX drivers and struct cpuidle_device objects can be unregistered when they are not necessary any more which allows some resources associated with them to be released. Due to dependencies between them, all of the struct cpuidle_device objects representing CPUs handled by the given }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh/ driver must be unregistered, with the help of }(hjhhhNhNubh)}(h%:c:func:`cpuidle_unregister_device()`h]j#)}(hjh]hcpuidle_unregister_device()}(hj hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_unregister_deviceuh1hhhhMhjubh, before calling }(hjhhhNhNubh)}(h%:c:func:`cpuidle_unregister_driver()`h]j#)}(hj+h]hcpuidle_unregister_driver()}(hj-hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hj)ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_unregister_driveruh1hhhhMhjubh+ to unregister the driver. Alternatively, }(hjhhhNhNubh)}(h:c:func:`cpuidle_unregister()`h]j#)}(hjNh]hcpuidle_unregister()}(hjPhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjLubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_unregisteruh1hhhhMhjubh can be called to unregister a }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh\ driver along with all of the struct cpuidle_device objects representing CPUs handled by it.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhMhjE hhubj)}(hXC``CPUIdle`` drivers can respond to runtime system configuration changes that lead to modifications of the list of available processor idle states (which can happen, for example, when the system's power source is switched from AC to battery or the other way around). Upon a notification of such a change, a ``CPUIdle`` driver is expected to call :c:func:`cpuidle_pause_and_lock()` to turn ``CPUIdle`` off temporarily and then :c:func:`cpuidle_disable_device()` for all of the struct cpuidle_device objects representing CPUs affected by that change. Next, it can update its :c:member:`states` array in accordance with the new configuration of the system, call :c:func:`cpuidle_enable_device()` for all of the relevant struct cpuidle_device objects and invoke :c:func:`cpuidle_resume_and_unlock()` to allow ``CPUIdle`` to be used again.h](j#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubhX* drivers can respond to runtime system configuration changes that lead to modifications of the list of available processor idle states (which can happen, for example, when the system’s power source is switched from AC to battery or the other way around). Upon a notification of such a change, a }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh driver is expected to call }(hjhhhNhNubh)}(h":c:func:`cpuidle_pause_and_lock()`h]j#)}(hjh]hcpuidle_pause_and_lock()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_pause_and_lockuh1hhhhM hjubh to turn }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh off temporarily and then }(hjhhhNhNubh)}(h":c:func:`cpuidle_disable_device()`h]j#)}(hjh]hcpuidle_disable_device()}(hjhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_disable_deviceuh1hhhhM hjubhr for all of the struct cpuidle_device objects representing CPUs affected by that change. Next, it can update its }(hjhhhNhNubh)}(h:c:member:`states`h]j#)}(hj h]hstates}(hj hhhNhNubah}(h]h ](jjc-membereh"]h$]h&]uh1j"hjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypemember refexplicitrefwarnjstatesuh1hhhhM hjubhD array in accordance with the new configuration of the system, call }(hjhhhNhNubh)}(h!:c:func:`cpuidle_enable_device()`h]j#)}(hj,h]hcpuidle_enable_device()}(hj.hhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hj*ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_enable_deviceuh1hhhhM hjubhB for all of the relevant struct cpuidle_device objects and invoke }(hjhhhNhNubh)}(h%:c:func:`cpuidle_resume_and_unlock()`h]j#)}(hjOh]hcpuidle_resume_and_unlock()}(hjQhhhNhNubah}(h]h ](jjc-funceh"]h$]h&]uh1j"hjMubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftypefunc refexplicitrefwarnjcpuidle_resume_and_unlockuh1hhhhM hjubh to allow }(hjhhhNhNubj#)}(h ``CPUIdle``h]hCPUIdle}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1j"hjubh to be used again.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhhhM hjE hhubeh}(h] cpu-idle-time-management-driversah ]h"] cpu idle time management driversah$]h&]uh1j[hj]hhhhhKubeh}(h]cpu-idle-time-managementah ]h"]cpu idle time managementah$]h&]uh1j[hhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(j`N generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}(hhjhjjj jj/j#j>j2jMjAj\jPjkj_jzjnjj}jjjjjjjjjjjjjjjjjjjjj.j"j=j1jLj@j[jOjjj^jyjmjj|jjjjjjjjjjjjjjjjjjjjj-j!j<j0jKj?jZjNjij]jxjljj{jjjjjjjjjjjjjjjjjjjjj,j j;j/jJj>jYjMjhj\jwjkjjzjjjjjjjjjjjjjjjjj jjjj+jj:j.jIj=jXjLusubstitution_names}(amphaposjastjbrvbarj bsolj/centj>colonjMcommaj\commatjkcopyjzcurrenjdarrjdegjdividejdollarjequalsjexcljfrac12jfrac14jfrac18jfrac34jfrac38j.frac58j=frac78jLgtj[halfjjhorbarjyhyphenjiexcljiquestjlaquojlarrjlcubjldquojlowbarjlparjlsqbjlsquojltj-microj<middotjKnbspjZnotjinumjxohmjordfjordmjparajpercntjperiodjplusjplusmnjpoundjquestjquotjraquoj,rarrj;rcubjJrdquojYregjhrparjwrsqbjrsquojsectjsemijshyjsoljsungjsup1jsup2jsup3j timesjtradej+uarrj:verbarjIyenjXurefnames}refids}nameids}(jjjjjB j? jju nametypes}(jjjB juh}(jj]jjj? jjjE u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log]'Documentation/driver-api/pm/cpuidle.rst(NNNNta decorationNhhub.