€•‘Œsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ/translations/zh_CN/power/pci”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/zh_TW/power/pci”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/it_IT/power/pci”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ja_JP/power/pci”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ko_KR/power/pci”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/pt_BR/power/pci”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/sp_SP/power/pci”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒPCI Power Management”h]”hŒPCI Power Management”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³Œ7/var/lib/git/docbuild/linux/Documentation/power/pci.rst”h´KubhŒ paragraph”“”)�”}”(hŒ?Copyright (c) 2010 Rafael J. Wysocki , Novell Inc.”h]”(hŒ&Copyright (c) 2010 Rafael J. Wysocki <”…”�”}”(hhÍh²hh³Nh´NubhŒ reference”“”)�”}”(hŒ rjw@sisk.pl”h]”hŒ rjw@sisk.pl”…”�”}”(hh×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:rjw@sisk.pl”uh1hÕhhÍubhŒ>, Novell Inc.”…”�”}”(hhÍh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hŒ©An overview of concepts and the Linux kernel's interfaces related to PCI power management. Based on previous work by Patrick Mochel (and others).”h]”(hŒˆAn overview of concepts and the Linux kernel’s interfaces related to PCI power management. Based on previous work by Patrick Mochel <”…”�”}”(hhñh²hh³Nh´NubhÖ)�”}”(hŒmochel@transmeta.com”h]”hŒmochel@transmeta.com”…”�”}”(hhùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:mochel@transmeta.com”uh1hÕhhñubhŒ> (and others).”…”�”}”(hhñh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hXThis document only covers the aspects of power management specific to PCI devices. For general description of the kernel's interfaces related to device power management refer to Documentation/driver-api/pm/devices.rst and Documentation/power/runtime_pm.rst.”h]”hXThis document only covers the aspects of power management specific to PCI devices. For general description of the kernel’s interfaces related to device power management refer to Documentation/driver-api/pm/devices.rst and Documentation/power/runtime_pm.rst.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hh·h²hubhŒcomment”“”)�”}”(hŒ©contents: 1. Hardware and Platform Support for PCI Power Management 2. PCI Subsystem and Device Power Management 3. PCI Device Drivers and Power Management 4. Resources”h]”hŒ©contents: 1. Hardware and Platform Support for PCI Power Management 2. PCI Subsystem and Device Power Management 3. PCI Device Drivers and Power Management 4. Resources”…”�”}”hj#sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j!hh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ91. Hardware and Platform Support for PCI Power Management”h]”hŒ91. Hardware and Platform Support for PCI Power Management”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj3h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ/1.1. Native and Platform-Based Power Management”h]”hŒ/1.1. Native and Platform-Based Power Management”…”�”}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjDh²hh³hÊh´KubhÌ)�”}”(hŒËIn general, power management is a feature allowing one to save energy by putting devices into states in which they draw less power (low-power states) at the price of reduced functionality or performance.”h]”hŒËIn general, power management is a feature allowing one to save energy by putting devices into states in which they draw less power (low-power states) at the price of reduced functionality or performance.”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KhjDh²hubhÌ)�”}”(hXŸUsually, a device is put into a low-power state when it is underutilized or completely inactive. However, when it is necessary to use the device once again, it has to be put back into the "fully functional" state (full-power state). This may happen when there are some data for the device to handle or as a result of an external event requiring the device to be active, which may be signaled by the device itself.”h]”hX£Usually, a device is put into a low-power state when it is underutilized or completely inactive. However, when it is necessary to use the device once again, it has to be put back into the “fully functionalâ€� state (full-power state). This may happen when there are some data for the device to handle or as a result of an external event requiring the device to be active, which may be signaled by the device itself.”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K"hjDh²hubhÌ)�”}”(hXYPCI devices may be put into low-power states in two ways, by using the device capabilities introduced by the PCI Bus Power Management Interface Specification, or with the help of platform firmware, such as an ACPI BIOS. In the first approach, that is referred to as the native PCI power management (native PCI PM) in what follows, the device power state is changed as a result of writing a specific value into one of its standard configuration registers. The second approach requires the platform firmware to provide special methods that may be used by the kernel to change the device's power state.”h]”hX[PCI devices may be put into low-power states in two ways, by using the device capabilities introduced by the PCI Bus Power Management Interface Specification, or with the help of platform firmware, such as an ACPI BIOS. In the first approach, that is referred to as the native PCI power management (native PCI PM) in what follows, the device power state is changed as a result of writing a specific value into one of its standard configuration registers. The second approach requires the platform firmware to provide special methods that may be used by the kernel to change the device’s power state.”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K)hjDh²hubhÌ)�”}”(hXòDevices supporting the native PCI PM usually can generate wakeup signals called Power Management Events (PMEs) to let the kernel know about external events requiring the device to be active. After receiving a PME the kernel is supposed to put the device that sent it into the full-power state. However, the PCI Bus Power Management Interface Specification doesn't define any standard method of delivering the PME from the device to the CPU and the operating system kernel. It is assumed that the platform firmware will perform this task and therefore, even though a PCI device is set up to generate PMEs, it also may be necessary to prepare the platform firmware for notifying the CPU of the PMEs coming from the device (e.g. by generating interrupts).”h]”hXôDevices supporting the native PCI PM usually can generate wakeup signals called Power Management Events (PMEs) to let the kernel know about external events requiring the device to be active. After receiving a PME the kernel is supposed to put the device that sent it into the full-power state. However, the PCI Bus Power Management Interface Specification doesn’t define any standard method of delivering the PME from the device to the CPU and the operating system kernel. It is assumed that the platform firmware will perform this task and therefore, even though a PCI device is set up to generate PMEs, it also may be necessary to prepare the platform firmware for notifying the CPU of the PMEs coming from the device (e.g. by generating interrupts).”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K2hjDh²hubhÌ)�”}”(hXŠIn turn, if the methods provided by the platform firmware are used for changing the power state of a device, usually the platform also provides a method for preparing the device to generate wakeup signals. In that case, however, it often also is necessary to prepare the device for generating PMEs using the native PCI PM mechanism, because the method provided by the platform depends on that.”h]”hXŠIn turn, if the methods provided by the platform firmware are used for changing the power state of a device, usually the platform also provides a method for preparing the device to generate wakeup signals. In that case, however, it often also is necessary to prepare the device for generating PMEs using the native PCI PM mechanism, because the method provided by the platform depends on that.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K=hjDh²hubhÌ)�”}”(hŒ—Thus in many situations both the native and the platform-based power management mechanisms have to be used simultaneously to obtain the desired result.”h]”hŒ—Thus in many situations both the native and the platform-based power management mechanisms have to be used simultaneously to obtain the desired result.”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KDhjDh²hubeh}”(h]”Œ*native-and-platform-based-power-management”ah ]”h"]”Œ/1.1. native and platform-based power management”ah$]”h&]”uh1hµhj3h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ 1.2. Native PCI Power Management”h]”hŒ 1.2. Native PCI Power Management”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj±h²hh³hÊh´KHubhÌ)�”}”(hŒáThe PCI Bus Power Management Interface Specification (PCI PM Spec) was introduced between the PCI 2.1 and PCI 2.2 Specifications. It defined a standard interface for performing various operations related to power management.”h]”hŒáThe PCI Bus Power Management Interface Specification (PCI PM Spec) was introduced between the PCI 2.1 and PCI 2.2 Specifications. It defined a standard interface for performing various operations related to power management.”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KJhj±h²hubhÌ)�”}”(hXdThe implementation of the PCI PM Spec is optional for conventional PCI devices, but it is mandatory for PCI Express devices. If a device supports the PCI PM Spec, it has an 8 byte power management capability field in its PCI configuration space. This field is used to describe and control the standard features related to the native PCI power management.”h]”hXdThe implementation of the PCI PM Spec is optional for conventional PCI devices, but it is mandatory for PCI Express devices. If a device supports the PCI PM Spec, it has an 8 byte power management capability field in its PCI configuration space. This field is used to describe and control the standard features related to the native PCI power management.”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KOhj±h²hubhÌ)�”}”(hX3The PCI PM Spec defines 4 operating states for devices (D0-D3) and for buses (B0-B3). The higher the number, the less power is drawn by the device or bus in that state. However, the higher the number, the longer the latency for the device or bus to return to the full-power state (D0 or B0, respectively).”h]”hX3The PCI PM Spec defines 4 operating states for devices (D0-D3) and for buses (B0-B3). The higher the number, the less power is drawn by the device or bus in that state. However, the higher the number, the longer the latency for the device or bus to return to the full-power state (D0 or B0, respectively).”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KUhj±h²hubhÌ)�”}”(hXThere are two variants of the D3 state defined by the specification. The first one is D3hot, referred to as the software accessible D3, because devices can be programmed to go into it. The second one, D3cold, is the state that PCI devices are in when the supply voltage (Vcc) is removed from them. It is not possible to program a PCI device to go into D3cold, although there may be a programmable interface for putting the bus the device is on into a state in which Vcc is removed from all devices on the bus.”h]”hXThere are two variants of the D3 state defined by the specification. The first one is D3hot, referred to as the software accessible D3, because devices can be programmed to go into it. The second one, D3cold, is the state that PCI devices are in when the supply voltage (Vcc) is removed from them. It is not possible to program a PCI device to go into D3cold, although there may be a programmable interface for putting the bus the device is on into a state in which Vcc is removed from all devices on the bus.”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KZhj±h²hubhÌ)�”}”(hŒ•PCI bus power management, however, is not supported by the Linux kernel at the time of this writing and therefore it is not covered by this document.”h]”hŒ•PCI bus power management, however, is not supported by the Linux kernel at the time of this writing and therefore it is not covered by this document.”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kbhj±h²hubhÌ)�”}”(hX-Note that every PCI device can be in the full-power state (D0) or in D3cold, regardless of whether or not it implements the PCI PM Spec. In addition to that, if the PCI PM Spec is implemented by the device, it must support D3hot as well as D0. The support for the D1 and D2 power states is optional.”h]”hX-Note that every PCI device can be in the full-power state (D0) or in D3cold, regardless of whether or not it implements the PCI PM Spec. In addition to that, if the PCI PM Spec is implemented by the device, it must support D3hot as well as D0. The support for the D1 and D2 power states is optional.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kehj±h²hubhÌ)�”}”(hXfPCI devices supporting the PCI PM Spec can be programmed to go to any of the supported low-power states (except for D3cold). While in D1-D3hot the standard configuration registers of the device must be accessible to software (i.e. the device is required to respond to PCI configuration accesses), although its I/O and memory spaces are then disabled. This allows the device to be programmatically put into D0. Thus the kernel can switch the device back and forth between D0 and the supported low-power states (except for D3cold) and the possible power state transitions the device can undergo are the following:”h]”hXfPCI devices supporting the PCI PM Spec can be programmed to go to any of the supported low-power states (except for D3cold). While in D1-D3hot the standard configuration registers of the device must be accessible to software (i.e. the device is required to respond to PCI configuration accesses), although its I/O and memory spaces are then disabled. This allows the device to be programmatically put into D0. Thus the kernel can switch the device back and forth between D0 and the supported low-power states (except for D3cold) and the possible power state transitions the device can undergo are the following:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kjhj±h²hubhŒtable”“”)�”}”(hhh]”hŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j.hj+ubhŒtbody”“”)�”}”(hhh]”(hŒrow”“”)�”}”(hhh]”hŒentry”“”)�”}”(hhh]”hÌ)�”}”(hŒCurrent State | New State”h]”hŒCurrent State | New State”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KthjFubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjAubah}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubj@)�”}”(hhh]”jE)�”}”(hhh]”hÌ)�”}”(hŒD0 | D1, D2, D3”h]”hŒD0 | D1, D2, D3”…”�”}”(hjih²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kvhjfubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjcubah}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubj@)�”}”(hhh]”jE)�”}”(hhh]”hÌ)�”}”(hŒD1 | D2, D3”h]”hŒD1 | D2, D3”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kxhj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjƒubah}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubj@)�”}”(hhh]”jE)�”}”(hhh]”hÌ)�”}”(hŒD2 | D3”h]”hŒD2 | D3”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kzhj¦ubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubj@)�”}”(hhh]”jE)�”}”(hhh]”hÌ)�”}”(hŒD1, D2, D3 | D0”h]”hŒD1, D2, D3 | D0”…”�”}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K|hjÆubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhjÃubah}”(h]”h ]”h"]”h$]”h&]”uh1j?hj<ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j:hj+ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j)hj&ubah}”(h]”h ]”h"]”h$]”h&]”uh1j$hj±h²hh³hÊh´NubhÌ)�”}”(hXThe transition from D3cold to D0 occurs when the supply voltage is provided to the device (i.e. power is restored). In that case the device returns to D0 with a full power-on reset sequence and the power-on defaults are restored to the device by hardware just as at initial power up.”h]”hXThe transition from D3cold to D0 occurs when the supply voltage is provided to the device (i.e. power is restored). In that case the device returns to D0 with a full power-on reset sequence and the power-on defaults are restored to the device by hardware just as at initial power up.”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khj±h²hubhÌ)�”}”(hXœPCI devices supporting the PCI PM Spec can be programmed to generate PMEs while in any power state (D0-D3), but they are not required to be capable of generating PMEs from all supported power states. In particular, the capability of generating PMEs from D3cold is optional and depends on the presence of additional voltage (3.3Vaux) allowing the device to remain sufficiently active to generate a wakeup signal.”h]”hXœPCI devices supporting the PCI PM Spec can be programmed to generate PMEs while in any power state (D0-D3), but they are not required to be capable of generating PMEs from all supported power states. In particular, the capability of generating PMEs from D3cold is optional and depends on the presence of additional voltage (3.3Vaux) allowing the device to remain sufficiently active to generate a wakeup signal.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K„hj±h²hubeh}”(h]”Œnative-pci-power-management”ah ]”h"]”Œ 1.2. native pci power management”ah$]”h&]”uh1hµhj3h²hh³hÊh´KHubh¶)�”}”(hhh]”(h»)�”}”(hŒ!1.3. ACPI Device Power Management”h]”hŒ!1.3. ACPI Device Power Management”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´KŒubhÌ)�”}”(hXYThe platform firmware support for the power management of PCI devices is system-specific. However, if the system in question is compliant with the Advanced Configuration and Power Interface (ACPI) Specification, like the majority of x86-based systems, it is supposed to implement device power management interfaces defined by the ACPI standard.”h]”hXYThe platform firmware support for the power management of PCI devices is system-specific. However, if the system in question is compliant with the Advanced Configuration and Power Interface (ACPI) Specification, like the majority of x86-based systems, it is supposed to implement device power management interfaces defined by the ACPI standard.”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KŽhjh²hubhÌ)�”}”(hX–For this purpose the ACPI BIOS provides special functions called "control methods" that may be executed by the kernel to perform specific tasks, such as putting a device into a low-power state. These control methods are encoded using special byte-code language called the ACPI Machine Language (AML) and stored in the machine's BIOS. The kernel loads them from the BIOS and executes them as needed using an AML interpreter that translates the AML byte code into computations and memory or I/O space accesses. This way, in theory, a BIOS writer can provide the kernel with a means to perform actions depending on the system design in a system-specific fashion.”h]”hXœFor this purpose the ACPI BIOS provides special functions called “control methodsâ€� that may be executed by the kernel to perform specific tasks, such as putting a device into a low-power state. These control methods are encoded using special byte-code language called the ACPI Machine Language (AML) and stored in the machine’s BIOS. The kernel loads them from the BIOS and executes them as needed using an AML interpreter that translates the AML byte code into computations and memory or I/O space accesses. This way, in theory, a BIOS writer can provide the kernel with a means to perform actions depending on the system design in a system-specific fashion.”…”�”}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K”hjh²hubhÌ)�”}”(hXÒACPI control methods may be divided into global control methods, that are not associated with any particular devices, and device control methods, that have to be defined separately for each device supposed to be handled with the help of the platform. This means, in particular, that ACPI device control methods can only be used to handle devices that the BIOS writer knew about in advance. The ACPI methods used for device power management fall into that category.”h]”hXÒACPI control methods may be divided into global control methods, that are not associated with any particular devices, and device control methods, that have to be defined separately for each device supposed to be handled with the help of the platform. This means, in particular, that ACPI device control methods can only be used to handle devices that the BIOS writer knew about in advance. The ACPI methods used for device power management fall into that category.”…”�”}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kžhjh²hubhÌ)�”}”(hX>The ACPI specification assumes that devices can be in one of four power states labeled as D0, D1, D2, and D3 that roughly correspond to the native PCI PM D0-D3 states (although the difference between D3hot and D3cold is not taken into account by ACPI). Moreover, for each power state of a device there is a set of power resources that have to be enabled for the device to be put into that state. These power resources are controlled (i.e. enabled or disabled) with the help of their own control methods, _ON and _OFF, that have to be defined individually for each of them.”h]”hX>The ACPI specification assumes that devices can be in one of four power states labeled as D0, D1, D2, and D3 that roughly correspond to the native PCI PM D0-D3 states (although the difference between D3hot and D3cold is not taken into account by ACPI). Moreover, for each power state of a device there is a set of power resources that have to be enabled for the device to be put into that state. These power resources are controlled (i.e. enabled or disabled) with the help of their own control methods, _ON and _OFF, that have to be defined individually for each of them.”…”�”}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K¥hjh²hubhÌ)�”}”(hX2To put a device into the ACPI power state Dx (where x is a number between 0 and 3 inclusive) the kernel is supposed to (1) enable the power resources required by the device in this state using their _ON control methods and (2) execute the _PSx control method defined for the device. In addition to that, if the device is going to be put into a low-power state (D1-D3) and is supposed to generate wakeup signals from that state, the _DSW (or _PSW, replaced with _DSW by ACPI 3.0) control method defined for it has to be executed before _PSx. Power resources that are not required by the device in the target power state and are not required any more by any other device should be disabled (by executing their _OFF control methods). If the current power state of the device is D3, it can only be put into D0 this way.”h]”hX2To put a device into the ACPI power state Dx (where x is a number between 0 and 3 inclusive) the kernel is supposed to (1) enable the power resources required by the device in this state using their _ON control methods and (2) execute the _PSx control method defined for the device. In addition to that, if the device is going to be put into a low-power state (D1-D3) and is supposed to generate wakeup signals from that state, the _DSW (or _PSW, replaced with _DSW by ACPI 3.0) control method defined for it has to be executed before _PSx. Power resources that are not required by the device in the target power state and are not required any more by any other device should be disabled (by executing their _OFF control methods). If the current power state of the device is D3, it can only be put into D0 this way.”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K®hjh²hubhÌ)�”}”(hXÞHowever, quite often the power states of devices are changed during a system-wide transition into a sleep state or back into the working state. ACPI defines four system sleep states, S1, S2, S3, and S4, and denotes the system working state as S0. In general, the target system sleep (or working) state determines the highest power (lowest number) state the device can be put into and the kernel is supposed to obtain this information by executing the device's _SxD control method (where x is a number between 0 and 4 inclusive). If the device is required to wake up the system from the target sleep state, the lowest power (highest number) state it can be put into is also determined by the target state of the system. The kernel is then supposed to use the device's _SxW control method to obtain the number of that state. It also is supposed to use the device's _PRW control method to learn which power resources need to be enabled for the device to be able to generate wakeup signals.”h]”hXäHowever, quite often the power states of devices are changed during a system-wide transition into a sleep state or back into the working state. ACPI defines four system sleep states, S1, S2, S3, and S4, and denotes the system working state as S0. In general, the target system sleep (or working) state determines the highest power (lowest number) state the device can be put into and the kernel is supposed to obtain this information by executing the device’s _SxD control method (where x is a number between 0 and 4 inclusive). If the device is required to wake up the system from the target sleep state, the lowest power (highest number) state it can be put into is also determined by the target state of the system. The kernel is then supposed to use the device’s _SxW control method to obtain the number of that state. It also is supposed to use the device’s _PRW control method to learn which power resources need to be enabled for the device to be able to generate wakeup signals.”…”�”}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kºhjh²hubeh}”(h]”Œacpi-device-power-management”ah ]”h"]”Œ!1.3. acpi device power management”ah$]”h&]”uh1hµhj3h²hh³hÊh´KŒubh¶)�”}”(hhh]”(h»)�”}”(hŒ1.4. Wakeup Signaling”h]”hŒ1.4. Wakeup Signaling”…”�”}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj‡h²hh³hÊh´KÉubhÌ)�”}”(hXUWakeup signals generated by PCI devices, either as native PCI PMEs, or as a result of the execution of the _DSW (or _PSW) ACPI control method before putting the device into a low-power state, have to be caught and handled as appropriate. If they are sent while the system is in the working state (ACPI S0), they should be translated into interrupts so that the kernel can put the devices generating them into the full-power state and take care of the events that triggered them. In turn, if they are sent while the system is sleeping, they should cause the system's core logic to trigger wakeup.”h]”hXWWakeup signals generated by PCI devices, either as native PCI PMEs, or as a result of the execution of the _DSW (or _PSW) ACPI control method before putting the device into a low-power state, have to be caught and handled as appropriate. If they are sent while the system is in the working state (ACPI S0), they should be translated into interrupts so that the kernel can put the devices generating them into the full-power state and take care of the events that triggered them. In turn, if they are sent while the system is sleeping, they should cause the system’s core logic to trigger wakeup.”…”�”}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KËhj‡h²hubhÌ)�”}”(hX3On ACPI-based systems wakeup signals sent by conventional PCI devices are converted into ACPI General-Purpose Events (GPEs) which are hardware signals from the system core logic generated in response to various events that need to be acted upon. Every GPE is associated with one or more sources of potentially interesting events. In particular, a GPE may be associated with a PCI device capable of signaling wakeup. The information on the connections between GPEs and event sources is recorded in the system's ACPI BIOS from where it can be read by the kernel.”h]”hX5On ACPI-based systems wakeup signals sent by conventional PCI devices are converted into ACPI General-Purpose Events (GPEs) which are hardware signals from the system core logic generated in response to various events that need to be acted upon. Every GPE is associated with one or more sources of potentially interesting events. In particular, a GPE may be associated with a PCI device capable of signaling wakeup. The information on the connections between GPEs and event sources is recorded in the system’s ACPI BIOS from where it can be read by the kernel.”…”�”}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÔhj‡h²hubhÌ)�”}”(hX‘If a PCI device known to the system's ACPI BIOS signals wakeup, the GPE associated with it (if there is one) is triggered. The GPEs associated with PCI bridges may also be triggered in response to a wakeup signal from one of the devices below the bridge (this also is the case for root bridges) and, for example, native PCI PMEs from devices unknown to the system's ACPI BIOS may be handled this way.”h]”hX•If a PCI device known to the system’s ACPI BIOS signals wakeup, the GPE associated with it (if there is one) is triggered. The GPEs associated with PCI bridges may also be triggered in response to a wakeup signal from one of the devices below the bridge (this also is the case for root bridges) and, for example, native PCI PMEs from devices unknown to the system’s ACPI BIOS may be handled this way.”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÝhj‡h²hubhÌ)�”}”(hXKA GPE may be triggered when the system is sleeping (i.e. when it is in one of the ACPI S1-S4 states), in which case system wakeup is started by its core logic (the device that was the source of the signal causing the system wakeup to occur may be identified later). The GPEs used in such situations are referred to as wakeup GPEs.”h]”hXKA GPE may be triggered when the system is sleeping (i.e. when it is in one of the ACPI S1-S4 states), in which case system wakeup is started by its core logic (the device that was the source of the signal causing the system wakeup to occur may be identified later). The GPEs used in such situations are referred to as wakeup GPEs.”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kähj‡h²hubhÌ)�”}”(hXUsually, however, GPEs are also triggered when the system is in the working state (ACPI S0) and in that case the system's core logic generates a System Control Interrupt (SCI) to notify the kernel of the event. Then, the SCI handler identifies the GPE that caused the interrupt to be generated which, in turn, allows the kernel to identify the source of the event (that may be a PCI device signaling wakeup). The GPEs used for notifying the kernel of events occurring while the system is in the working state are referred to as runtime GPEs.”h]”hX!Usually, however, GPEs are also triggered when the system is in the working state (ACPI S0) and in that case the system’s core logic generates a System Control Interrupt (SCI) to notify the kernel of the event. Then, the SCI handler identifies the GPE that caused the interrupt to be generated which, in turn, allows the kernel to identify the source of the event (that may be a PCI device signaling wakeup). The GPEs used for notifying the kernel of events occurring while the system is in the working state are referred to as runtime GPEs.”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kêhj‡h²hubhÌ)�”}”(hX Unfortunately, there is no standard way of handling wakeup signals sent by conventional PCI devices on systems that are not ACPI-based, but there is one for PCI Express devices. Namely, the PCI Express Base Specification introduced a native mechanism for converting native PCI PMEs into interrupts generated by root ports. For conventional PCI devices native PMEs are out-of-band, so they are routed separately and they need not pass through bridges (in principle they may be routed directly to the system's core logic), but for PCI Express devices they are in-band messages that have to pass through the PCI Express hierarchy, including the root port on the path from the device to the Root Complex. Thus it was possible to introduce a mechanism by which a root port generates an interrupt whenever it receives a PME message from one of the devices below it. The PCI Express Requester ID of the device that sent the PME message is then recorded in one of the root port's configuration registers from where it may be read by the interrupt handler allowing the device to be identified. [PME messages sent by PCI Express endpoints integrated with the Root Complex don't pass through root ports, but instead they cause a Root Complex Event Collector (if there is one) to generate interrupts.]”h]”hXUnfortunately, there is no standard way of handling wakeup signals sent by conventional PCI devices on systems that are not ACPI-based, but there is one for PCI Express devices. Namely, the PCI Express Base Specification introduced a native mechanism for converting native PCI PMEs into interrupts generated by root ports. For conventional PCI devices native PMEs are out-of-band, so they are routed separately and they need not pass through bridges (in principle they may be routed directly to the system’s core logic), but for PCI Express devices they are in-band messages that have to pass through the PCI Express hierarchy, including the root port on the path from the device to the Root Complex. Thus it was possible to introduce a mechanism by which a root port generates an interrupt whenever it receives a PME message from one of the devices below it. The PCI Express Requester ID of the device that sent the PME message is then recorded in one of the root port’s configuration registers from where it may be read by the interrupt handler allowing the device to be identified. [PME messages sent by PCI Express endpoints integrated with the Root Complex don’t pass through root ports, but instead they cause a Root Complex Event Collector (if there is one) to generate interrupts.]”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kóhj‡h²hubhÌ)�”}”(hXÚIn principle the native PCI Express PME signaling may also be used on ACPI-based systems along with the GPEs, but to use it the kernel has to ask the system's ACPI BIOS to release control of root port configuration registers. The ACPI BIOS, however, is not required to allow the kernel to control these registers and if it doesn't do that, the kernel must not modify their contents. Of course the native PCI Express PME signaling cannot be used by the kernel in that case.”h]”hXÞIn principle the native PCI Express PME signaling may also be used on ACPI-based systems along with the GPEs, but to use it the kernel has to ask the system’s ACPI BIOS to release control of root port configuration registers. The ACPI BIOS, however, is not required to allow the kernel to control these registers and if it doesn’t do that, the kernel must not modify their contents. Of course the native PCI Express PME signaling cannot be used by the kernel in that case.”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj‡h²hubeh}”(h]”Œwakeup-signaling”ah ]”h"]”Œ1.4. wakeup signaling”ah$]”h&]”uh1hµhj3h²hh³hÊh´KÉubeh}”(h]”Œ6hardware-and-platform-support-for-pci-power-management”ah ]”h"]”Œ91. hardware and platform support for pci power management”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)�”}”(hhh]”(h»)�”}”(hŒ,2. PCI Subsystem and Device Power Management”h]”hŒ,2. PCI Subsystem and Device Power Management”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒ&2.1. Device Power Management Callbacks”h]”hŒ&2.1. Device Power Management Callbacks”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´MubhÌ)�”}”(hX¬The PCI Subsystem participates in the power management of PCI devices in a number of ways. First of all, it provides an intermediate code layer between the device power management core (PM core) and PCI device drivers. Specifically, the pm field of the PCI subsystem's struct bus_type object, pci_bus_type, points to a struct dev_pm_ops object, pci_dev_pm_ops, containing pointers to several device power management callbacks::”h]”hX­The PCI Subsystem participates in the power management of PCI devices in a number of ways. First of all, it provides an intermediate code layer between the device power management core (PM core) and PCI device drivers. Specifically, the pm field of the PCI subsystem’s struct bus_type object, pci_bus_type, points to a struct dev_pm_ops object, pci_dev_pm_ops, containing pointers to several device power management callbacks:”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjh²hubhŒ literal_block”“”)�”}”(hXÀconst struct dev_pm_ops pci_dev_pm_ops = { .prepare = pci_pm_prepare, .complete = pci_pm_complete, .suspend = pci_pm_suspend, .resume = pci_pm_resume, .freeze = pci_pm_freeze, .thaw = pci_pm_thaw, .poweroff = pci_pm_poweroff, .restore = pci_pm_restore, .suspend_noirq = pci_pm_suspend_noirq, .resume_noirq = pci_pm_resume_noirq, .freeze_noirq = pci_pm_freeze_noirq, .thaw_noirq = pci_pm_thaw_noirq, .poweroff_noirq = pci_pm_poweroff_noirq, .restore_noirq = pci_pm_restore_noirq, .runtime_suspend = pci_pm_runtime_suspend, .runtime_resume = pci_pm_runtime_resume, .runtime_idle = pci_pm_runtime_idle, };”h]”hXÀconst struct dev_pm_ops pci_dev_pm_ops = { .prepare = pci_pm_prepare, .complete = pci_pm_complete, .suspend = pci_pm_suspend, .resume = pci_pm_resume, .freeze = pci_pm_freeze, .thaw = pci_pm_thaw, .poweroff = pci_pm_poweroff, .restore = pci_pm_restore, .suspend_noirq = pci_pm_suspend_noirq, .resume_noirq = pci_pm_resume_noirq, .freeze_noirq = pci_pm_freeze_noirq, .thaw_noirq = pci_pm_thaw_noirq, .poweroff_noirq = pci_pm_poweroff_noirq, .restore_noirq = pci_pm_restore_noirq, .runtime_suspend = pci_pm_runtime_suspend, .runtime_resume = pci_pm_runtime_resume, .runtime_idle = pci_pm_runtime_idle, };”…”�”}”hj<sbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´Mhjh²hubhÌ)�”}”(hXYThese callbacks are executed by the PM core in various situations related to device power management and they, in turn, execute power management callbacks provided by PCI device drivers. They also perform power management operations involving some standard configuration registers of PCI devices that device drivers need not know or care about.”h]”hXYThese callbacks are executed by the PM core in various situations related to device power management and they, in turn, execute power management callbacks provided by PCI device drivers. They also perform power management operations involving some standard configuration registers of PCI devices that device drivers need not know or care about.”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M.hjh²hubhÌ)�”}”(hŒrThe structure representing a PCI device, struct pci_dev, contains several fields that these callbacks operate on::”h]”hŒqThe structure representing a PCI device, struct pci_dev, contains several fields that these callbacks operate on:”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M4hjh²hubj;)�”}”(hX6struct pci_dev { ... pci_power_t current_state; /* Current operating state. */ int pm_cap; /* PM capability offset in the configuration space */ unsigned int pme_support:5; /* Bitmask of states from which PME# can be generated */ unsigned int pme_poll:1; /* Poll device's PME status bit */ unsigned int d1_support:1; /* Low power state D1 is supported */ unsigned int d2_support:1; /* Low power state D2 is supported */ unsigned int no_d1d2:1; /* D1 and D2 are forbidden */ unsigned int wakeup_prepared:1; /* Device prepared for wake up */ unsigned int d3hot_delay; /* D3hot->D0 transition time in ms */ ... };”h]”hX6struct pci_dev { ... pci_power_t current_state; /* Current operating state. */ int pm_cap; /* PM capability offset in the configuration space */ unsigned int pme_support:5; /* Bitmask of states from which PME# can be generated */ unsigned int pme_poll:1; /* Poll device's PME status bit */ unsigned int d1_support:1; /* Low power state D1 is supported */ unsigned int d2_support:1; /* Low power state D2 is supported */ unsigned int no_d1d2:1; /* D1 and D2 are forbidden */ unsigned int wakeup_prepared:1; /* Device prepared for wake up */ unsigned int d3hot_delay; /* D3hot->D0 transition time in ms */ ... };”…”�”}”hjfsbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´M7hjh²hubhÌ)�”}”(hŒ]They also indirectly use some fields of the struct device that is embedded in struct pci_dev.”h]”hŒ]They also indirectly use some fields of the struct device that is embedded in struct pci_dev.”…”�”}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MGhjh²hubeh}”(h]”Œ!device-power-management-callbacks”ah ]”h"]”Œ&2.1. device power management callbacks”ah$]”h&]”uh1hµhj h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒ2.2. Device Initialization”h]”hŒ2.2. Device Initialization”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjŠh²hh³hÊh´MKubhÌ)�”}”(hXThe PCI subsystem's first task related to device power management is to prepare the device for power management and initialize the fields of struct pci_dev used for this purpose. This happens in two functions defined in drivers/pci/, pci_pm_init() and pci_acpi_setup().”h]”hXThe PCI subsystem’s first task related to device power management is to prepare the device for power management and initialize the fields of struct pci_dev used for this purpose. This happens in two functions defined in drivers/pci/, pci_pm_init() and pci_acpi_setup().”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MMhjŠh²hubhÌ)�”}”(hXAThe first of these functions checks if the device supports native PCI PM and if that's the case the offset of its power management capability structure in the configuration space is stored in the pm_cap field of the device's struct pci_dev object. Next, the function checks which PCI low-power states are supported by the device and from which low-power states the device can generate native PCI PMEs. The power management fields of the device's struct pci_dev and the struct device embedded in it are updated accordingly and the generation of PMEs by the device is disabled.”h]”hXGThe first of these functions checks if the device supports native PCI PM and if that’s the case the offset of its power management capability structure in the configuration space is stored in the pm_cap field of the device’s struct pci_dev object. Next, the function checks which PCI low-power states are supported by the device and from which low-power states the device can generate native PCI PMEs. The power management fields of the device’s struct pci_dev and the struct device embedded in it are updated accordingly and the generation of PMEs by the device is disabled.”…”�”}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MRhjŠh²hubhÌ)�”}”(hXQThe second function checks if the device can be prepared to signal wakeup with the help of the platform firmware, such as the ACPI BIOS. If that is the case, the function updates the wakeup fields in struct device embedded in the device's struct pci_dev and uses the firmware-provided method to prevent the device from signaling wakeup.”h]”hXSThe second function checks if the device can be prepared to signal wakeup with the help of the platform firmware, such as the ACPI BIOS. If that is the case, the function updates the wakeup fields in struct device embedded in the device’s struct pci_dev and uses the firmware-provided method to prevent the device from signaling wakeup.”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M[hjŠh²hubhÌ)�”}”(hŒìAt this point the device is ready for power management. For driverless devices, however, this functionality is limited to a few basic operations carried out during system-wide transitions to a sleep state and back to the working state.”h]”hŒìAt this point the device is ready for power management. For driverless devices, however, this functionality is limited to a few basic operations carried out during system-wide transitions to a sleep state and back to the working state.”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MahjŠh²hubeh}”(h]”Œdevice-initialization”ah ]”h"]”Œ2.2. device initialization”ah$]”h&]”uh1hµhj h²hh³hÊh´MKubh¶)�”}”(hhh]”(h»)�”}”(hŒ$2.3. Runtime Device Power Management”h]”hŒ$2.3. Runtime Device Power Management”…”�”}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÛh²hh³hÊh´MfubhÌ)�”}”(hX The PCI subsystem plays a vital role in the runtime power management of PCI devices. For this purpose it uses the general runtime power management (runtime PM) framework described in Documentation/power/runtime_pm.rst. Namely, it provides subsystem-level callbacks::”h]”hX The PCI subsystem plays a vital role in the runtime power management of PCI devices. For this purpose it uses the general runtime power management (runtime PM) framework described in Documentation/power/runtime_pm.rst. Namely, it provides subsystem-level callbacks:”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhhjÛh²hubj;)�”}”(hŒFpci_pm_runtime_suspend() pci_pm_runtime_resume() pci_pm_runtime_idle()”h]”hŒFpci_pm_runtime_suspend() pci_pm_runtime_resume() pci_pm_runtime_idle()”…”�”}”hjúsbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´MmhjÛh²hubhÌ)�”}”(hXEthat are executed by the core runtime PM routines. It also implements the entire mechanics necessary for handling runtime wakeup signals from PCI devices in low-power states, which at the time of this writing works for both the native PCI Express PME signaling and the ACPI GPE-based wakeup signaling described in Section 1.”h]”hXEthat are executed by the core runtime PM routines. It also implements the entire mechanics necessary for handling runtime wakeup signals from PCI devices in low-power states, which at the time of this writing works for both the native PCI Express PME signaling and the ACPI GPE-based wakeup signaling described in Section 1.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MqhjÛh²hubhÌ)�”}”(hX?First, a PCI device is put into a low-power state, or suspended, with the help of pm_schedule_suspend() or pm_runtime_suspend() which for PCI devices call pci_pm_runtime_suspend() to do the actual job. For this to work, the device's driver has to provide a pm->runtime_suspend() callback (see below), which is run by pci_pm_runtime_suspend() as the first action. If the driver's callback returns successfully, the device's standard configuration registers are saved, the device is prepared to generate wakeup signals and, finally, it is put into the target low-power state.”h]”hXEFirst, a PCI device is put into a low-power state, or suspended, with the help of pm_schedule_suspend() or pm_runtime_suspend() which for PCI devices call pci_pm_runtime_suspend() to do the actual job. For this to work, the device’s driver has to provide a pm->runtime_suspend() callback (see below), which is run by pci_pm_runtime_suspend() as the first action. If the driver’s callback returns successfully, the device’s standard configuration registers are saved, the device is prepared to generate wakeup signals and, finally, it is put into the target low-power state.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MwhjÛh²hubhÌ)�”}”(hXöThe low-power state to put the device into is the lowest-power (highest number) state from which it can signal wakeup. The exact method of signaling wakeup is system-dependent and is determined by the PCI subsystem on the basis of the reported capabilities of the device and the platform firmware. To prepare the device for signaling wakeup and put it into the selected low-power state, the PCI subsystem can use the platform firmware as well as the device's native PCI PM capabilities, if supported.”h]”hXøThe low-power state to put the device into is the lowest-power (highest number) state from which it can signal wakeup. The exact method of signaling wakeup is system-dependent and is determined by the PCI subsystem on the basis of the reported capabilities of the device and the platform firmware. To prepare the device for signaling wakeup and put it into the selected low-power state, the PCI subsystem can use the platform firmware as well as the device’s native PCI PM capabilities, if supported.”…”�”}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M€hjÛh²hubhÌ)�”}”(hXIt is expected that the device driver's pm->runtime_suspend() callback will not attempt to prepare the device for signaling wakeup or to put it into a low-power state. The driver ought to leave these tasks to the PCI subsystem that has all of the information necessary to perform them.”h]”hX It is expected that the device driver’s pm->runtime_suspend() callback will not attempt to prepare the device for signaling wakeup or to put it into a low-power state. The driver ought to leave these tasks to the PCI subsystem that has all of the information necessary to perform them.”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MˆhjÛh²hubhÌ)�”}”(hXhA suspended device is brought back into the "active" state, or resumed, with the help of pm_request_resume() or pm_runtime_resume() which both call pci_pm_runtime_resume() for PCI devices. Again, this only works if the device's driver provides a pm->runtime_resume() callback (see below). However, before the driver's callback is executed, pci_pm_runtime_resume() brings the device back into the full-power state, prevents it from signaling wakeup while in that state and restores its standard configuration registers. Thus the driver's callback need not worry about the PCI-specific aspects of the device resume.”h]”hXrA suspended device is brought back into the “activeâ€� state, or resumed, with the help of pm_request_resume() or pm_runtime_resume() which both call pci_pm_runtime_resume() for PCI devices. Again, this only works if the device’s driver provides a pm->runtime_resume() callback (see below). However, before the driver’s callback is executed, pci_pm_runtime_resume() brings the device back into the full-power state, prevents it from signaling wakeup while in that state and restores its standard configuration registers. Thus the driver’s callback need not worry about the PCI-specific aspects of the device resume.”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M�hjÛh²hubhÌ)�”}”(hX!Note that generally pci_pm_runtime_resume() may be called in two different situations. First, it may be called at the request of the device's driver, for example if there are some data for it to process. Second, it may be called as a result of a wakeup signal from the device itself (this sometimes is referred to as "remote wakeup"). Of course, for this purpose the wakeup signal is handled in one of the ways described in Section 1 and finally converted into a notification for the PCI subsystem after the source device has been identified.”h]”hX'Note that generally pci_pm_runtime_resume() may be called in two different situations. First, it may be called at the request of the device’s driver, for example if there are some data for it to process. Second, it may be called as a result of a wakeup signal from the device itself (this sometimes is referred to as “remote wakeupâ€�). Of course, for this purpose the wakeup signal is handled in one of the ways described in Section 1 and finally converted into a notification for the PCI subsystem after the source device has been identified.”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M–hjÛh²hubhÌ)�”}”(hX¾The pci_pm_runtime_idle() function, called for PCI devices by pm_runtime_idle() and pm_request_idle(), executes the device driver's pm->runtime_idle() callback, if defined, and if that callback doesn't return error code (or is not present at all), suspends the device with the help of pm_runtime_suspend(). Sometimes pci_pm_runtime_idle() is called automatically by the PM core (for example, it is called right after the device has just been resumed), in which cases it is expected to suspend the device if that makes sense. Usually, however, the PCI subsystem doesn't really know if the device really can be suspended, so it lets the device's driver decide by running its pm->runtime_idle() callback.”h]”hXÆThe pci_pm_runtime_idle() function, called for PCI devices by pm_runtime_idle() and pm_request_idle(), executes the device driver’s pm->runtime_idle() callback, if defined, and if that callback doesn’t return error code (or is not present at all), suspends the device with the help of pm_runtime_suspend(). Sometimes pci_pm_runtime_idle() is called automatically by the PM core (for example, it is called right after the device has just been resumed), in which cases it is expected to suspend the device if that makes sense. Usually, however, the PCI subsystem doesn’t really know if the device really can be suspended, so it lets the device’s driver decide by running its pm->runtime_idle() callback.”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MŸhjÛh²hubeh}”(h]”Œruntime-device-power-management”ah ]”h"]”Œ$2.3. runtime device power management”ah$]”h&]”uh1hµhj h²hh³hÊh´Mfubh¶)�”}”(hhh]”(h»)�”}”(hŒ"2.4. System-Wide Power Transitions”h]”hŒ"2.4. System-Wide Power Transitions”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjrh²hh³hÊh´M«ubhÌ)�”}”(hXúThere are a few different types of system-wide power transitions, described in Documentation/driver-api/pm/devices.rst. Each of them requires devices to be handled in a specific way and the PM core executes subsystem-level power management callbacks for this purpose. They are executed in phases such that each phase involves executing the same subsystem-level callback for every device belonging to the given subsystem before the next phase begins. These phases always run after tasks have been frozen.”h]”hXúThere are a few different types of system-wide power transitions, described in Documentation/driver-api/pm/devices.rst. Each of them requires devices to be handled in a specific way and the PM core executes subsystem-level power management callbacks for this purpose. They are executed in phases such that each phase involves executing the same subsystem-level callback for every device belonging to the given subsystem before the next phase begins. These phases always run after tasks have been frozen.”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¬hjrh²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ2.4.1. System Suspend”h]”hŒ2.4.1. System Suspend”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj‘h²hh³hÊh´MµubhÌ)�”}”(hŒšWhen the system is going into a sleep state in which the contents of memory will be preserved, such as one of the ACPI sleep states S1-S3, the phases are:”h]”hŒšWhen the system is going into a sleep state in which the contents of memory will be preserved, such as one of the ACPI sleep states S1-S3, the phases are:”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M·hj‘h²hubhŒ block_quote”“”)�”}”(hŒ!prepare, suspend, suspend_noirq. ”h]”hÌ)�”}”(hŒ prepare, suspend, suspend_noirq.”h]”hŒ prepare, suspend, suspend_noirq.”…”�”}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mºhj²ubah}”(h]”h ]”h"]”h$]”h&]”uh1j°h³hÊh´Mºhj‘h²hubhÌ)�”}”(hŒPThe following PCI bus type's callbacks, respectively, are used in these phases::”h]”hŒQThe following PCI bus type’s callbacks, respectively, are used in these phases:”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¼hj‘h²hubj;)�”}”(hŒ8pci_pm_prepare() pci_pm_suspend() pci_pm_suspend_noirq()”h]”hŒ8pci_pm_prepare() pci_pm_suspend() pci_pm_suspend_noirq()”…”�”}”hjØsbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´M¾hj‘h²hubhÌ)�”}”(hX/The pci_pm_prepare() routine first puts the device into the "fully functional" state with the help of pm_runtime_resume(). Then, it executes the device driver's pm->prepare() callback if defined (i.e. if the driver's struct dev_pm_ops object is present and the prepare pointer in that object is valid).”h]”hX7The pci_pm_prepare() routine first puts the device into the “fully functionalâ€� state with the help of pm_runtime_resume(). Then, it executes the device driver’s pm->prepare() callback if defined (i.e. if the driver’s struct dev_pm_ops object is present and the prepare pointer in that object is valid).”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÂhj‘h²hubhÌ)�”}”(hXThe pci_pm_suspend() routine first checks if the device's driver implements legacy PCI suspend routines (see Section 3), in which case the driver's legacy suspend callback is executed, if present, and its result is returned. Next, if the device's driver doesn't provide a struct dev_pm_ops object (containing pointers to the driver's callbacks), pci_pm_default_suspend() is called, which simply turns off the device's bus master capability and runs pcibios_disable_device() to disable it, unless the device is a bridge (PCI bridges are ignored by this routine). Next, the device driver's pm->suspend() callback is executed, if defined, and its result is returned if it fails. Finally, pci_fixup_device() is called to apply hardware suspend quirks related to the device if necessary.”h]”hXThe pci_pm_suspend() routine first checks if the device’s driver implements legacy PCI suspend routines (see Section 3), in which case the driver’s legacy suspend callback is executed, if present, and its result is returned. Next, if the device’s driver doesn’t provide a struct dev_pm_ops object (containing pointers to the driver’s callbacks), pci_pm_default_suspend() is called, which simply turns off the device’s bus master capability and runs pcibios_disable_device() to disable it, unless the device is a bridge (PCI bridges are ignored by this routine). Next, the device driver’s pm->suspend() callback is executed, if defined, and its result is returned if it fails. Finally, pci_fixup_device() is called to apply hardware suspend quirks related to the device if necessary.”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÇhj‘h²hubhÌ)�”}”(hX;Note that the suspend phase is carried out asynchronously for PCI devices, so the pci_pm_suspend() callback may be executed in parallel for any pair of PCI devices that don't depend on each other in a known way (i.e. none of the paths in the device tree from the root bridge to a leaf device contains both of them).”h]”hX=Note that the suspend phase is carried out asynchronously for PCI devices, so the pci_pm_suspend() callback may be executed in parallel for any pair of PCI devices that don’t depend on each other in a known way (i.e. none of the paths in the device tree from the root bridge to a leaf device contains both of them).”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÓhj‘h²hubhÌ)�”}”(hX The pci_pm_suspend_noirq() routine is executed after suspend_device_irqs() has been called, which means that the device driver's interrupt handler won't be invoked while this routine is running. It first checks if the device's driver implements legacy PCI suspend routines (Section 3), in which case the legacy late suspend routine is called and its result is returned (the standard configuration registers of the device are saved if the driver's callback hasn't done that). Second, if the device driver's struct dev_pm_ops object is not present, the device's standard configuration registers are saved and the routine returns success. Otherwise the device driver's pm->suspend_noirq() callback is executed, if present, and its result is returned if it fails. Next, if the device's standard configuration registers haven't been saved yet (one of the device driver's callbacks executed before might do that), pci_pm_suspend_noirq() saves them, prepares the device to signal wakeup (if necessary) and puts it into a low-power state.”h]”hX The pci_pm_suspend_noirq() routine is executed after suspend_device_irqs() has been called, which means that the device driver’s interrupt handler won’t be invoked while this routine is running. It first checks if the device’s driver implements legacy PCI suspend routines (Section 3), in which case the legacy late suspend routine is called and its result is returned (the standard configuration registers of the device are saved if the driver’s callback hasn’t done that). Second, if the device driver’s struct dev_pm_ops object is not present, the device’s standard configuration registers are saved and the routine returns success. Otherwise the device driver’s pm->suspend_noirq() callback is executed, if present, and its result is returned if it fails. Next, if the device’s standard configuration registers haven’t been saved yet (one of the device driver’s callbacks executed before might do that), pci_pm_suspend_noirq() saves them, prepares the device to signal wakeup (if necessary) and puts it into a low-power state.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MØhj‘h²hubhÌ)�”}”(hX«The low-power state to put the device into is the lowest-power (highest number) state from which it can signal wakeup while the system is in the target sleep state. Just like in the runtime PM case described above, the mechanism of signaling wakeup is system-dependent and determined by the PCI subsystem, which is also responsible for preparing the device to signal wakeup from the system's target sleep state as appropriate.”h]”hX­The low-power state to put the device into is the lowest-power (highest number) state from which it can signal wakeup while the system is in the target sleep state. Just like in the runtime PM case described above, the mechanism of signaling wakeup is system-dependent and determined by the PCI subsystem, which is also responsible for preparing the device to signal wakeup from the system’s target sleep state as appropriate.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mçhj‘h²hubhÌ)�”}”(hXµPCI device drivers (that don't implement legacy power management callbacks) are generally not expected to prepare devices for signaling wakeup or to put them into low-power states. However, if one of the driver's suspend callbacks (pm->suspend() or pm->suspend_noirq()) saves the device's standard configuration registers, pci_pm_suspend_noirq() will assume that the device has been prepared to signal wakeup and put into a low-power state by the driver (the driver is then assumed to have used the helper functions provided by the PCI subsystem for this purpose). PCI device drivers are not encouraged to do that, but in some rare cases doing that in the driver may be the optimum approach.”•µh]”hX»PCI device drivers (that don’t implement legacy power management callbacks) are generally not expected to prepare devices for signaling wakeup or to put them into low-power states. However, if one of the driver’s suspend callbacks (pm->suspend() or pm->suspend_noirq()) saves the device’s standard configuration registers, pci_pm_suspend_noirq() will assume that the device has been prepared to signal wakeup and put into a low-power state by the driver (the driver is then assumed to have used the helper functions provided by the PCI subsystem for this purpose). PCI device drivers are not encouraged to do that, but in some rare cases doing that in the driver may be the optimum approach.”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mîhj‘h²hubeh}”(h]”Œsystem-suspend”ah ]”h"]”Œ2.4.1. system suspend”ah$]”h&]”uh1hµhjrh²hh³hÊh´Mµubh¶)�”}”(hhh]”(h»)�”}”(hŒ2.4.2. System Resume”h]”hŒ2.4.2. System Resume”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjBh²hh³hÊh´MùubhÌ)�”}”(hŒÐWhen the system is undergoing a transition from a sleep state in which the contents of memory have been preserved, such as one of the ACPI sleep states S1-S3, into the working state (ACPI S0), the phases are:”h]”hŒÐWhen the system is undergoing a transition from a sleep state in which the contents of memory have been preserved, such as one of the ACPI sleep states S1-S3, into the working state (ACPI S0), the phases are:”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MûhjBh²hubj±)�”}”(hŒ resume_noirq, resume, complete. ”h]”hÌ)�”}”(hŒresume_noirq, resume, complete.”h]”hŒresume_noirq, resume, complete.”…”�”}”(hjeh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mÿhjaubah}”(h]”h ]”h"]”h$]”h&]”uh1j°h³hÊh´MÿhjBh²hubhÌ)�”}”(hŒTThe following PCI bus type's callbacks, respectively, are executed in these phases::”h]”hŒUThe following PCI bus type’s callbacks, respectively, are executed in these phases:”…”�”}”(hjyh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjBh²hubj;)�”}”(hŒ7pci_pm_resume_noirq() pci_pm_resume() pci_pm_complete()”h]”hŒ7pci_pm_resume_noirq() pci_pm_resume() pci_pm_complete()”…”�”}”hj‡sbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´MhjBh²hubhÌ)�”}”(hX«The pci_pm_resume_noirq() routine first puts the device into the full-power state, restores its standard configuration registers and applies early resume hardware quirks related to the device, if necessary. This is done unconditionally, regardless of whether or not the device's driver implements legacy PCI power management callbacks (this way all PCI devices are in the full-power state and their standard configuration registers have been restored when their interrupt handlers are invoked for the first time during resume, which allows the kernel to avoid problems with the handling of shared interrupts by drivers whose devices are still suspended). If legacy PCI power management callbacks (see Section 3) are implemented by the device's driver, the legacy early resume callback is executed and its result is returned. Otherwise, the device driver's pm->resume_noirq() callback is executed, if defined, and its result is returned.”h]”hX±The pci_pm_resume_noirq() routine first puts the device into the full-power state, restores its standard configuration registers and applies early resume hardware quirks related to the device, if necessary. This is done unconditionally, regardless of whether or not the device’s driver implements legacy PCI power management callbacks (this way all PCI devices are in the full-power state and their standard configuration registers have been restored when their interrupt handlers are invoked for the first time during resume, which allows the kernel to avoid problems with the handling of shared interrupts by drivers whose devices are still suspended). If legacy PCI power management callbacks (see Section 3) are implemented by the device’s driver, the legacy early resume callback is executed and its result is returned. Otherwise, the device driver’s pm->resume_noirq() callback is executed, if defined, and its result is returned.”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjBh²hubhÌ)�”}”(hX|The pci_pm_resume() routine first checks if the device's standard configuration registers have been restored and restores them if that's not the case (this only is necessary in the error path during a failing suspend). Next, resume hardware quirks related to the device are applied, if necessary, and if the device's driver implements legacy PCI power management callbacks (see Section 3), the driver's legacy resume callback is executed and its result is returned. Otherwise, the device's wakeup signaling mechanisms are blocked and its driver's pm->resume() callback is executed, if defined (the callback's result is then returned).”h]”hXŠThe pci_pm_resume() routine first checks if the device’s standard configuration registers have been restored and restores them if that’s not the case (this only is necessary in the error path during a failing suspend). Next, resume hardware quirks related to the device are applied, if necessary, and if the device’s driver implements legacy PCI power management callbacks (see Section 3), the driver’s legacy resume callback is executed and its result is returned. Otherwise, the device’s wakeup signaling mechanisms are blocked and its driver’s pm->resume() callback is executed, if defined (the callback’s result is then returned).”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjBh²hubhÌ)�”}”(hXThe resume phase is carried out asynchronously for PCI devices, like the suspend phase described above, which means that if two PCI devices don't depend on each other in a known way, the pci_pm_resume() routine may be executed for both of them in parallel.”h]”hXThe resume phase is carried out asynchronously for PCI devices, like the suspend phase described above, which means that if two PCI devices don’t depend on each other in a known way, the pci_pm_resume() routine may be executed for both of them in parallel.”…”�”}”(hj±h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hjBh²hubhÌ)�”}”(hŒdThe pci_pm_complete() routine only executes the device driver's pm->complete() callback, if defined.”h]”hŒfThe pci_pm_complete() routine only executes the device driver’s pm->complete() callback, if defined.”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M%hjBh²hubeh}”(h]”Œ system-resume”ah ]”h"]”Œ2.4.2. system resume”ah$]”h&]”uh1hµhjrh²hh³hÊh´Mùubh¶)�”}”(hhh]”(h»)�”}”(hŒ2.4.3. System Hibernation”h]”hŒ2.4.3. System Hibernation”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÕh²hh³hÊh´M)ubhÌ)�”}”(hŒùSystem hibernation is more complicated than system suspend, because it requires a system image to be created and written into a persistent storage medium. The image is created atomically and all devices are quiesced, or frozen, before that happens.”h]”hŒùSystem hibernation is more complicated than system suspend, because it requires a system image to be created and written into a persistent storage medium. The image is created atomically and all devices are quiesced, or frozen, before that happens.”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M+hjÕh²hubhÌ)�”}”(hŒÈThe freezing of devices is carried out after enough memory has been freed (at the time of this writing the image creation requires at least 50% of system RAM to be free) in the following three phases:”h]”hŒÈThe freezing of devices is carried out after enough memory has been freed (at the time of this writing the image creation requires at least 50% of system RAM to be free) in the following three phases:”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M0hjÕh²hubj±)�”}”(hŒprepare, freeze, freeze_noirq ”h]”hÌ)�”}”(hŒprepare, freeze, freeze_noirq”h]”hŒprepare, freeze, freeze_noirq”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M4hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j°h³hÊh´M4hjÕh²hubhÌ)�”}”(hŒ1that correspond to the PCI bus type's callbacks::”h]”hŒ2that correspond to the PCI bus type’s callbacks:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M6hjÕh²hubj;)�”}”(hŒ6pci_pm_prepare() pci_pm_freeze() pci_pm_freeze_noirq()”h]”hŒ6pci_pm_prepare() pci_pm_freeze() pci_pm_freeze_noirq()”…”�”}”hj(sbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´M8hjÕh²hubhÌ)�”}”(hŒzThis means that the prepare phase is exactly the same as for system suspend. The other two phases, however, are different.”h]”hŒzThis means that the prepare phase is exactly the same as for system suspend. The other two phases, however, are different.”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M<hjÕh²hubhÌ)�”}”(hXAThe pci_pm_freeze() routine is quite similar to pci_pm_suspend(), but it runs the device driver's pm->freeze() callback, if defined, instead of pm->suspend(), and it doesn't apply the suspend-related hardware quirks. It is executed asynchronously for different PCI devices that don't depend on each other in a known way.”h]”hXGThe pci_pm_freeze() routine is quite similar to pci_pm_suspend(), but it runs the device driver’s pm->freeze() callback, if defined, instead of pm->suspend(), and it doesn’t apply the suspend-related hardware quirks. It is executed asynchronously for different PCI devices that don’t depend on each other in a known way.”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M?hjÕh²hubhÌ)�”}”(hX�The pci_pm_freeze_noirq() routine, in turn, is similar to pci_pm_suspend_noirq(), but it calls the device driver's pm->freeze_noirq() routine instead of pm->suspend_noirq(). It also doesn't attempt to prepare the device for signaling wakeup and put it into a low-power state. Still, it saves the device's standard configuration registers if they haven't been saved by one of the driver's callbacks.”h]”hXšThe pci_pm_freeze_noirq() routine, in turn, is similar to pci_pm_suspend_noirq(), but it calls the device driver’s pm->freeze_noirq() routine instead of pm->suspend_noirq(). It also doesn’t attempt to prepare the device for signaling wakeup and put it into a low-power state. Still, it saves the device’s standard configuration registers if they haven’t been saved by one of the driver’s callbacks.”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MEhjÕh²hubhÌ)�”}”(hX9Once the image has been created, it has to be saved. However, at this point all devices are frozen and they cannot handle I/O, while their ability to handle I/O is obviously necessary for the image saving. Thus they have to be brought back to the fully functional state and this is done in the following phases:”h]”hX9Once the image has been created, it has to be saved. However, at this point all devices are frozen and they cannot handle I/O, while their ability to handle I/O is obviously necessary for the image saving. Thus they have to be brought back to the fully functional state and this is done in the following phases:”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MLhjÕh²hubj±)�”}”(hŒthaw_noirq, thaw, complete ”h]”hÌ)�”}”(hŒthaw_noirq, thaw, complete”h]”hŒthaw_noirq, thaw, complete”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MQhjnubah}”(h]”h ]”h"]”h$]”h&]”uh1j°h³hÊh´MQhjÕh²hubhÌ)�”}”(hŒ.using the following PCI bus type's callbacks::”h]”hŒ/using the following PCI bus type’s callbacks:”…”�”}”(hj†h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MShjÕh²hubj;)�”}”(hŒ3pci_pm_thaw_noirq() pci_pm_thaw() pci_pm_complete()”h]”hŒ3pci_pm_thaw_noirq() pci_pm_thaw() pci_pm_complete()”…”�”}”hj”sbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´MUhjÕh²hubhÌ)�”}”(hŒ respectively.”h]”hŒ respectively.”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MYhjÕh²hubhÌ)�”}”(hXThe first of them, pci_pm_thaw_noirq(), is analogous to pci_pm_resume_noirq(). It puts the device into the full power state and restores its standard configuration registers. It also executes the device driver's pm->thaw_noirq() callback, if defined, instead of pm->resume_noirq().”h]”hXThe first of them, pci_pm_thaw_noirq(), is analogous to pci_pm_resume_noirq(). It puts the device into the full power state and restores its standard configuration registers. It also executes the device driver’s pm->thaw_noirq() callback, if defined, instead of pm->resume_noirq().”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M[hjÕh²hubhÌ)�”}”(hŒîThe pci_pm_thaw() routine is similar to pci_pm_resume(), but it runs the device driver's pm->thaw() callback instead of pm->resume(). It is executed asynchronously for different PCI devices that don't depend on each other in a known way.”h]”hŒòThe pci_pm_thaw() routine is similar to pci_pm_resume(), but it runs the device driver’s pm->thaw() callback instead of pm->resume(). It is executed asynchronously for different PCI devices that don’t depend on each other in a known way.”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M`hjÕh²hubhÌ)�”}”(hŒ4The complete phase is the same as for system resume.”h]”hŒ4The complete phase is the same as for system resume.”…”�”}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MehjÕh²hubhÌ)�”}”(hŒ«After saving the image, devices need to be powered down before the system can enter the target sleep state (ACPI S4 for ACPI-based systems). This is done in three phases:”h]”hŒ«After saving the image, devices need to be powered down before the system can enter the target sleep state (ACPI S4 for ACPI-based systems). This is done in three phases:”…”�”}”(hjÚh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MghjÕh²hubj±)�”}”(hŒ"prepare, poweroff, poweroff_noirq ”h]”hÌ)�”}”(hŒ!prepare, poweroff, poweroff_noirq”h]”hŒ!prepare, poweroff, poweroff_noirq”…”�”}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mkhjèubah}”(h]”h ]”h"]”h$]”h&]”uh1j°h³hÊh´MkhjÕh²hubhÌ)�”}”(hŒÔwhere the prepare phase is exactly the same as for system suspend. The other two phases are analogous to the suspend and suspend_noirq phases, respectively. The PCI subsystem-level callbacks they correspond to::”h]”hŒÓwhere the prepare phase is exactly the same as for system suspend. The other two phases are analogous to the suspend and suspend_noirq phases, respectively. The PCI subsystem-level callbacks they correspond to:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MmhjÕh²hubj;)�”}”(hŒ)pci_pm_poweroff() pci_pm_poweroff_noirq()”h]”hŒ)pci_pm_poweroff() pci_pm_poweroff_noirq()”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´MqhjÕh²hubhÌ)�”}”(hŒ¢work in analogy with pci_pm_suspend() and pci_pm_suspend_noirq(), respectively, although they don't attempt to save the device's standard configuration registers.”h]”hŒ¦work in analogy with pci_pm_suspend() and pci_pm_suspend_noirq(), respectively, although they don’t attempt to save the device’s standard configuration registers.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MthjÕh²hubeh}”(h]”Œsystem-hibernation”ah ]”h"]”Œ2.4.3. system hibernation”ah$]”h&]”uh1hµhjrh²hh³hÊh´M)ubh¶)�”}”(hhh]”(h»)�”}”(hŒ2.4.4. System Restore”h]”hŒ2.4.4. System Restore”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj2h²hh³hÊh´MyubhÌ)�”}”(hŒ¶System restore requires a hibernation image to be loaded into memory and the pre-hibernation memory contents to be restored before the pre-hibernation system activity can be resumed.”h]”hŒ¶System restore requires a hibernation image to be loaded into memory and the pre-hibernation memory contents to be restored before the pre-hibernation system activity can be resumed.”…”�”}”(hjCh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M{hj2h²hubhÌ)�”}”(hXAs described in Documentation/driver-api/pm/devices.rst, the hibernation image is loaded into memory by a fresh instance of the kernel, called the boot kernel, which in turn is loaded and run by a boot loader in the usual way. After the boot kernel has loaded the image, it needs to replace its own code and data with the code and data of the "hibernated" kernel stored within the image, called the image kernel. For this purpose all devices are frozen just like before creating the image during hibernation, in the”h]”hX As described in Documentation/driver-api/pm/devices.rst, the hibernation image is loaded into memory by a fresh instance of the kernel, called the boot kernel, which in turn is loaded and run by a boot loader in the usual way. After the boot kernel has loaded the image, it needs to replace its own code and data with the code and data of the “hibernatedâ€� kernel stored within the image, called the image kernel. For this purpose all devices are frozen just like before creating the image during hibernation, in the”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj2h²hubj±)�”}”(hŒprepare, freeze, freeze_noirq ”h]”hÌ)�”}”(hŒprepare, freeze, freeze_noirq”h]”hŒprepare, freeze, freeze_noirq”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M‡hj_ubah}”(h]”h ]”h"]”h$]”h&]”uh1j°h³hÊh´M‡hj2h²hubhÌ)�”}”(hŒÁphases described above. However, the devices affected by these phases are only those having drivers in the boot kernel; other devices will still be in whatever state the boot loader left them.”h]”hŒÁphases described above. However, the devices affected by these phases are only those having drivers in the boot kernel; other devices will still be in whatever state the boot loader left them.”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M‰hj2h²hubhÌ)�”}”(hX(Should the restoration of the pre-hibernation memory contents fail, the boot kernel would go through the "thawing" procedure described above, using the thaw_noirq, thaw, and complete phases (that will only affect the devices having drivers in the boot kernel), and then continue running normally.”h]”hX,Should the restoration of the pre-hibernation memory contents fail, the boot kernel would go through the “thawingâ€� procedure described above, using the thaw_noirq, thaw, and complete phases (that will only affect the devices having drivers in the boot kernel), and then continue running normally.”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M�hj2h²hubhÌ)�”}”(hXŒIf the pre-hibernation memory contents are restored successfully, which is the usual situation, control is passed to the image kernel, which then becomes responsible for bringing the system back to the working state. To achieve this, it must restore the devices' pre-hibernation functionality, which is done much like waking up from the memory sleep state, although it involves different phases:”h]”hXŽIf the pre-hibernation memory contents are restored successfully, which is the usual situation, control is passed to the image kernel, which then becomes responsible for bringing the system back to the working state. To achieve this, it must restore the devices’ pre-hibernation functionality, which is done much like waking up from the memory sleep state, although it involves different phases:”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M’hj2h²hubj±)�”}”(hŒ!restore_noirq, restore, complete ”h]”hÌ)�”}”(hŒ restore_noirq, restore, complete”h]”hŒ restore_noirq, restore, complete”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M™hj¡ubah}”(h]”h ]”h"]”h$]”h&]”uh1j°h³hÊh´M™hj2h²hubhÌ)�”}”(hŒ£The first two of these are analogous to the resume_noirq and resume phases described above, respectively, and correspond to the following PCI subsystem callbacks::”h]”hŒ¢The first two of these are analogous to the resume_noirq and resume phases described above, respectively, and correspond to the following PCI subsystem callbacks:”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M›hj2h²hubj;)�”}”(hŒ'pci_pm_restore_noirq() pci_pm_restore()”h]”hŒ'pci_pm_restore_noirq() pci_pm_restore()”…”�”}”hjÇsbah}”(h]”h ]”h"]”h$]”h&]”j1j2uh1j:h³hÊh´MŸhj2h²hubhÌ)�”}”(hŒÁThese callbacks work in analogy with pci_pm_resume_noirq() and pci_pm_resume(), respectively, but they execute the device driver's pm->restore_noirq() and pm->restore() callbacks, if available.”h]”hŒÃThese callbacks work in analogy with pci_pm_resume_noirq() and pci_pm_resume(), respectively, but they execute the device driver’s pm->restore_noirq() and pm->restore() callbacks, if available.”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¢hj2h²hubhÌ)�”}”(hŒRThe complete phase is carried out in exactly the same way as during system resume.”h]”hŒRThe complete phase is carried out in exactly the same way as during system resume.”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¦hj2h²hubeh}”(h]”Œsystem-restore”ah ]”h"]”Œ2.4.4. system restore”ah$]”h&]”uh1hµhjrh²hh³hÊh´Myubeh}”(h]”Œsystem-wide-power-transitions”ah ]”h"]”Œ"2.4. system-wide power transitions”ah$]”h&]”uh1hµhj h²hh³hÊh´M«ubeh}”(h]”Œ)pci-subsystem-and-device-power-management”ah ]”h"]”Œ,2. pci subsystem and device power management”ah$]”h&]”uh1hµhh·h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒ*3. PCI Device Drivers and Power Management”h]”hŒ*3. PCI Device Drivers and Power Management”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´M«ubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1. Power Management Callbacks”h]”hŒ3.1. Power Management Callbacks”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´M®ubhÌ)�”}”(hŒÛPCI device drivers participate in power management by providing callbacks to be executed by the PCI subsystem's power management routines described above and by controlling the runtime power management of their devices.”h]”hŒÝPCI device drivers participate in power management by providing callbacks to be executed by the PCI subsystem’s power management routines described above and by controlling the runtime power management of their devices.”…”�”}”(hj+ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M°hj h²hubhÌ)�”}”(hX3At the time of this writing there are two ways to define power management callbacks for a PCI device driver, the recommended one, based on using a dev_pm_ops structure described in Documentation/driver-api/pm/devices.rst, and the "legacy" one, in which the .suspend() and .resume() callbacks from struct pci_driver are used. The legacy approach, however, doesn't allow one to define runtime power management callbacks and is not really suitable for any new drivers. Therefore it is not covered by this document (refer to the source code to learn more about it).”h]”hX9At the time of this writing there are two ways to define power management callbacks for a PCI device driver, the recommended one, based on using a dev_pm_ops structure described in Documentation/driver-api/pm/devices.rst, and the “legacyâ€� one, in which the .suspend() and .resume() callbacks from struct pci_driver are used. The legacy approach, however, doesn’t allow one to define runtime power management callbacks and is not really suitable for any new drivers. Therefore it is not covered by this document (refer to the source code to learn more about it).”…”�”}”(hj9 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M´hj h²hubhÌ)�”}”(hXÉIt is recommended that all PCI device drivers define a struct dev_pm_ops object containing pointers to power management (PM) callbacks that will be executed by the PCI subsystem's PM routines in various circumstances. A pointer to the driver's struct dev_pm_ops object has to be assigned to the driver.pm field in its struct pci_driver object. Once that has happened, the "legacy" PM callbacks in struct pci_driver are ignored (even if they are not NULL).”h]”hXÑIt is recommended that all PCI device drivers define a struct dev_pm_ops object containing pointers to power management (PM) callbacks that will be executed by the PCI subsystem’s PM routines in various circumstances. A pointer to the driver’s struct dev_pm_ops object has to be assigned to the driver.pm field in its struct pci_driver object. Once that has happened, the “legacyâ€� PM callbacks in struct pci_driver are ignored (even if they are not NULL).”…”�”}”(hjG h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M½hj h²hubhÌ)�”}”(hX=The PM callbacks in struct dev_pm_ops are not mandatory and if they are not defined (i.e. the respective fields of struct dev_pm_ops are unset) the PCI subsystem will handle the device in a simplified default manner. If they are defined, though, they are expected to behave as described in the following subsections.”h]”hX=The PM callbacks in struct dev_pm_ops are not mandatory and if they are not defined (i.e. the respective fields of struct dev_pm_ops are unset) the PCI subsystem will handle the device in a simplified default manner. If they are defined, though, they are expected to behave as described in the following subsections.”…”�”}”(hjU h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÄhj h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.1. prepare()”h]”hŒ3.1.1. prepare()”…”�”}”(hjf h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjc h²hh³hÊh´MËubhÌ)�”}”(hXThe prepare() callback is executed during system suspend, during hibernation (when a hibernation image is about to be created), during power-off after saving a hibernation image and during system restore, when a hibernation image has just been loaded into memory.”h]”hXThe prepare() callback is executed during system suspend, during hibernation (when a hibernation image is about to be created), during power-off after saving a hibernation image and during system restore, when a hibernation image has just been loaded into memory.”…”�”}”(hjt h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÍhjc h²hubhÌ)�”}”(hX6This callback is only necessary if the driver's device has children that in general may be registered at any time. In that case the role of the prepare() callback is to prevent new children of the device from being registered until one of the resume_noirq(), thaw_noirq(), or restore_noirq() callbacks is run.”h]”hX8This callback is only necessary if the driver’s device has children that in general may be registered at any time. In that case the role of the prepare() callback is to prevent new children of the device from being registered until one of the resume_noirq(), thaw_noirq(), or restore_noirq() callbacks is run.”…”�”}”(hj‚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÒhjc h²hubhÌ)�”}”(hXYIn addition to that the prepare() callback may carry out some operations preparing the device to be suspended, although it should not allocate memory (if additional memory is required to suspend the device, it has to be preallocated earlier, for example in a suspend/hibernate notifier as described in Documentation/driver-api/pm/notifiers.rst).”h]”hXYIn addition to that the prepare() callback may carry out some operations preparing the device to be suspended, although it should not allocate memory (if additional memory is required to suspend the device, it has to be preallocated earlier, for example in a suspend/hibernate notifier as described in Documentation/driver-api/pm/notifiers.rst).”…”�”}”(hj� h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M×hjc h²hubeh}”(h]”Œprepare”ah ]”h"]”Œ3.1.1. prepare()”ah$]”h&]”uh1hµhj h²hh³hÊh´MËubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.2. suspend()”h]”hŒ3.1.2. suspend()”…”�”}”(hj© h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¦ h²hh³hÊh´MÞubhÌ)�”}”(hŒŠThe suspend() callback is only executed during system suspend, after prepare() callbacks have been executed for all devices in the system.”h]”hŒŠThe suspend() callback is only executed during system suspend, after prepare() callbacks have been executed for all devices in the system.”…”�”}”(hj· h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Màhj¦ h²hubhÌ)�”}”(hXÇThis callback is expected to quiesce the device and prepare it to be put into a low-power state by the PCI subsystem. It is not required (in fact it even is not recommended) that a PCI driver's suspend() callback save the standard configuration registers of the device, prepare it for waking up the system, or put it into a low-power state. All of these operations can very well be taken care of by the PCI subsystem, without the driver's participation.”h]”hXËThis callback is expected to quiesce the device and prepare it to be put into a low-power state by the PCI subsystem. It is not required (in fact it even is not recommended) that a PCI driver’s suspend() callback save the standard configuration registers of the device, prepare it for waking up the system, or put it into a low-power state. All of these operations can very well be taken care of by the PCI subsystem, without the driver’s participation.”…”�”}”(hjÅ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mãhj¦ h²hubhÌ)�”}”(hX5However, in some rare case it is convenient to carry out these operations in a PCI driver. Then, pci_save_state(), pci_prepare_to_sleep(), and pci_set_power_state() should be used to save the device's standard configuration registers, to prepare it for system wakeup (if necessary), and to put it into a low-power state, respectively. Moreover, if the driver calls pci_save_state(), the PCI subsystem will not execute either pci_prepare_to_sleep(), or pci_set_power_state() for its device, so the driver is then responsible for handling the device as appropriate.”h]”hX7However, in some rare case it is convenient to carry out these operations in a PCI driver. Then, pci_save_state(), pci_prepare_to_sleep(), and pci_set_power_state() should be used to save the device’s standard configuration registers, to prepare it for system wakeup (if necessary), and to put it into a low-power state, respectively. Moreover, if the driver calls pci_save_state(), the PCI subsystem will not execute either pci_prepare_to_sleep(), or pci_set_power_state() for its device, so the driver is then responsible for handling the device as appropriate.”…”�”}”(hjÓ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mêhj¦ h²hubhÌ)�”}”(hXWhile the suspend() callback is being executed, the driver's interrupt handler can be invoked to handle an interrupt from the device, so all suspend-related operations relying on the driver's ability to handle interrupts should be carried out in this callback.”h]”hXWhile the suspend() callback is being executed, the driver’s interrupt handler can be invoked to handle an interrupt from the device, so all suspend-related operations relying on the driver’s ability to handle interrupts should be carried out in this callback.”…”�”}”(hjá h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Móhj¦ h²hubeh}”(h]”Œsuspend”ah ]”h"]”Œ3.1.2. suspend()”ah$]”h&]”uh1hµhj h²hh³hÊh´MÞubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.3. suspend_noirq()”h]”hŒ3.1.3. suspend_noirq()”…”�”}”(hjú h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj÷ h²hh³hÊh´MùubhÌ)�”}”(hŒÎThe suspend_noirq() callback is only executed during system suspend, after suspend() callbacks have been executed for all devices in the system and after device interrupts have been disabled by the PM core.”h]”hŒÎThe suspend_noirq() callback is only executed during system suspend, after suspend() callbacks have been executed for all devices in the system and after device interrupts have been disabled by the PM core.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mûhj÷ h²hubhÌ)�”}”(hXThe difference between suspend_noirq() and suspend() is that the driver's interrupt handler will not be invoked while suspend_noirq() is running. Thus suspend_noirq() can carry out operations that would cause race conditions to arise if they were performed in suspend().”h]”hXThe difference between suspend_noirq() and suspend() is that the driver’s interrupt handler will not be invoked while suspend_noirq() is running. Thus suspend_noirq() can carry out operations that would cause race conditions to arise if they were performed in suspend().”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mÿhj÷ h²hubeh}”(h]”Œ suspend-noirq”ah ]”h"]”Œ3.1.3. suspend_noirq()”ah$]”h&]”uh1hµhj h²hh³hÊh´Mùubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.4. freeze()”h]”hŒ3.1.4. freeze()”…”�”}”(hj/ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj, h²hh³hÊh´MubhÌ)�”}”(hXqThe freeze() callback is hibernation-specific and is executed in two situations, during hibernation, after prepare() callbacks have been executed for all devices in preparation for the creation of a system image, and during restore, after a system image has been loaded into memory from persistent storage and the prepare() callbacks have been executed for all devices.”h]”hXqThe freeze() callback is hibernation-specific and is executed in two situations, during hibernation, after prepare() callbacks have been executed for all devices in preparation for the creation of a system image, and during restore, after a system image has been loaded into memory from persistent storage and the prepare() callbacks have been executed for all devices.”…”�”}”(hj= h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj, h²hubhÌ)�”}”(hŒðThe role of this callback is analogous to the role of the suspend() callback described above. In fact, they only need to be different in the rare cases when the driver takes the responsibility for putting the device into a low-power state.”h]”hŒðThe role of this callback is analogous to the role of the suspend() callback described above. In fact, they only need to be different in the rare cases when the driver takes the responsibility for putting the device into a low-power state.”…”�”}”(hjK h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hj, h²hubhÌ)�”}”(hŒçIn that cases the freeze() callback should not prepare the device system wakeup or put it into a low-power state. Still, either it or freeze_noirq() should save the device's standard configuration registers using pci_save_state().”h]”hŒéIn that cases the freeze() callback should not prepare the device system wakeup or put it into a low-power state. Still, either it or freeze_noirq() should save the device’s standard configuration registers using pci_save_state().”…”�”}”(hjY h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhj, h²hubeh}”(h]”Œfreeze”ah ]”h"]”Œ3.1.4. freeze()”ah$]”h&]”uh1hµhj h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.5. freeze_noirq()”h]”hŒ3.1.5. freeze_noirq()”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjo h²hh³hÊh´MubhÌ)�”}”(hX»The freeze_noirq() callback is hibernation-specific. It is executed during hibernation, after prepare() and freeze() callbacks have been executed for all devices in preparation for the creation of a system image, and during restore, after a system image has been loaded into memory and after prepare() and freeze() callbacks have been executed for all devices. It is always executed after device interrupts have been disabled by the PM core.”h]”hX»The freeze_noirq() callback is hibernation-specific. It is executed during hibernation, after prepare() and freeze() callbacks have been executed for all devices in preparation for the creation of a system image, and during restore, after a system image has been loaded into memory and after prepare() and freeze() callbacks have been executed for all devices. It is always executed after device interrupts have been disabled by the PM core.”…”�”}”(hj€ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjo h²hubhÌ)�”}”(hŒœThe role of this callback is analogous to the role of the suspend_noirq() callback described above and it very rarely is necessary to define freeze_noirq().”h]”hŒœThe role of this callback is analogous to the role of the suspend_noirq() callback described above and it very rarely is necessary to define freeze_noirq().”…”�”}”(hjŽ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hjo h²hubhÌ)�”}”(hŒxThe difference between freeze_noirq() and freeze() is analogous to the difference between suspend_noirq() and suspend().”h]”hŒxThe difference between freeze_noirq() and freeze() is analogous to the difference between suspend_noirq() and suspend().”…”�”}”(hjœ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M$hjo h²hubeh}”(h]”Œ freeze-noirq”ah ]”h"]”Œ3.1.5. freeze_noirq()”ah$]”h&]”uh1hµhj h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.6. poweroff()”h]”hŒ3.1.6. poweroff()”…”�”}”(hjµ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj² h²hh³hÊh´M(ubhÌ)�”}”(hŒôThe poweroff() callback is hibernation-specific. It is executed when the system is about to be powered off after saving a hibernation image to a persistent storage. prepare() callbacks are executed for all devices before poweroff() is called.”h]”hŒôThe poweroff() callback is hibernation-specific. It is executed when the system is about to be powered off after saving a hibernation image to a persistent storage. prepare() callbacks are executed for all devices before poweroff() is called.”…”�”}”(hjà h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M*hj² h²hubhÌ)�”}”(hX/The role of this callback is analogous to the role of the suspend() and freeze() callbacks described above, although it does not need to save the contents of the device's registers. In particular, if the driver wants to put the device into a low-power state itself instead of allowing the PCI subsystem to do that, the poweroff() callback should use pci_prepare_to_sleep() and pci_set_power_state() to prepare the device for system wakeup and to put it into a low-power state, respectively, but it need not save the device's standard configuration registers.”h]”hX3The role of this callback is analogous to the role of the suspend() and freeze() callbacks described above, although it does not need to save the contents of the device’s registers. In particular, if the driver wants to put the device into a low-power state itself instead of allowing the PCI subsystem to do that, the poweroff() callback should use pci_prepare_to_sleep() and pci_set_power_state() to prepare the device for system wakeup and to put it into a low-power state, respectively, but it need not save the device’s standard configuration registers.”…”�”}”(hjÑ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M/hj² h²hubeh}”(h]”Œpoweroff”ah ]”h"]”Œ3.1.6. poweroff()”ah$]”h&]”uh1hµhj h²hh³hÊh´M(ubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.7. poweroff_noirq()”h]”hŒ3.1.7. poweroff_noirq()”…”�”}”(hjê h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjç h²hh³hÊh´M9ubhÌ)�”}”(hŒ“The poweroff_noirq() callback is hibernation-specific. It is executed after poweroff() callbacks have been executed for all devices in the system.”h]”hŒ“The poweroff_noirq() callback is hibernation-specific. It is executed after poweroff() callbacks have been executed for all devices in the system.”…”�”}”(hjø h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M;hjç h²hubhÌ)�”}”(hŒ¼The role of this callback is analogous to the role of the suspend_noirq() and freeze_noirq() callbacks described above, but it does not need to save the contents of the device's registers.”h]”hŒ¾The role of this callback is analogous to the role of the suspend_noirq() and freeze_noirq() callbacks described above, but it does not need to save the contents of the device’s registers.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M>hjç h²hubhÌ)�”}”(hŒ|The difference between poweroff_noirq() and poweroff() is analogous to the difference between suspend_noirq() and suspend().”h]”hŒ|The difference between poweroff_noirq() and poweroff() is analogous to the difference between suspend_noirq() and suspend().”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MBhjç h²hubeh}”(h]”Œpoweroff-noirq”ah ]”h"]”Œ3.1.7. poweroff_noirq()”ah$]”h&]”uh1hµhj h²hh³hÊh´M9ubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.8. resume_noirq()”h]”hŒ3.1.8. resume_noirq()”…”�”}”(hj- h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj* h²hh³hÊh´MFubhÌ)�”}”(hXThe resume_noirq() callback is only executed during system resume, after the PM core has enabled the non-boot CPUs. The driver's interrupt handler will not be invoked while resume_noirq() is running, so this callback can carry out operations that might race with the interrupt handler.”h]”hX The resume_noirq() callback is only executed during system resume, after the PM core has enabled the non-boot CPUs. The driver’s interrupt handler will not be invoked while resume_noirq() is running, so this callback can carry out operations that might race with the interrupt handler.”…”�”}”(hj; h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MHhj* h²hubhÌ)�”}”(hXWSince the PCI subsystem unconditionally puts all devices into the full power state in the resume_noirq phase of system resume and restores their standard configuration registers, resume_noirq() is usually not necessary. In general it should only be used for performing operations that would lead to race conditions if carried out by resume().”h]”hXWSince the PCI subsystem unconditionally puts all devices into the full power state in the resume_noirq phase of system resume and restores their standard configuration registers, resume_noirq() is usually not necessary. In general it should only be used for performing operations that would lead to race conditions if carried out by resume().”…”�”}”(hjI h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MMhj* h²hubeh}”(h]”Œ resume-noirq”ah ]”h"]”Œ3.1.8. resume_noirq()”ah$]”h&]”uh1hµhj h²hh³hÊh´MFubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.9. resume()”h]”hŒ3.1.9. resume()”…”�”}”(hjb h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj_ h²hh³hÊh´MTubhÌ)�”}”(hŒÄThe resume() callback is only executed during system resume, after resume_noirq() callbacks have been executed for all devices in the system and device interrupts have been enabled by the PM core.”h]”hŒÄThe resume() callback is only executed during system resume, after resume_noirq() callbacks have been executed for all devices in the system and device interrupts have been enabled by the PM core.”…”�”}”(hjp h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MVhj_ h²hubhÌ)�”}”(hŒàThis callback is responsible for restoring the pre-suspend configuration of the device and bringing it back to the fully functional state. The device should be able to process I/O in a usual way after resume() has returned.”h]”hŒàThis callback is responsible for restoring the pre-suspend configuration of the device and bringing it back to the fully functional state. The device should be able to process I/O in a usual way after resume() has returned.”…”�”}”(hj~ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MZhj_ h²hubeh}”(h]”Œresume”ah ]”h"]”Œ3.1.9. resume()”ah$]”h&]”uh1hµhj h²hh³hÊh´MTubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.10. thaw_noirq()”h]”hŒ3.1.10. thaw_noirq()”…”�”}”(hj— h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj” h²hh³hÊh´M_ubhÌ)�”}”(hX®The thaw_noirq() callback is hibernation-specific. It is executed after a system image has been created and the non-boot CPUs have been enabled by the PM core, in the thaw_noirq phase of hibernation. It also may be executed if the loading of a hibernation image fails during system restore (it is then executed after enabling the non-boot CPUs). The driver's interrupt handler will not be invoked while thaw_noirq() is running.”h]”hX°The thaw_noirq() callback is hibernation-specific. It is executed after a system image has been created and the non-boot CPUs have been enabled by the PM core, in the thaw_noirq phase of hibernation. It also may be executed if the loading of a hibernation image fails during system restore (it is then executed after enabling the non-boot CPUs). The driver’s interrupt handler will not be invoked while thaw_noirq() is running.”…”�”}”(hj¥ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mahj” h²hubhÌ)�”}”(hXThe role of this callback is analogous to the role of resume_noirq(). The difference between these two callbacks is that thaw_noirq() is executed after freeze() and freeze_noirq(), so in general it does not need to modify the contents of the device's registers.”h]”hXThe role of this callback is analogous to the role of resume_noirq(). The difference between these two callbacks is that thaw_noirq() is executed after freeze() and freeze_noirq(), so in general it does not need to modify the contents of the device’s registers.”…”�”}”(hj³ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhhj” h²hubeh}”(h]”Œ thaw-noirq”ah ]”h"]”Œ3.1.10. thaw_noirq()”ah$]”h&]”uh1hµhj h²hh³hÊh´M_ubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.11. thaw()”h]”hŒ3.1.11. thaw()”…”�”}”(hjÌ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÉ h²hh³hÊh´MnubhÌ)�”}”(hŒÈThe thaw() callback is hibernation-specific. It is executed after thaw_noirq() callbacks have been executed for all devices in the system and after device interrupts have been enabled by the PM core.”h]”hŒÈThe thaw() callback is hibernation-specific. It is executed after thaw_noirq() callbacks have been executed for all devices in the system and after device interrupts have been enabled by the PM core.”…”�”}”(hjÚ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MphjÉ h²hubhÌ)�”}”(hŒ•This callback is responsible for restoring the pre-freeze configuration of the device, so that it will work in a usual way after thaw() has returned.”h]”hŒ•This callback is responsible for restoring the pre-freeze configuration of the device, so that it will work in a usual way after thaw() has returned.”…”�”}”(hjè h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MthjÉ h²hubeh}”(h]”Œthaw”ah ]”h"]”Œ3.1.11. thaw()”ah$]”h&]”uh1hµhj h²hh³hÊh´Mnubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.12. restore_noirq()”h]”hŒ3.1.12. restore_noirq()”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjþ h²hh³hÊh´MxubhÌ)�”}”(hŒóThe restore_noirq() callback is hibernation-specific. It is executed in the restore_noirq phase of hibernation, when the boot kernel has passed control to the image kernel and the non-boot CPUs have been enabled by the image kernel's PM core.”h]”hŒõThe restore_noirq() callback is hibernation-specific. It is executed in the restore_noirq phase of hibernation, when the boot kernel has passed control to the image kernel and the non-boot CPUs have been enabled by the image kernel’s PM core.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mzhjþ h²hubhÌ)�”}”(hŒúThis callback is analogous to resume_noirq() with the exception that it cannot make any assumption on the previous state of the device, even if the BIOS (or generally the platform firmware) is known to preserve that state over a suspend-resume cycle.”h]”hŒúThis callback is analogous to resume_noirq() with the exception that it cannot make any assumption on the previous state of the device, even if the BIOS (or generally the platform firmware) is known to preserve that state over a suspend-resume cycle.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjþ h²hubhÌ)�”}”(hŒnFor the vast majority of PCI device drivers there is no difference between resume_noirq() and restore_noirq().”h]”hŒnFor the vast majority of PCI device drivers there is no difference between resume_noirq() and restore_noirq().”…”�”}”(hj+ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M„hjþ h²hubeh}”(h]”Œ restore-noirq”ah ]”h"]”Œ3.1.12. restore_noirq()”ah$]”h&]”uh1hµhj h²hh³hÊh´Mxubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.13. restore()”h]”hŒ3.1.13. restore()”…”�”}”(hjD h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjA h²hh³hÊh´MˆubhÌ)�”}”(hŒäThe restore() callback is hibernation-specific. It is executed after restore_noirq() callbacks have been executed for all devices in the system and after the PM core has enabled device drivers' interrupt handlers to be invoked.”h]”hŒæThe restore() callback is hibernation-specific. It is executed after restore_noirq() callbacks have been executed for all devices in the system and after the PM core has enabled device drivers’ interrupt handlers to be invoked.”…”�”}”(hjR h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MŠhjA h²hubhÌ)�”}”(hŒéThis callback is analogous to resume(), just like restore_noirq() is analogous to resume_noirq(). Consequently, the difference between restore_noirq() and restore() is analogous to the difference between resume_noirq() and resume().”h]”hŒéThis callback is analogous to resume(), just like restore_noirq() is analogous to resume_noirq(). Consequently, the difference between restore_noirq() and restore() is analogous to the difference between resume_noirq() and resume().”…”�”}”(hj` h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MŽhjA h²hubhÌ)�”}”(hŒbFor the vast majority of PCI device drivers there is no difference between resume() and restore().”h]”hŒbFor the vast majority of PCI device drivers there is no difference between resume() and restore().”…”�”}”(hjn h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M’hjA h²hubeh}”(h]”Œrestore”ah ]”h"]”Œ3.1.13. restore()”ah$]”h&]”uh1hµhj h²hh³hÊh´Mˆubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.14. complete()”h]”hŒ3.1.14. complete()”…”�”}”(hj‡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj„ h²hh³hÊh´M–ubhÌ)�”}”(hŒ@The complete() callback is executed in the following situations:”h]”hŒ@The complete() callback is executed in the following situations:”…”�”}”(hj• h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M˜hj„ h²hubj±)�”}”(hX_- during system resume, after resume() callbacks have been executed for all devices, - during hibernation, before saving the system image, after thaw() callbacks have been executed for all devices, - during system restore, when the system is going back to its pre-hibernation state, after restore() callbacks have been executed for all devices. ”h]”hŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒRduring system resume, after resume() callbacks have been executed for all devices,”h]”hÌ)�”}”(hŒRduring system resume, after resume() callbacks have been executed for all devices,”h]”hŒRduring system resume, after resume() callbacks have been executed for all devices,”…”�”}”(hj² h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mšhj® ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj© ubj­ )�”}”(hŒnduring hibernation, before saving the system image, after thaw() callbacks have been executed for all devices,”h]”hÌ)�”}”(hŒnduring hibernation, before saving the system image, after thaw() callbacks have been executed for all devices,”h]”hŒnduring hibernation, before saving the system image, after thaw() callbacks have been executed for all devices,”…”�”}”(hjÊ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MœhjÆ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj© ubj­ )�”}”(hŒ‘during system restore, when the system is going back to its pre-hibernation state, after restore() callbacks have been executed for all devices. ”h]”hÌ)�”}”(hŒ�during system restore, when the system is going back to its pre-hibernation state, after restore() callbacks have been executed for all devices.”h]”hŒ�during system restore, when the system is going back to its pre-hibernation state, after restore() callbacks have been executed for all devices.”…”�”}”(hjâ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MžhjÞ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j¬ hj© ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j§ h³hÊh´Mšhj£ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j°h³hÊh´Mšhj„ h²hubhÌ)�”}”(hŒÈIt also may be executed if the loading of a hibernation image into memory fails (in that case it is run after thaw() callbacks have been executed for all devices that have drivers in the boot kernel).”h]”hŒÈIt also may be executed if the loading of a hibernation image into memory fails (in that case it is run after thaw() callbacks have been executed for all devices that have drivers in the boot kernel).”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¡hj„ h²hubhÌ)�”}”(hŒˆThis callback is entirely optional, although it may be necessary if the prepare() callback performs operations that need to be reversed.”h]”hŒˆThis callback is entirely optional, although it may be necessary if the prepare() callback performs operations that need to be reversed.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¥hj„ h²hubeh}”(h]”Œcomplete”ah ]”h"]”Œ3.1.14. complete()”ah$]”h&]”uh1hµhj h²hh³hÊh´M–ubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.15. runtime_suspend()”h]”hŒ3.1.15. runtime_suspend()”…”�”}”(hj+ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj( h²hh³hÊh´M©ubhÌ)�”}”(hŒöThe runtime_suspend() callback is specific to device runtime power management (runtime PM). It is executed by the PM core's runtime PM framework when the device is about to be suspended (i.e. quiesced and put into a low-power state) at run time.”h]”hŒøThe runtime_suspend() callback is specific to device runtime power management (runtime PM). It is executed by the PM core’s runtime PM framework when the device is about to be suspended (i.e. quiesced and put into a low-power state) at run time.”…”�”}”(hj9 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M«hj( h²hubhÌ)�”}”(hŒÛThis callback is responsible for freezing the device and preparing it to be put into a low-power state, but it must allow the PCI subsystem to perform all of the PCI-specific actions necessary for suspending the device.”h]”hŒÛThis callback is responsible for freezing the device and preparing it to be put into a low-power state, but it must allow the PCI subsystem to perform all of the PCI-specific actions necessary for suspending the device.”…”�”}”(hjG h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M°hj( h²hubeh}”(h]”Œruntime-suspend”ah ]”h"]”Œ3.1.15. runtime_suspend()”ah$]”h&]”uh1hµhj h²hh³hÊh´M©ubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.16. runtime_resume()”h]”hŒ3.1.16. runtime_resume()”…”�”}”(hj` h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj] h²hh³hÊh´MµubhÌ)�”}”(hŒõThe runtime_resume() callback is specific to device runtime PM. It is executed by the PM core's runtime PM framework when the device is about to be resumed (i.e. put into the full-power state and programmed to process I/O normally) at run time.”h]”hŒ÷The runtime_resume() callback is specific to device runtime PM. It is executed by the PM core’s runtime PM framework when the device is about to be resumed (i.e. put into the full-power state and programmed to process I/O normally) at run time.”…”�”}”(hjn h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M·hj] h²hubhÌ)�”}”(hŒþThis callback is responsible for restoring the normal functionality of the device after it has been put into the full-power state by the PCI subsystem. The device is expected to be able to process I/O in the usual way after runtime_resume() has returned.”h]”hŒþThis callback is responsible for restoring the normal functionality of the device after it has been put into the full-power state by the PCI subsystem. The device is expected to be able to process I/O in the usual way after runtime_resume() has returned.”…”�”}”(hj| h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¼hj] h²hubeh}”(h]”Œruntime-resume”ah ]”h"]”Œ3.1.16. runtime_resume()”ah$]”h&]”uh1hµhj h²hh³hÊh´Mµubh¶)�”}”(hhh]”(h»)�”}”(hŒ3.1.17. runtime_idle()”h]”hŒ3.1.17. runtime_idle()”…”�”}”(hj• h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj’ h²hh³hÊh´MÂubhÌ)�”}”(hXtThe runtime_idle() callback is specific to device runtime PM. It is executed by the PM core's runtime PM framework whenever it may be desirable to suspend the device according to the PM core's information. In particular, it is automatically executed right after runtime_resume() has returned in case the resume of the device has happened as a result of a spurious event.”h]”hXxThe runtime_idle() callback is specific to device runtime PM. It is executed by the PM core’s runtime PM framework whenever it may be desirable to suspend the device according to the PM core’s information. In particular, it is automatically executed right after runtime_resume() has returned in case the resume of the device has happened as a result of a spurious event.”…”�”}”(hj£ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÄhj’ h²hubhÌ)�”}”(hŒÝThis callback is optional, but if it is not implemented or if it returns 0, the PCI subsystem will call pm_runtime_suspend() for the device, which in turn will cause the driver's runtime_suspend() callback to be executed.”h]”hŒßThis callback is optional, but if it is not implemented or if it returns 0, the PCI subsystem will call pm_runtime_suspend() for the device, which in turn will cause the driver’s runtime_suspend() callback to be executed.”…”�”}”(hj± h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÊhj’ h²hubeh}”(h]”Œ runtime-idle”ah ]”h"]”Œ3.1.17. runtime_idle()”ah$]”h&]”uh1hµhj h²hh³hÊh´MÂubh¶)�”}”(hhh]”(h»)�”}”(hŒ:3.1.18. Pointing Multiple Callback Pointers to One Routine”h]”hŒ:3.1.18. Pointing Multiple Callback Pointers to One Routine”…”�”}”(hjÊ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÇ h²hh³hÊh´MÏubhÌ)�”}”(hXAlthough in principle each of the callbacks described in the previous subsections can be defined as a separate function, it often is convenient to point two or more members of struct dev_pm_ops to the same routine. There are a few convenience macros that can be used for this purpose.”h]”hXAlthough in principle each of the callbacks described in the previous subsections can be defined as a separate function, it often is convenient to point two or more members of struct dev_pm_ops to the same routine. There are a few convenience macros that can be used for this purpose.”…”�”}”(hjØ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÑhjÇ h²hubhÌ)�”}”(hX3The DEFINE_SIMPLE_DEV_PM_OPS() declares a struct dev_pm_ops object with one suspend routine pointed to by the .suspend(), .freeze(), and .poweroff() members and one resume routine pointed to by the .resume(), .thaw(), and .restore() members. The other function pointers in this struct dev_pm_ops are unset.”h]”hX3The DEFINE_SIMPLE_DEV_PM_OPS() declares a struct dev_pm_ops object with one suspend routine pointed to by the .suspend(), .freeze(), and .poweroff() members and one resume routine pointed to by the .resume(), .thaw(), and .restore() members. The other function pointers in this struct dev_pm_ops are unset.”…”�”}”(hjæ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÖhjÇ h²hubhÌ)�”}”(hŒßThe DEFINE_RUNTIME_DEV_PM_OPS() is similar to DEFINE_SIMPLE_DEV_PM_OPS(), but it additionally sets the .runtime_resume() pointer to pm_runtime_force_resume() and the .runtime_suspend() pointer to pm_runtime_force_suspend().”h]”hŒßThe DEFINE_RUNTIME_DEV_PM_OPS() is similar to DEFINE_SIMPLE_DEV_PM_OPS(), but it additionally sets the .runtime_resume() pointer to pm_runtime_force_resume() and the .runtime_suspend() pointer to pm_runtime_force_suspend().”…”�”}”(hjô h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÜhjÇ h²hubhÌ)�”}”(hXThe SYSTEM_SLEEP_PM_OPS() can be used inside of a declaration of struct dev_pm_ops to indicate that one suspend routine is to be pointed to by the .suspend(), .freeze(), and .poweroff() members and one resume routine is to be pointed to by the .resume(), .thaw(), and .restore() members.”h]”hXThe SYSTEM_SLEEP_PM_OPS() can be used inside of a declaration of struct dev_pm_ops to indicate that one suspend routine is to be pointed to by the .suspend(), .freeze(), and .poweroff() members and one resume routine is to be pointed to by the .resume(), .thaw(), and .restore() members.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MàhjÇ h²hubeh}”(h]”Œ2pointing-multiple-callback-pointers-to-one-routine”ah ]”h"]”Œ:3.1.18. pointing multiple callback pointers to one routine”ah$]”h&]”uh1hµhj h²hh³hÊh´MÏubh¶)�”}”(hhh]”(h»)�”}”(hŒ)3.1.19. Driver Flags for Power Management”h]”hŒ)3.1.19. Driver Flags for Power Management”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´MæubhÌ)�”}”(hXYThe PM core allows device drivers to set flags that influence the handling of power management for the devices by the core itself and by middle layer code including the PCI bus type. The flags should be set once at the driver probe time with the help of the dev_pm_set_driver_flags() function and they should not be updated directly afterwards.”h]”hXYThe PM core allows device drivers to set flags that influence the handling of power management for the devices by the core itself and by middle layer code including the PCI bus type. The flags should be set once at the driver probe time with the help of the dev_pm_set_driver_flags() function and they should not be updated directly afterwards.”…”�”}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mèhjh²hubhÌ)�”}”(hXNThe DPM_FLAG_NO_DIRECT_COMPLETE flag prevents the PM core from using the direct-complete mechanism allowing device suspend/resume callbacks to be skipped if the device is in runtime suspend when the system suspend starts. That also affects all of the ancestors of the device, so this flag should only be used if absolutely necessary.”h]”hXNThe DPM_FLAG_NO_DIRECT_COMPLETE flag prevents the PM core from using the direct-complete mechanism allowing device suspend/resume callbacks to be skipped if the device is in runtime suspend when the system suspend starts. That also affects all of the ancestors of the device, so this flag should only be used if absolutely necessary.”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mîhjh²hubhÌ)�”}”(hXeThe DPM_FLAG_SMART_PREPARE flag causes the PCI bus type to return a positive value from pci_pm_prepare() only if the ->prepare callback provided by the driver of the device returns a positive value. That allows the driver to opt out from using the direct-complete mechanism dynamically (whereas setting DPM_FLAG_NO_DIRECT_COMPLETE means permanent opt-out).”h]”hXeThe DPM_FLAG_SMART_PREPARE flag causes the PCI bus type to return a positive value from pci_pm_prepare() only if the ->prepare callback provided by the driver of the device returns a positive value. That allows the driver to opt out from using the direct-complete mechanism dynamically (whereas setting DPM_FLAG_NO_DIRECT_COMPLETE means permanent opt-out).”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Môhjh²hubhÌ)�”}”(hXÜThe DPM_FLAG_SMART_SUSPEND flag tells the PCI bus type that from the driver's perspective the device can be safely left in runtime suspend during system suspend. That causes pci_pm_suspend(), pci_pm_freeze() and pci_pm_poweroff() to avoid resuming the device from runtime suspend unless there are PCI-specific reasons for doing that. Also, it causes pci_pm_suspend_late/noirq() and pci_pm_poweroff_late/noirq() to return early if the device remains in runtime suspend during the "late" phase of the system-wide transition under way. Moreover, if the device is in runtime suspend in pci_pm_resume_noirq() or pci_pm_restore_noirq(), its runtime PM status will be changed to "active" (as it is going to be put into D0 going forward).”h]”hXæThe DPM_FLAG_SMART_SUSPEND flag tells the PCI bus type that from the driver’s perspective the device can be safely left in runtime suspend during system suspend. That causes pci_pm_suspend(), pci_pm_freeze() and pci_pm_poweroff() to avoid resuming the device from runtime suspend unless there are PCI-specific reasons for doing that. Also, it causes pci_pm_suspend_late/noirq() and pci_pm_poweroff_late/noirq() to return early if the device remains in runtime suspend during the “lateâ€� phase of the system-wide transition under way. Moreover, if the device is in runtime suspend in pci_pm_resume_noirq() or pci_pm_restore_noirq(), its runtime PM status will be changed to “activeâ€� (as it is going to be put into D0 going forward).”…”�”}”(hjSh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Múhjh²hubhÌ)�”}”(hXÂSetting the DPM_FLAG_MAY_SKIP_RESUME flag means that the driver allows its "noirq" and "early" resume callbacks to be skipped if the device can be left in suspend after a system-wide transition into the working state. This flag is taken into consideration by the PM core along with the power.may_skip_resume status bit of the device which is set by pci_pm_suspend_noirq() in certain situations. If the PM core determines that the driver's "noirq" and "early" resume callbacks should be skipped, the dev_pm_skip_resume() helper function will return "true" and that will cause pci_pm_resume_noirq() and pci_pm_resume_early() to return upfront without touching the device and executing the driver callbacks.”•ó>h]”hXØSetting the DPM_FLAG_MAY_SKIP_RESUME flag means that the driver allows its “noirqâ€� and “earlyâ€� resume callbacks to be skipped if the device can be left in suspend after a system-wide transition into the working state. This flag is taken into consideration by the PM core along with the power.may_skip_resume status bit of the device which is set by pci_pm_suspend_noirq() in certain situations. If the PM core determines that the driver’s “noirqâ€� and “earlyâ€� resume callbacks should be skipped, the dev_pm_skip_resume() helper function will return “trueâ€� and that will cause pci_pm_resume_noirq() and pci_pm_resume_early() to return upfront without touching the device and executing the driver callbacks.”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjh²hubeh}”(h]”Œ!driver-flags-for-power-management”ah ]”h"]”Œ)3.1.19. driver flags for power management”ah$]”h&]”uh1hµhj h²hh³hÊh´Mæubeh}”(h]”Œpower-management-callbacks”ah ]”h"]”Œ3.1. power management callbacks”ah$]”h&]”uh1hµhj h²hh³hÊh´M®ubh¶)�”}”(hhh]”(h»)�”}”(hŒ$3.2. Device Runtime Power Management”h]”hŒ$3.2. Device Runtime Power Management”…”�”}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´MubhÌ)�”}”(hŒ©In addition to providing device power management callbacks PCI device drivers are responsible for controlling the runtime power management (runtime PM) of their devices.”h]”hŒ©In addition to providing device power management callbacks PCI device drivers are responsible for controlling the runtime power management (runtime PM) of their devices.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjh²hubhÌ)�”}”(hX7The PCI device runtime PM is optional, but it is recommended that PCI device drivers implement it at least in the cases where there is a reliable way of verifying that the device is not used (like when the network cable is detached from an Ethernet adapter or there are no devices attached to a USB controller).”h]”hX7The PCI device runtime PM is optional, but it is recommended that PCI device drivers implement it at least in the cases where there is a reliable way of verifying that the device is not used (like when the network cable is detached from an Ethernet adapter or there are no devices attached to a USB controller).”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjh²hubhÌ)�”}”(hX½To support the PCI runtime PM the driver first needs to implement the runtime_suspend() and runtime_resume() callbacks. It also may need to implement the runtime_idle() callback to prevent the device from being suspended again every time right after the runtime_resume() callback has returned (alternatively, the runtime_suspend() callback will have to check if the device should really be suspended and return -EAGAIN if that is not the case).”h]”hX½To support the PCI runtime PM the driver first needs to implement the runtime_suspend() and runtime_resume() callbacks. It also may need to implement the runtime_idle() callback to prevent the device from being suspended again every time right after the runtime_resume() callback has returned (alternatively, the runtime_suspend() callback will have to check if the device should really be suspended and return -EAGAIN if that is not the case).”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjh²hubhÌ)�”}”(hXœThe runtime PM of PCI devices is enabled by default by the PCI core. PCI device drivers do not need to enable it and should not attempt to do so. However, it is blocked by pci_pm_init() that runs the pm_runtime_forbid() helper function. In addition to that, the runtime PM usage counter of each PCI device is incremented by local_pci_probe() before executing the probe callback provided by the device's driver.”h]”hXžThe runtime PM of PCI devices is enabled by default by the PCI core. PCI device drivers do not need to enable it and should not attempt to do so. However, it is blocked by pci_pm_init() that runs the pm_runtime_forbid() helper function. In addition to that, the runtime PM usage counter of each PCI device is incremented by local_pci_probe() before executing the probe callback provided by the device’s driver.”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M#hjh²hubhÌ)�”}”(hXÑIf a PCI driver implements the runtime PM callbacks and intends to use the runtime PM framework provided by the PM core and the PCI subsystem, it needs to decrement the device's runtime PM usage counter in its probe callback function. If it doesn't do that, the counter will always be different from zero for the device and it will never be runtime-suspended. The simplest way to do that is by calling pm_runtime_put_noidle(), but if the driver wants to schedule an autosuspend right away, for example, it may call pm_runtime_put_autosuspend() instead for this purpose. Generally, it just needs to call a function that decrements the devices usage counter from its probe routine to make runtime PM work for the device.”h]”hXÕIf a PCI driver implements the runtime PM callbacks and intends to use the runtime PM framework provided by the PM core and the PCI subsystem, it needs to decrement the device’s runtime PM usage counter in its probe callback function. If it doesn’t do that, the counter will always be different from zero for the device and it will never be runtime-suspended. The simplest way to do that is by calling pm_runtime_put_noidle(), but if the driver wants to schedule an autosuspend right away, for example, it may call pm_runtime_put_autosuspend() instead for this purpose. Generally, it just needs to call a function that decrements the devices usage counter from its probe routine to make runtime PM work for the device.”…”�”}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M*hjh²hubhÌ)�”}”(hXJIt is important to remember that the driver's runtime_suspend() callback may be executed right after the usage counter has been decremented, because user space may already have caused the pm_runtime_allow() helper function unblocking the runtime PM of the device to run via sysfs, so the driver must be prepared to cope with that.”h]”hXLIt is important to remember that the driver’s runtime_suspend() callback may be executed right after the usage counter has been decremented, because user space may already have caused the pm_runtime_allow() helper function unblocking the runtime PM of the device to run via sysfs, so the driver must be prepared to cope with that.”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M5hjh²hubhÌ)�”}”(hXlThe driver itself should not call pm_runtime_allow(), though. Instead, it should let user space or some platform-specific code do that (user space can do it via sysfs as stated above), but it must be prepared to handle the runtime PM of the device correctly as soon as pm_runtime_allow() is called (which may happen at any time, even before the driver is loaded).”h]”hXlThe driver itself should not call pm_runtime_allow(), though. Instead, it should let user space or some platform-specific code do that (user space can do it via sysfs as stated above), but it must be prepared to handle the runtime PM of the device correctly as soon as pm_runtime_allow() is called (which may happen at any time, even before the driver is loaded).”…”�”}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M;hjh²hubhÌ)�”}”(hX‹When the driver's remove callback runs, it has to balance the decrementation of the device's runtime PM usage counter at the probe time. For this reason, if it has decremented the counter in its probe callback, it must run pm_runtime_get_noresume() in its remove callback. [Since the core carries out a runtime resume of the device and bumps up the device's usage counter before running the driver's remove callback, the runtime PM of the device is effectively disabled for the duration of the remove execution and all runtime PM helper functions incrementing the device's usage counter are then effectively equivalent to pm_runtime_get_noresume().]”h]”hX•When the driver’s remove callback runs, it has to balance the decrementation of the device’s runtime PM usage counter at the probe time. For this reason, if it has decremented the counter in its probe callback, it must run pm_runtime_get_noresume() in its remove callback. [Since the core carries out a runtime resume of the device and bumps up the device’s usage counter before running the driver’s remove callback, the runtime PM of the device is effectively disabled for the duration of the remove execution and all runtime PM helper functions incrementing the device’s usage counter are then effectively equivalent to pm_runtime_get_noresume().]”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MAhjh²hubhÌ)�”}”(hXThe runtime PM framework works by processing requests to suspend or resume devices, or to check if they are idle (in which cases it is reasonable to subsequently request that they be suspended). These requests are represented by work items put into the power management workqueue, pm_wq. Although there are a few situations in which power management requests are automatically queued by the PM core (for example, after processing a request to resume a device the PM core automatically queues a request to check if the device is idle), device drivers are generally responsible for queuing power management requests for their devices. For this purpose they should use the runtime PM helper functions provided by the PM core, discussed in Documentation/power/runtime_pm.rst.”h]”hXThe runtime PM framework works by processing requests to suspend or resume devices, or to check if they are idle (in which cases it is reasonable to subsequently request that they be suspended). These requests are represented by work items put into the power management workqueue, pm_wq. Although there are a few situations in which power management requests are automatically queued by the PM core (for example, after processing a request to resume a device the PM core automatically queues a request to check if the device is idle), device drivers are generally responsible for queuing power management requests for their devices. For this purpose they should use the runtime PM helper functions provided by the PM core, discussed in Documentation/power/runtime_pm.rst.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MKhjh²hubhÌ)�”}”(hŒßDevices can also be suspended and resumed synchronously, without placing a request into pm_wq. In the majority of cases this also is done by their drivers that use helper functions provided by the PM core for this purpose.”h]”hŒßDevices can also be suspended and resumed synchronously, without placing a request into pm_wq. In the majority of cases this also is done by their drivers that use helper functions provided by the PM core for this purpose.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MWhjh²hubhÌ)�”}”(hŒ^For more information on the runtime PM of devices refer to Documentation/power/runtime_pm.rst.”h]”hŒ^For more information on the runtime PM of devices refer to Documentation/power/runtime_pm.rst.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M[hjh²hubeh}”(h]”Œdevice-runtime-power-management”ah ]”h"]”Œ$3.2. device runtime power management”ah$]”h&]”uh1hµhj h²hh³hÊh´Mubeh}”(h]”Œ'pci-device-drivers-and-power-management”ah ]”h"]”Œ*3. pci device drivers and power management”ah$]”h&]”uh1hµhh·h²hh³hÊh´M«ubh¶)�”}”(hhh]”(h»)�”}”(hŒ 4. Resources”h]”hŒ 4. Resources”…”�”}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj:h²hh³hÊh´M`ubhÌ)�”}”(hŒ%PCI Local Bus Specification, Rev. 3.0”h]”hŒ%PCI Local Bus Specification, Rev. 3.0”…”�”}”(hjKh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mbhj:h²hubhÌ)�”}”(hŒ:PCI Bus Power Management Interface Specification, Rev. 1.2”h]”hŒ:PCI Bus Power Management Interface Specification, Rev. 1.2”…”�”}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mdhj:h²hubhÌ)�”}”(hŒJAdvanced Configuration and Power Interface (ACPI) Specification, Rev. 3.0b”h]”hŒJAdvanced Configuration and Power Interface (ACPI) Specification, Rev. 3.0b”…”�”}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mfhj:h²hubhÌ)�”}”(hŒ(PCI Express Base Specification, Rev. 2.0”h]”hŒ(PCI Express Base Specification, Rev. 2.0”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhhj:h²hubhÌ)�”}”(hŒ'Documentation/driver-api/pm/devices.rst”h]”hŒ'Documentation/driver-api/pm/devices.rst”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mjhj:h²hubhÌ)�”}”(hŒ"Documentation/power/runtime_pm.rst”h]”hŒ"Documentation/power/runtime_pm.rst”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mlhj:h²hubeh}”(h]”Œ resources”ah ]”h"]”Œ 4. resources”ah$]”h&]”uh1hµhh·h²hh³hÊh´M`ubeh}”(h]”Œpci-power-management”ah ]”h"]”Œpci power management”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”jDŒfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jÑŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j¬j©jjj®j«jjj„j�jÿjüj j j‡j„jØjÕjojljþjûj?j<jÒjÏj/j,jöjój7j4j|jyj£ j  jô jñ j) j& jl ji j¯ j¬ jä já j' j$ j\ jY j‘ jŽ jÆ jà jû jø j> j; j� j~ j% j" jZ jW j� jŒ jÄ jÁ jjjtjqj/j,j¤j¡uŒ nametypes”}”(j¬‰j‰j®‰j‰j„‰jÿ‰j ‰j‡‰j؉jo‰jþ‰j?‰jÒ‰j/‰jö‰j7‰j|‰j£ ‰jô ‰j) ‰jl ‰j¯ ‰jä ‰j' ‰j\ ‰j‘ ‰jÆ ‰jû ‰j> ‰j� ‰j% ‰jZ ‰j� ‰jÄ ‰j‰jt‰j/‰j¤‰uh}”(j©h·jj3j«jDjj±j�jjüj‡j j j„jjÕjŠjljÛjûjrj<j‘jÏjBj,jÕjój2j4j jyj j  jc jñ j¦ j& j÷ ji j, j¬ jo já j² j$ jç jY j* jŽ j_ jà j” jø jÉ j; jþ j~ jA j" j„ jW j( jŒ j] jÁ j’ jjÇ jqjj,jj¡j:uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.