sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget0/translations/zh_CN/admin-guide/pm/suspend-flowsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/zh_TW/admin-guide/pm/suspend-flowsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/it_IT/admin-guide/pm/suspend-flowsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ja_JP/admin-guide/pm/suspend-flowsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ko_KR/admin-guide/pm/suspend-flowsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/sp_SP/admin-guide/pm/suspend-flowsmodnameN 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:spacepreserveuh1hhhhhhJ/var/lib/git/docbuild/linux/Documentation/admin-guide/pm/suspend-flows.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*}hhsbah}(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\}hjsbah}(h]h ]h"]bsolah$]h&]uh1hhhhK hhhhubh)}(h*.. |cent| unicode:: U+000A2 .. CENT SIGNh]h¢}hjsbah}(h]h ]h"]centah$]h&]uh1hhhhK hhhhubh)}(h&.. |colon| unicode:: U+0003A .. COLONh]h:}hj-sbah}(h]h ]h"]colonah$]h&]uh1hhhhK hhhhubh)}(h&.. |comma| unicode:: U+0002C .. COMMAh]h,}hj<sbah}(h]h ]h"]commaah$]h&]uh1hhhhKhhhhubh)}(h... |commat| unicode:: U+00040 .. COMMERCIAL ATh]h@}hjKsbah}(h]h ]h"]commatah$]h&]uh1hhhhKhhhhubh)}(h/.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGNh]h©}hjZsbah}(h]h ]h"]copyah$]h&]uh1hhhhKhhhhubh)}(h... |curren| unicode:: U+000A4 .. CURRENCY SIGNh]h¤}hjisbah}(h]h ]h"]currenah$]h&]uh1hhhhKhhhhubh)}(h0.. |darr| unicode:: U+02193 .. DOWNWARDS ARROWh]h↓}hjxsbah}(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⅜}hjsbah}(h]h ]h"]frac38ah$]h&]uh1hhhhKhhhhubh)}(h=.. |frac58| unicode:: U+0215D .. VULGAR FRACTION FIVE EIGHTHSh]h⅝}hjsbah}(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>}hj;sbah}(h]h ]h"]gtah$]h&]uh1hhhhKhhhhubh)}(h9.. |half| unicode:: U+000BD .. VULGAR FRACTION ONE HALFh]h½}hjJsbah}(h]h ]h"]halfah$]h&]uh1hhhhK hhhhubh)}(h/.. |horbar| unicode:: U+02015 .. HORIZONTAL BARh]h―}hjYsbah}(h]h ]h"]horbarah$]h&]uh1hhhhK!hhhhubh)}(h'.. |hyphen| unicode:: U+02010 .. HYPHENh]h‐}hjhsbah}(h]h ]h"]hyphenah$]h&]uh1hhhhK"hhhhubh)}(h:.. |iexcl| unicode:: U+000A1 .. INVERTED EXCLAMATION MARKh]h¡}hjwsbah}(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µ}hjsbah}(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 }hj:sbah}(h]h ]h"]nbspah$]h&]uh1hhhhK0hhhhubh)}(h).. |not| unicode:: U+000AC .. NOT SIGNh]h¬}hjIsbah}(h]h ]h"]notah$]h&]uh1hhhhK1hhhhubh)}(h,.. |num| unicode:: U+00023 .. NUMBER SIGNh]h#}hjXsbah}(h]h ]h"]numah$]h&]uh1hhhhK2hhhhubh)}(h).. |ohm| unicode:: U+02126 .. OHM SIGNh]hΩ}hjgsbah}(h]h ]h"]ohmah$]h&]uh1hhhhK3hhhhubh)}(h;.. |ordf| unicode:: U+000AA .. FEMININE ORDINAL INDICATORh]hª}hjvsbah}(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→}hjsbah}(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”}hj9sbah}(h]h ]h"]rdquoah$]h&]uh1hhhhKAhhhhubh)}(h0.. |reg| unicode:: U+000AE .. REGISTERED SIGNh]h®}hjHsbah}(h]h ]h"]regah$]h&]uh1hhhhKBhhhhubh)}(h2.. |rpar| unicode:: U+00029 .. RIGHT PARENTHESISh]h)}hjWsbah}(h]h ]h"]rparah$]h&]uh1hhhhKChhhhubh)}(h5.. |rsqb| unicode:: U+0005D .. RIGHT SQUARE BRACKETh]h]}hjfsbah}(h]h ]h"]rsqbah$]h&]uh1hhhhKDhhhhubh)}(h<.. |rsquo| unicode:: U+02019 .. RIGHT SINGLE QUOTATION MARKh]h’}hjusbah}(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™}hj sbah}(h]h ]h"]tradeah$]h&]uh1hhhhKOhhhhubh)}(h... |uarr| unicode:: U+02191 .. UPWARDS ARROWh]h↑}hjsbah}(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¥}hj8sbah}(h]h ]h"]yenah$]h&]uh1hhhhKRhhhhubhsection)}(hhh](htitle)}(hSystem Suspend Code Flowsh]hSystem Suspend Code Flows}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjIhhhhhKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(h Copyrighth]h Copyright}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjchhhKubh field_body)}(h|copy| 2020 Intel Corporation h]h paragraph)}(h|copy| 2020 Intel Corporationh](h©}(hj~hhhNhNubh 2020 Intel Corporation}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhjxubah}(h]h ]h"]h$]h&]uh1jvhjcubeh}(h]h ]h"]h$]h&]uh1jahhhKhj^hhubjb)}(hhh](jg)}(hAuthorh]hAuthor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jfhjhhhKubjw)}(h/Rafael 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&]uh1j|hhhK hjubah}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ]h"]h$]h&]uh1jahhhK hj^hhubeh}(h]h ]h"]h$]h&]uh1j\hjIhhhhhKubj})}(hXuAt least one global system-wide transition needs to be carried out for the system to get from the working state into one of the supported :doc:`sleep states `. Hibernation requires more than one transition to occur for this purpose, but the other sleep states, commonly referred to as *system-wide suspend* (or simply *system suspend*) states, need only one.h](hAt least one global system-wide transition needs to be carried out for the system to get from the working state into one of the supported }(hjhhhNhNubh)}(h":doc:`sleep states `h]hinline)}(hjh]h sleep states}(hjhhhNhNubah}(h]h ](xrefstdstd-doceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocadmin-guide/pm/suspend-flows refdomainjreftypedoc refexplicitrefwarn reftarget sleep-statesuh1hhhhK hjubh. Hibernation requires more than one transition to occur for this purpose, but the other sleep states, commonly referred to as }(hjhhhNhNubhemphasis)}(h*system-wide suspend*h]hsystem-wide suspend}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (or simply }(hjhhhNhNubj)}(h*system suspend*h]hsystem suspend}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) states, need only one.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhK hjIhhubj})}(hXqFor those sleep states, the transition from the working state of the system into the target sleep state is referred to as *system suspend* too (in the majority of cases, whether this means a transition or a sleep state of the system should be clear from the context) and the transition back from the sleep state into the working state is referred to as *system resume*.h](hzFor those sleep states, the transition from the working state of the system into the target sleep state is referred to as }(hjDhhhNhNubj)}(h*system suspend*h]hsystem suspend}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh too (in the majority of cases, whether this means a transition or a sleep state of the system should be clear from the context) and the transition back from the sleep state into the working state is referred to as }(hjDhhhNhNubj)}(h*system resume*h]h system resume}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubh.}(hjDhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhjIhhubj})}(hXQThe kernel code flows associated with the suspend and resume transitions for different sleep states of the system are quite similar, but there are some significant differences between the :ref:`suspend-to-idle ` code flows and the code flows related to the :ref:`suspend-to-RAM ` and :ref:`standby ` sleep states.h](hThe kernel code flows associated with the suspend and resume transitions for different sleep states of the system are quite similar, but there are some significant differences between the }(hjvhhhNhNubh)}(h:ref:`suspend-to-idle `h]j)}(hjh]hsuspend-to-idle}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj~ubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftyperef refexplicitrefwarnjs2idleuh1hhhhKhjvubh. code flows and the code flows related to the }(hjvhhhNhNubh)}(h:ref:`suspend-to-RAM `h]j)}(hjh]hsuspend-to-RAM}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftyperef refexplicitrefwarnjs2ramuh1hhhhKhjvubh and }(hjvhhhNhNubh)}(h:ref:`standby `h]j)}(hjh]hstandby}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftyperef refexplicitrefwarnjstandbyuh1hhhhKhjvubh sleep states.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhjIhhubj})}(hXThe :ref:`suspend-to-RAM ` and :ref:`standby ` sleep states cannot be implemented without platform support and the difference between them boils down to the platform-specific actions carried out by the suspend and resume hooks that need to be provided by the platform driver to make them available. Apart from that, the suspend and resume code flows for these sleep states are mostly identical, so they both together will be referred to as *platform-dependent suspend* states in what follows.h](hThe }(hjhhhNhNubh)}(h:ref:`suspend-to-RAM `h]j)}(hjh]hsuspend-to-RAM}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftyperef refexplicitrefwarnjs2ramuh1hhhhKhjubh and }(hjhhhNhNubh)}(h:ref:`standby `h]j)}(hjh]hstandby}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj  refdomainj*reftyperef refexplicitrefwarnjstandbyuh1hhhhKhjubhX sleep states cannot be implemented without platform support and the difference between them boils down to the platform-specific actions carried out by the suspend and resume hooks that need to be provided by the platform driver to make them available. Apart from that, the suspend and resume code flows for these sleep states are mostly identical, so they both together will be referred to as }(hjhhhNhNubj)}(h*platform-dependent suspend*h]hplatform-dependent suspend}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh states in what follows.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhjIhhubhtarget)}(h.. _s2idle_suspend:h]h}(h]h ]h"]h$]h&]refids2idle-suspenduh1jXhK~hjIhhhh referencedKubjH)}(hhh](jM)}(h!Suspend-to-idle Suspend Code Flowh]h!Suspend-to-idle Suspend Code Flow}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjghhhhhK+ubj})}(hThe following steps are taken in order to transition the system from the working state to the :ref:`suspend-to-idle ` sleep state:h](h^The following steps are taken in order to transition the system from the working state to the }(hjxhhhNhNubh)}(h:ref:`suspend-to-idle `h]j)}(hjh]hsuspend-to-idle}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftyperef refexplicitrefwarnjs2idleuh1hhhhK-hjxubh sleep state:}(hjxhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhK-hjghhubh block_quote)}(hX 1. Invoking system-wide suspend notifiers. Kernel subsystems can register callbacks to be invoked when the suspend transition is about to occur and when the resume transition has finished. That allows them to prepare for the change of the system state and to clean up after getting back to the working state. 2. Freezing tasks. Tasks are frozen primarily in order to avoid unchecked hardware accesses from user space through MMIO regions or I/O registers exposed directly to it and to prevent user space from entering the kernel while the next step of the transition is in progress (which might have been problematic for various reasons). All user space tasks are intercepted as though they were sent a signal and put into uninterruptible sleep until the end of the subsequent system resume transition. The kernel threads that choose to be frozen during system suspend for specific reasons are frozen subsequently, but they are not intercepted. Instead, they are expected to periodically check whether or not they need to be frozen and to put themselves into uninterruptible sleep if so. [Note, however, that kernel threads can use locking and other concurrency controls available in kernel space to synchronize themselves with system suspend and resume, which can be much more precise than the freezing, so the latter is not a recommended option for kernel threads.] 3. Suspending devices and reconfiguring IRQs. Devices are suspended in four phases called *prepare*, *suspend*, *late suspend* and *noirq suspend* (see :ref:`driverapi_pm_devices` for more information on what exactly happens in each phase). Every device is visited in each phase, but typically it is not physically accessed in more than two of them. The runtime PM API is disabled for every device during the *late* suspend phase and high-level ("action") interrupt handlers are prevented from being invoked before the *noirq* suspend phase. Interrupts are still handled after that, but they are only acknowledged to interrupt controllers without performing any device-specific actions that would be triggered in the working state of the system (those actions are deferred till the subsequent system resume transition as described `below `_). IRQs associated with system wakeup devices are "armed" so that the resume transition of the system is started when one of them signals an event. 4. Freezing the scheduler tick and suspending timekeeping. When all devices have been suspended, CPUs enter the idle loop and are put into the deepest available idle state. While doing that, each of them "freezes" its own scheduler tick so that the timer events associated with the tick do not occur until the CPU is woken up by another interrupt source. The last CPU to enter the idle state also stops the timekeeping which (among other things) prevents high resolution timers from triggering going forward until the first CPU that is woken up restarts the timekeeping. That allows the CPUs to stay in the deep idle state relatively long in one go. From this point on, the CPUs can only be woken up by non-timer hardware interrupts. If that happens, they go back to the idle state unless the interrupt that woke up one of them comes from an IRQ that has been armed for system wakeup, in which case the system resume transition is started. h]henumerated_list)}(hhh](h list_item)}(hX4Invoking system-wide suspend notifiers. Kernel subsystems can register callbacks to be invoked when the suspend transition is about to occur and when the resume transition has finished. That allows them to prepare for the change of the system state and to clean up after getting back to the working state. h](j})}(h'Invoking system-wide suspend notifiers.h]h'Invoking system-wide suspend notifiers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK0hjubj})}(hKernel subsystems can register callbacks to be invoked when the suspend transition is about to occur and when the resume transition has finished.h]hKernel subsystems can register callbacks to be invoked when the suspend transition is about to occur and when the resume transition has finished.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK2hjubj})}(hwThat allows them to prepare for the change of the system state and to clean up after getting back to the working state.h]hwThat allows them to prepare for the change of the system state and to clean up after getting back to the working state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK5hjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hX$Freezing tasks. Tasks are frozen primarily in order to avoid unchecked hardware accesses from user space through MMIO regions or I/O registers exposed directly to it and to prevent user space from entering the kernel while the next step of the transition is in progress (which might have been problematic for various reasons). All user space tasks are intercepted as though they were sent a signal and put into uninterruptible sleep until the end of the subsequent system resume transition. The kernel threads that choose to be frozen during system suspend for specific reasons are frozen subsequently, but they are not intercepted. Instead, they are expected to periodically check whether or not they need to be frozen and to put themselves into uninterruptible sleep if so. [Note, however, that kernel threads can use locking and other concurrency controls available in kernel space to synchronize themselves with system suspend and resume, which can be much more precise than the freezing, so the latter is not a recommended option for kernel threads.] h](j})}(hFreezing tasks.h]hFreezing tasks.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK8hjubj})}(hX6Tasks are frozen primarily in order to avoid unchecked hardware accesses from user space through MMIO regions or I/O registers exposed directly to it and to prevent user space from entering the kernel while the next step of the transition is in progress (which might have been problematic for various reasons).h]hX6Tasks are frozen primarily in order to avoid unchecked hardware accesses from user space through MMIO regions or I/O registers exposed directly to it and to prevent user space from entering the kernel while the next step of the transition is in progress (which might have been problematic for various reasons).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK:hjubj})}(hAll user space tasks are intercepted as though they were sent a signal and put into uninterruptible sleep until the end of the subsequent system resume transition.h]hAll user space tasks are intercepted as though they were sent a signal and put into uninterruptible sleep until the end of the subsequent system resume transition.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK@hjubj})}(hX5The kernel threads that choose to be frozen during system suspend for specific reasons are frozen subsequently, but they are not intercepted. Instead, they are expected to periodically check whether or not they need to be frozen and to put themselves into uninterruptible sleep if so. [Note, however, that kernel threads can use locking and other concurrency controls available in kernel space to synchronize themselves with system suspend and resume, which can be much more precise than the freezing, so the latter is not a recommended option for kernel threads.]h]hX5The kernel threads that choose to be frozen during system suspend for specific reasons are frozen subsequently, but they are not intercepted. Instead, they are expected to periodically check whether or not they need to be frozen and to put themselves into uninterruptible sleep if so. [Note, however, that kernel threads can use locking and other concurrency controls available in kernel space to synchronize themselves with system suspend and resume, which can be much more precise than the freezing, so the latter is not a recommended option for kernel threads.]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKDhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hXSuspending devices and reconfiguring IRQs. Devices are suspended in four phases called *prepare*, *suspend*, *late suspend* and *noirq suspend* (see :ref:`driverapi_pm_devices` for more information on what exactly happens in each phase). Every device is visited in each phase, but typically it is not physically accessed in more than two of them. The runtime PM API is disabled for every device during the *late* suspend phase and high-level ("action") interrupt handlers are prevented from being invoked before the *noirq* suspend phase. Interrupts are still handled after that, but they are only acknowledged to interrupt controllers without performing any device-specific actions that would be triggered in the working state of the system (those actions are deferred till the subsequent system resume transition as described `below `_). IRQs associated with system wakeup devices are "armed" so that the resume transition of the system is started when one of them signals an event. h](j})}(h*Suspending devices and reconfiguring IRQs.h]h*Suspending devices and reconfiguring IRQs.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKMhj-ubj})}(hDevices are suspended in four phases called *prepare*, *suspend*, *late suspend* and *noirq suspend* (see :ref:`driverapi_pm_devices` for more information on what exactly happens in each phase).h](h,Devices are suspended in four phases called }(hj?hhhNhNubj)}(h *prepare*h]hprepare}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh, }(hj?hhhNhNubj)}(h *suspend*h]hsuspend}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh, }(hj?hhhNhNubj)}(h*late suspend*h]h late suspend}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh and }(hj?hhhNhNubj)}(h*noirq suspend*h]h noirq suspend}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh (see }(hj?hhhNhNubh)}(h:ref:`driverapi_pm_devices`h]j)}(hjh]hdriverapi_pm_devices}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj  refdomainjreftyperef refexplicitrefwarnjdriverapi_pm_devicesuh1hhhhKOhj?ubh= for more information on what exactly happens in each phase).}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKOhj-ubj})}(hlEvery device is visited in each phase, but typically it is not physically accessed in more than two of them.h]hlEvery device is visited in each phase, but typically it is not physically accessed in more than two of them.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKShj-ubj})}(hThe runtime PM API is disabled for every device during the *late* suspend phase and high-level ("action") interrupt handlers are prevented from being invoked before the *noirq* suspend phase.h](h;The runtime PM API is disabled for every device during the }(hjhhhNhNubj)}(h*late*h]hlate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhl suspend phase and high-level (“action”) interrupt handlers are prevented from being invoked before the }(hjhhhNhNubj)}(h*noirq*h]hnoirq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh suspend phase.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKVhj-ubj})}(hX<Interrupts are still handled after that, but they are only acknowledged to interrupt controllers without performing any device-specific actions that would be triggered in the working state of the system (those actions are deferred till the subsequent system resume transition as described `below `_).h](hX!Interrupts are still handled after that, but they are only acknowledged to interrupt controllers without performing any device-specific actions that would be triggered in the working state of the system (those actions are deferred till the subsequent system resume transition as described }(hjhhhNhNubj)}(h`below `_h]hbelow}(hj hhhNhNubah}(h]h ]h"]h$]h&]namebelowjd s2idle-resumeuh1jhjresolvedKubjY)}(h h]h}(h]h ]h"]belowah$]h&]jdj uh1jXindirect_reference_name s2idle_resumehjj Kubh).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKZhj-ubj})}(hIRQs associated with system wakeup devices are "armed" so that the resume transition of the system is started when one of them signals an event.h]hIRQs associated with system wakeup devices are “armed” so that the resume transition of the system is started when one of them signals an event.}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK`hj-ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hXFreezing the scheduler tick and suspending timekeeping. When all devices have been suspended, CPUs enter the idle loop and are put into the deepest available idle state. While doing that, each of them "freezes" its own scheduler tick so that the timer events associated with the tick do not occur until the CPU is woken up by another interrupt source. The last CPU to enter the idle state also stops the timekeeping which (among other things) prevents high resolution timers from triggering going forward until the first CPU that is woken up restarts the timekeeping. That allows the CPUs to stay in the deep idle state relatively long in one go. From this point on, the CPUs can only be woken up by non-timer hardware interrupts. If that happens, they go back to the idle state unless the interrupt that woke up one of them comes from an IRQ that has been armed for system wakeup, in which case the system resume transition is started. h](j})}(h7Freezing the scheduler tick and suspending timekeeping.h]h7Freezing the scheduler tick and suspending timekeeping.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKchj> ubj})}(hX(When all devices have been suspended, CPUs enter the idle loop and are put into the deepest available idle state. While doing that, each of them "freezes" its own scheduler tick so that the timer events associated with the tick do not occur until the CPU is woken up by another interrupt source.h]hX,When all devices have been suspended, CPUs enter the idle loop and are put into the deepest available idle state. While doing that, each of them “freezes” its own scheduler tick so that the timer events associated with the tick do not occur until the CPU is woken up by another interrupt source.}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKehj> ubj})}(hX&The last CPU to enter the idle state also stops the timekeeping which (among other things) prevents high resolution timers from triggering going forward until the first CPU that is woken up restarts the timekeeping. That allows the CPUs to stay in the deep idle state relatively long in one go.h]hX&The last CPU to enter the idle state also stops the timekeeping which (among other things) prevents high resolution timers from triggering going forward until the first CPU that is woken up restarts the timekeeping. That allows the CPUs to stay in the deep idle state relatively long in one go.}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKjhj> ubj})}(hX"From this point on, the CPUs can only be woken up by non-timer hardware interrupts. If that happens, they go back to the idle state unless the interrupt that woke up one of them comes from an IRQ that has been armed for system wakeup, in which case the system resume transition is started.h]hX"From this point on, the CPUs can only be woken up by non-timer hardware interrupts. If that happens, they go back to the idle state unless the interrupt that woke up one of them comes from an IRQ that has been armed for system wakeup, in which case the system resume transition is started.}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKphj> ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhK0hjghhubjY)}(h.. _s2idle_resume:h]h}(h]h ]h"]h$]h&]jdj uh1jXhKhjghhhhjfKubeh}(h](!suspend-to-idle-suspend-code-flowjeeh ]h"](!suspend-to-idle suspend code flows2idle_suspendeh$]h&]uh1jGhjIhhhhhK+expect_referenced_by_name}j jZsexpect_referenced_by_id}jejZsjfKubjH)}(hhh](jM)}(h Suspend-to-idle Resume Code Flowh]h Suspend-to-idle Resume Code Flow}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj hhhhhKyubj})}(hThe following steps are taken in order to transition the system from the :ref:`suspend-to-idle ` sleep state into the working state:h](hIThe following steps are taken in order to transition the system from the }(hj hhhNhNubh)}(h:ref:`suspend-to-idle `h]j)}(hj h]hsuspend-to-idle}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj  refdomainj reftyperef refexplicitrefwarnjs2idleuh1hhhhK{hj ubh$ sleep state into the working state:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhK{hj hhubj)}(hX]1. Resuming timekeeping and unfreezing the scheduler tick. When one of the CPUs is woken up (by a non-timer hardware interrupt), it leaves the idle state entered in the last step of the preceding suspend transition, restarts the timekeeping (unless it has been restarted already by another CPU that woke up earlier) and the scheduler tick on that CPU is unfrozen. If the interrupt that has woken up the CPU was armed for system wakeup, the system resume transition begins. 2. Resuming devices and restoring the working-state configuration of IRQs. Devices are resumed in four phases called *noirq resume*, *early resume*, *resume* and *complete* (see :ref:`driverapi_pm_devices` for more information on what exactly happens in each phase). Every device is visited in each phase, but typically it is not physically accessed in more than two of them. The working-state configuration of IRQs is restored after the *noirq* resume phase and the runtime PM API is re-enabled for every device whose driver supports it during the *early* resume phase. 3. Thawing tasks. Tasks frozen in step 2 of the preceding `suspend `_ transition are "thawed", which means that they are woken up from the uninterruptible sleep that they went into at that time and user space tasks are allowed to exit the kernel. 4. Invoking system-wide resume notifiers. This is analogous to step 1 of the `suspend `_ transition and the same set of callbacks is invoked at this point, but a different "notification type" parameter value is passed to them. h]j)}(hhh](j)}(hXResuming timekeeping and unfreezing the scheduler tick. When one of the CPUs is woken up (by a non-timer hardware interrupt), it leaves the idle state entered in the last step of the preceding suspend transition, restarts the timekeeping (unless it has been restarted already by another CPU that woke up earlier) and the scheduler tick on that CPU is unfrozen. If the interrupt that has woken up the CPU was armed for system wakeup, the system resume transition begins. h](j})}(h7Resuming timekeeping and unfreezing the scheduler tick.h]h7Resuming timekeeping and unfreezing the scheduler tick.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhK~hj ubj})}(hX0When one of the CPUs is woken up (by a non-timer hardware interrupt), it leaves the idle state entered in the last step of the preceding suspend transition, restarts the timekeeping (unless it has been restarted already by another CPU that woke up earlier) and the scheduler tick on that CPU is unfrozen.h]hX0When one of the CPUs is woken up (by a non-timer hardware interrupt), it leaves the idle state entered in the last step of the preceding suspend transition, restarts the timekeeping (unless it has been restarted already by another CPU that woke up earlier) and the scheduler tick on that CPU is unfrozen.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hlIf the interrupt that has woken up the CPU was armed for system wakeup, the system resume transition begins.h]hlIf the interrupt that has woken up the CPU was armed for system wakeup, the system resume transition begins.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hX;Resuming devices and restoring the working-state configuration of IRQs. Devices are resumed in four phases called *noirq resume*, *early resume*, *resume* and *complete* (see :ref:`driverapi_pm_devices` for more information on what exactly happens in each phase). Every device is visited in each phase, but typically it is not physically accessed in more than two of them. The working-state configuration of IRQs is restored after the *noirq* resume phase and the runtime PM API is re-enabled for every device whose driver supports it during the *early* resume phase. h](j})}(hGResuming devices and restoring the working-state configuration of IRQs.h]hGResuming devices and restoring the working-state configuration of IRQs.}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj& ubj})}(hDevices are resumed in four phases called *noirq resume*, *early resume*, *resume* and *complete* (see :ref:`driverapi_pm_devices` for more information on what exactly happens in each phase).h](h*Devices are resumed in four phases called }(hj8 hhhNhNubj)}(h*noirq resume*h]h noirq resume}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8 ubh, }(hj8 hhhNhNubj)}(h*early resume*h]h early resume}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8 ubh, }(hj8 hhhNhNubj)}(h*resume*h]hresume}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8 ubh and }(hj8 hhhNhNubj)}(h *complete*h]hcomplete}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8 ubh (see }(hj8 hhhNhNubh)}(h:ref:`driverapi_pm_devices`h]j)}(hj h]hdriverapi_pm_devices}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj  refdomainj reftyperef refexplicitrefwarnjdriverapi_pm_devicesuh1hhhhKhj8 ubh= for more information on what exactly happens in each phase).}(hj8 hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj& ubj})}(hlEvery device is visited in each phase, but typically it is not physically accessed in more than two of them.h]hlEvery device is visited in each phase, but typically it is not physically accessed in more than two of them.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj& ubj})}(hThe working-state configuration of IRQs is restored after the *noirq* resume phase and the runtime PM API is re-enabled for every device whose driver supports it during the *early* resume phase.h](h>The working-state configuration of IRQs is restored after the }(hj hhhNhNubj)}(h*noirq*h]hnoirq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhh resume phase and the runtime PM API is re-enabled for every device whose driver supports it during the }(hj hhhNhNubj)}(h*early*h]hearly}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh resume phase.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj& ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hXThawing tasks. Tasks frozen in step 2 of the preceding `suspend `_ transition are "thawed", which means that they are woken up from the uninterruptible sleep that they went into at that time and user space tasks are allowed to exit the kernel. h](j})}(hThawing tasks.h]hThawing tasks.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hTasks frozen in step 2 of the preceding `suspend `_ transition are "thawed", which means that they are woken up from the uninterruptible sleep that they went into at that time and user space tasks are allowed to exit the kernel.h](h(Tasks frozen in step 2 of the preceding }(hj hhhNhNubj)}(h`suspend `_h]hsuspend}(hj hhhNhNubah}(h]h ]h"]h$]h&]namesuspendjdjeuh1jhj j KubjY)}(h h]h}(h]h ]h"]suspendah$]h&]jdjeuh1jXj s2idle_suspendhj j Kubh transition are “thawed”, which means that they are woken up from the uninterruptible sleep that they went into at that time and user space tasks are allowed to exit the kernel.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hInvoking system-wide resume notifiers. This is analogous to step 1 of the `suspend `_ transition and the same set of callbacks is invoked at this point, but a different "notification type" parameter value is passed to them. h](j})}(h&Invoking system-wide resume notifiers.h]h&Invoking system-wide resume notifiers.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj> ubj})}(hThis is analogous to step 1 of the `suspend `_ transition and the same set of callbacks is invoked at this point, but a different "notification type" parameter value is passed to them.h](h#This is analogous to step 1 of the }(hjP hhhNhNubj)}(h`suspend `_h]hsuspend}(hjX hhhNhNubah}(h]h ]h"]h$]h&]namesuspendjdjeuh1jhjP j KubjY)}(h h]h}(h]h ]h"]suspendah$]h&]jdjeuh1jXj s2idle_suspendhjP j Kubh transition and the same set of callbacks is invoked at this point, but a different “notification type” parameter value is passed to them.}(hjP hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj> ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]j j j hj j uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhK~hj hhubeh}(h]( suspend-to-idle-resume-code-flowj eh ]h"]( suspend-to-idle resume code flow s2idle_resumeeh$]h&]uh1jGhjIhhhhhKyj }j j sj }j j sjfKubjH)}(hhh](jM)}(h$Platform-dependent Suspend Code Flowh]h$Platform-dependent Suspend Code Flow}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhj hhhhhKubj})}(h{The following steps are taken in order to transition the system from the working state to platform-dependent suspend state:h]h{The following steps are taken in order to transition the system from the working state to platform-dependent suspend state:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj hhubj)}(hXr 1. Invoking system-wide suspend notifiers. This step is the same as step 1 of the suspend-to-idle suspend transition described `above `_. 2. Freezing tasks. This step is the same as step 2 of the suspend-to-idle suspend transition described `above `_. 3. Suspending devices and reconfiguring IRQs. This step is analogous to step 3 of the suspend-to-idle suspend transition described `above `_, but the arming of IRQs for system wakeup generally does not have any effect on the platform. There are platforms that can go into a very deep low-power state internally when all CPUs in them are in sufficiently deep idle states and all I/O devices have been put into low-power states. On those platforms, suspend-to-idle can reduce system power very effectively. On the other platforms, however, low-level components (like interrupt controllers) need to be turned off in a platform-specific way (implemented in the hooks provided by the platform driver) to achieve comparable power reduction. That usually prevents in-band hardware interrupts from waking up the system, which must be done in a special platform-dependent way. Then, the configuration of system wakeup sources usually starts when system wakeup devices are suspended and is finalized by the platform suspend hooks later on. 4. Disabling non-boot CPUs. On some platforms the suspend hooks mentioned above must run in a one-CPU configuration of the system (in particular, the hardware cannot be accessed by any code running in parallel with the platform suspend hooks that may, and often do, trap into the platform firmware in order to finalize the suspend transition). For this reason, the CPU offline/online (CPU hotplug) framework is used to take all of the CPUs in the system, except for one (the boot CPU), offline (typically, the CPUs that have been taken offline go into deep idle states). This means that all tasks are migrated away from those CPUs and all IRQs are rerouted to the only CPU that remains online. 5. Suspending core system components. This prepares the core system components for (possibly) losing power going forward and suspends the timekeeping. 6. Platform-specific power removal. This is expected to remove power from all of the system components except for the memory controller and RAM (in order to preserve the contents of the latter) and some devices designated for system wakeup. In many cases control is passed to the platform firmware which is expected to finalize the suspend transition as needed. h]j)}(hhh](j)}(hInvoking system-wide suspend notifiers. This step is the same as step 1 of the suspend-to-idle suspend transition described `above `_. h](j})}(h'Invoking system-wide suspend notifiers.h]h'Invoking system-wide suspend notifiers.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hoThis step is the same as step 1 of the suspend-to-idle suspend transition described `above `_.h](hTThis step is the same as step 1 of the suspend-to-idle suspend transition described }(hj hhhNhNubj)}(h`above `_h]habove}(hj hhhNhNubah}(h]h ]h"]h$]h&]nameabovejdjeuh1jhj j KubjY)}(h h]h}(h]h ]h"]aboveah$]h&]jdjeuh1jXj s2idle_suspendhj j Kubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hFreezing tasks. This step is the same as step 2 of the suspend-to-idle suspend transition described `above `_. h](j})}(hFreezing tasks.h]hFreezing tasks.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hoThis step is the same as step 2 of the suspend-to-idle suspend transition described `above `_.h](hTThis step is the same as step 2 of the suspend-to-idle suspend transition described }(hj hhhNhNubj)}(h`above `_h]habove}(hj! hhhNhNubah}(h]h ]h"]h$]h&]nameabovejdjeuh1jhj j KubjY)}(h h]h}(h]h ]h"]aboveah$]h&]jdjeuh1jXj s2idle_suspendhj j Kubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hXSuspending devices and reconfiguring IRQs. This step is analogous to step 3 of the suspend-to-idle suspend transition described `above `_, but the arming of IRQs for system wakeup generally does not have any effect on the platform. There are platforms that can go into a very deep low-power state internally when all CPUs in them are in sufficiently deep idle states and all I/O devices have been put into low-power states. On those platforms, suspend-to-idle can reduce system power very effectively. On the other platforms, however, low-level components (like interrupt controllers) need to be turned off in a platform-specific way (implemented in the hooks provided by the platform driver) to achieve comparable power reduction. That usually prevents in-band hardware interrupts from waking up the system, which must be done in a special platform-dependent way. Then, the configuration of system wakeup sources usually starts when system wakeup devices are suspended and is finalized by the platform suspend hooks later on. h](j})}(h*Suspending devices and reconfiguring IRQs.h]h*Suspending devices and reconfiguring IRQs.}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjM ubj})}(hThis step is analogous to step 3 of the suspend-to-idle suspend transition described `above `_, but the arming of IRQs for system wakeup generally does not have any effect on the platform.h](hUThis step is analogous to step 3 of the suspend-to-idle suspend transition described }(hj_ hhhNhNubj)}(h`above `_h]habove}(hjg hhhNhNubah}(h]h ]h"]h$]h&]nameabovejdjeuh1jhj_ j KubjY)}(h h]h}(h]h ]h"]aboveah$]h&]jdjeuh1jXj s2idle_suspendhj_ j Kubh^, but the arming of IRQs for system wakeup generally does not have any effect on the platform.}(hj_ hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhKhjM ubj})}(hXThere are platforms that can go into a very deep low-power state internally when all CPUs in them are in sufficiently deep idle states and all I/O devices have been put into low-power states. On those platforms, suspend-to-idle can reduce system power very effectively.h]hXThere are platforms that can go into a very deep low-power state internally when all CPUs in them are in sufficiently deep idle states and all I/O devices have been put into low-power states. On those platforms, suspend-to-idle can reduce system power very effectively.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjM ubj})}(hOn the other platforms, however, low-level components (like interrupt controllers) need to be turned off in a platform-specific way (implemented in the hooks provided by the platform driver) to achieve comparable power reduction.h]hOn the other platforms, however, low-level components (like interrupt controllers) need to be turned off in a platform-specific way (implemented in the hooks provided by the platform driver) to achieve comparable power reduction.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjM ubj})}(hX'That usually prevents in-band hardware interrupts from waking up the system, which must be done in a special platform-dependent way. Then, the configuration of system wakeup sources usually starts when system wakeup devices are suspended and is finalized by the platform suspend hooks later on.h]hX'That usually prevents in-band hardware interrupts from waking up the system, which must be done in a special platform-dependent way. Then, the configuration of system wakeup sources usually starts when system wakeup devices are suspended and is finalized by the platform suspend hooks later on.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjM ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hXDisabling non-boot CPUs. On some platforms the suspend hooks mentioned above must run in a one-CPU configuration of the system (in particular, the hardware cannot be accessed by any code running in parallel with the platform suspend hooks that may, and often do, trap into the platform firmware in order to finalize the suspend transition). For this reason, the CPU offline/online (CPU hotplug) framework is used to take all of the CPUs in the system, except for one (the boot CPU), offline (typically, the CPUs that have been taken offline go into deep idle states). This means that all tasks are migrated away from those CPUs and all IRQs are rerouted to the only CPU that remains online. h](j})}(hDisabling non-boot CPUs.h]hDisabling non-boot CPUs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hX;On some platforms the suspend hooks mentioned above must run in a one-CPU configuration of the system (in particular, the hardware cannot be accessed by any code running in parallel with the platform suspend hooks that may, and often do, trap into the platform firmware in order to finalize the suspend transition).h]hX;On some platforms the suspend hooks mentioned above must run in a one-CPU configuration of the system (in particular, the hardware cannot be accessed by any code running in parallel with the platform suspend hooks that may, and often do, trap into the platform firmware in order to finalize the suspend transition).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hFor this reason, the CPU offline/online (CPU hotplug) framework is used to take all of the CPUs in the system, except for one (the boot CPU), offline (typically, the CPUs that have been taken offline go into deep idle states).h]hFor this reason, the CPU offline/online (CPU hotplug) framework is used to take all of the CPUs in the system, except for one (the boot CPU), offline (typically, the CPUs that have been taken offline go into deep idle states).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hzThis means that all tasks are migrated away from those CPUs and all IRQs are rerouted to the only CPU that remains online.h]hzThis means that all tasks are migrated away from those CPUs and all IRQs are rerouted to the only CPU that remains online.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hSuspending core system components. This prepares the core system components for (possibly) losing power going forward and suspends the timekeeping. h](j})}(h"Suspending core system components.h]h"Suspending core system components.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hpThis prepares the core system components for (possibly) losing power going forward and suspends the timekeeping.h]hpThis prepares the core system components for (possibly) losing power going forward and suspends the timekeeping.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hXjPlatform-specific power removal. This is expected to remove power from all of the system components except for the memory controller and RAM (in order to preserve the contents of the latter) and some devices designated for system wakeup. In many cases control is passed to the platform firmware which is expected to finalize the suspend transition as needed. h](j})}(h Platform-specific power removal.h]h Platform-specific power removal.}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj% ubj})}(hThis is expected to remove power from all of the system components except for the memory controller and RAM (in order to preserve the contents of the latter) and some devices designated for system wakeup.h]hThis is expected to remove power from all of the system components except for the memory controller and RAM (in order to preserve the contents of the latter) and some devices designated for system wakeup.}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj% ubj})}(hxIn many cases control is passed to the platform firmware which is expected to finalize the suspend transition as needed.h]hxIn many cases control is passed to the platform firmware which is expected to finalize the suspend transition as needed.}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj% ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]j j j hj j uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhj hhubeh}(h]$platform-dependent-suspend-code-flowah ]h"]$platform-dependent suspend code flowah$]h&]uh1jGhjIhhhhhKubjH)}(hhh](jM)}(h#Platform-dependent Resume Code Flowh]h#Platform-dependent Resume Code Flow}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1jLhjm hhhhhKubj})}(hThe following steps are taken in order to transition the system from a platform-dependent suspend state into the working state:h]hThe following steps are taken in order to transition the system from a platform-dependent suspend state into the working state:}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhjm hhubj)}(hX1. Platform-specific system wakeup. The platform is woken up by a signal from one of the designated system wakeup devices (which need not be an in-band hardware interrupt) and control is passed back to the kernel (the working configuration of the platform may need to be restored by the platform firmware before the kernel gets control again). 2. Resuming core system components. The suspend-time configuration of the core system components is restored and the timekeeping is resumed. 3. Re-enabling non-boot CPUs. The CPUs disabled in step 4 of the preceding suspend transition are taken back online and their suspend-time configuration is restored. 4. Resuming devices and restoring the working-state configuration of IRQs. This step is the same as step 2 of the suspend-to-idle suspend transition described `above `_. 5. Thawing tasks. This step is the same as step 3 of the suspend-to-idle suspend transition described `above `_. 6. Invoking system-wide resume notifiers. This step is the same as step 4 of the suspend-to-idle suspend transition described `above `_.10h]j)}(hhh](j)}(hXWPlatform-specific system wakeup. The platform is woken up by a signal from one of the designated system wakeup devices (which need not be an in-band hardware interrupt) and control is passed back to the kernel (the working configuration of the platform may need to be restored by the platform firmware before the kernel gets control again). h](j})}(h Platform-specific system wakeup.h]h Platform-specific system wakeup.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hX4The platform is woken up by a signal from one of the designated system wakeup devices (which need not be an in-band hardware interrupt) and control is passed back to the kernel (the working configuration of the platform may need to be restored by the platform firmware before the kernel gets control again).h]hX4The platform is woken up by a signal from one of the designated system wakeup devices (which need not be an in-band hardware interrupt) and control is passed back to the kernel (the working configuration of the platform may need to be restored by the platform firmware before the kernel gets control again).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hResuming core system components. The suspend-time configuration of the core system components is restored and the timekeeping is resumed. h](j})}(h Resuming core system components.h]h Resuming core system components.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hhThe suspend-time configuration of the core system components is restored and the timekeeping is resumed.h]hhThe suspend-time configuration of the core system components is restored and the timekeeping is resumed.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hRe-enabling non-boot CPUs. The CPUs disabled in step 4 of the preceding suspend transition are taken back online and their suspend-time configuration is restored. h](j})}(hRe-enabling non-boot CPUs.h]hRe-enabling non-boot CPUs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubj})}(hThe CPUs disabled in step 4 of the preceding suspend transition are taken back online and their suspend-time configuration is restored.h]hThe CPUs disabled in step 4 of the preceding suspend transition are taken back online and their suspend-time configuration is restored.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhKhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hResuming devices and restoring the working-state configuration of IRQs. This step is the same as step 2 of the suspend-to-idle suspend transition described `above `_. h](j})}(hGResuming devices and restoring the working-state configuration of IRQs.h]hGResuming devices and restoring the working-state configuration of IRQs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhMhjubj})}(hnThis step is the same as step 2 of the suspend-to-idle suspend transition described `above `_.h](hTThis step is the same as step 2 of the suspend-to-idle suspend transition described }(hjhhhNhNubj)}(h`above `_h]habove}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameabovejdj uh1jhjj KubjY)}(h h]h}(h]h ]h"]aboveah$]h&]jdj uh1jXj s2idle_resumehjj Kubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhMhjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hThawing tasks. This step is the same as step 3 of the suspend-to-idle suspend transition described `above `_. h](j})}(hThawing tasks.h]hThawing tasks.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhMhjKubj})}(hnThis step is the same as step 3 of the suspend-to-idle suspend transition described `above `_.h](hTThis step is the same as step 3 of the suspend-to-idle suspend transition described }(hj]hhhNhNubj)}(h`above `_h]habove}(hjehhhNhNubah}(h]h ]h"]h$]h&]nameabovejdj uh1jhj]j KubjY)}(h h]h}(h]h ]h"]aboveah$]h&]jdj uh1jXj s2idle_resumehj]j Kubh.}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhMhjKubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hInvoking system-wide resume notifiers. This step is the same as step 4 of the suspend-to-idle suspend transition described `above `_.h](j})}(h&Invoking system-wide resume notifiers.h]h&Invoking system-wide resume notifiers.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j|hhhM hjubj})}(hnThis step is the same as step 4 of the suspend-to-idle suspend transition described `above `_.h](hTThis step is the same as step 4 of the suspend-to-idle suspend transition described }(hjhhhNhNubj)}(h`above `_h]habove}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameabovejdj uh1jhjj KubjY)}(h h]h}(h]h ]h"]aboveah$]h&]jdj uh1jXj s2idle_resumehjj Kubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j|hhhM hjubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]j j j hj j uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhjm hhubeh}(h]#platform-dependent-resume-code-flowah ]h"]#platform-dependent resume code flowah$]h&]uh1jGhjIhhhhhKubeh}(h]system-suspend-code-flowsah ]h"]system suspend code flowsah$]h&]uh1jGhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(jLN 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_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets](j j" jh j j1 jw j/jujesubstitution_defs}(hhhhhhj jjjj*jj9j-jHj<jWjKjfjZjujijjxjjjjjjjjjjjjjjjjj jjjj)jj8j,jGj;jVjJjejYjtjhjjwjjjjjjjjjjjjjjjjj jjj j(jj7j+jFj:jUjIjdjXjsjgjjvjjjjjjjjjjjjjjjjj jjj j'jj6j*jEj9jTjHjcjWjrjfjjujjjjjjjjjjjjjjjjjjjj j&jj5j)jDj8usubstitution_names}(amphߌaposhasthbrvbarj bsoljcentj*colonj9commajHcommatjWcopyjfcurrenjudarrjdegjdividejdollarjequalsjexcljfrac12jfrac14jfrac18jfrac34j frac38jfrac58j)frac78j8gtjGhalfjVhorbarjehyphenjtiexcljiquestjlaquojlarrjlcubjldquojlowbarjlparjlsqbjlsquoj ltjmicroj(middotj7nbspjFnotjUnumjdohmjsordfjordmjparajpercntjperiodjplusjplusmnjpoundjquestjquotj raquojrarrj'rcubj6rdquojEregjTrparjcrsqbjrrsquojsectjsemijshyjsoljsungjsup1jsup2jsup3jtimesjtradejuarrj&verbarj5yenjDurefnames}( s2idle_resume](j j j/jjujejjes2idle_suspend](j" j jh jX j j j1 j! jw jg eurefids}(je](jZj" jh j j1 jw ej ](j j j/jujeunameids}(jjj jej j j j j j jj jg jju nametypes}(jj j j j jj juh}(jjIjejgj jgj j j j jg j jjm 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](hsystem_message)}(hhh]j})}(hhh]h+Hyperlink target "below" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKZuh1jubj)}(hhh]j})}(hhh]h-Hyperlink target "suspend" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]j})}(hhh]h-Hyperlink target "suspend" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]j})}(hhh]h+Hyperlink target "above" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]j})}(hhh]h+Hyperlink target "above" is not referenced.}hj:sbah}(h]h ]h"]h$]h&]uh1j|hj7ubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]j})}(hhh]h+Hyperlink target "above" is not referenced.}hjTsbah}(h]h ]h"]h$]h&]uh1j|hjQubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineKuh1jubj)}(hhh]j})}(hhh]h+Hyperlink target "above" is not referenced.}hjnsbah}(h]h ]h"]h$]h&]uh1j|hjkubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMuh1jubj)}(hhh]j})}(hhh]h+Hyperlink target "above" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineMuh1jubj)}(hhh]j})}(hhh]h+Hyperlink target "above" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1j|hjubah}(h]h ]h"]h$]h&]levelKtypejsourcehlineM uh1jube transformerN include_log].Documentation/admin-guide/pm/suspend-flows.rst(NNNNta decorationNhhub.