RFC PM: Rework suspend-resume ordering to avoid problems with shared interrupts
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest8 patches 34 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | PM: Rework handling of interrupts during suspend-resume (rev. 5)arch/ drivers/ drivers/ +10 more | +181 | 22 replies | |
| 2/8 | PM: Change suspend code orderingkernel/ | +22 | 0 replies | |
| 2/8 | PM: Change suspend code orderingkernel/ | +22 | 0 replies | |
| 3/8 | PM: Change hibernation code orderingkernel/ | +61 | 0 replies | |
| 3/8 | PM: Change hibernation code orderingkernel/ | +61 | 0 replies | |
| 4/8 | kexec: Change kexec jump code orderingkernel/ | +9 | 0 replies | |
| 4/8 | kexec: Change kexec jump code orderingkernel/ | +9 | 0 replies | |
| 5/8 | PCI PM: Consistently use variable name "error" for pm call return valuesdrivers/ | +10 | 0 replies | |
| 5/8 | PCI PM: Consistently use variable name "error" for pm call return valuesdrivers/ | +10 | 0 replies | |
| 6/8 | PCI PM: Use pci_set_power_state during early resumedrivers/ | +9 | 0 replies | |
| 6/8 | PCI PM: Use pci_set_power_state during early resumedrivers/ | +9 | 0 replies | |
| 7/8 | PCI PM: Move pci_restore_standard_config to pci-driver.cdrivers/ drivers/ drivers/ | +17 | 0 replies | |
| 7/8 | PCI PM: Move pci_restore_standard_config to pci-driver.cdrivers/ drivers/ drivers/ | +17 | 0 replies | |
| 8/8 | PCI PM: Put devices into low power states during late suspenddrivers/ | +77 | 0 replies | |
| 8/8 | PCI PM: Put devices into low power states during late suspenddrivers/ | +77 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC][PATCH][0/8] PM: Rework suspend-resume ordering to avoid problems with shared interrupts
Hi,
The following patches modifiy the way in which we handle disabling interrupts during suspend and enabling them during resume. They also change the ordering of the core suspend and hibernation code to take advantage of the new approach to the interrupts and modify the PCI PM core to avoid a few problems.
Namely, interrupts are currently disabled on the boot CPU as soon as the nonboot CPUs have been disabled, which doesn't allow device drivers' "late" suspend and "early" resume callbacks to sleep. Among other things this means they cannot execute ACPI AML routines, which leads to problems with suspend-resume of PCI devices, as recently discussed.
1/8 modifies the [suspend|hibernation] and resume code, as well as the other code using the device PM framework, so that device drivers will not receive interrupts during the "late" suspend phase, although interrupts will only be disabled on the CPU right before calling sysdev_suspend() (and analogously during resume).
2/8 - 4/8 modify the suspend, hibernation and kexec jump code, respectively, so that the "late" phase of suspending devices will happen before executing the platform "prepare" callback and disabling nonboot CPUs (and analogously during resume).
5/8 is a patch that's already in the PCI linux-next tree and I included it in the series, because the next patches depend on it.
6/8 makes the PCI PM core use pci_set_power_state() to put devices into D0 during early resume, which allows the platform-specific operations to be carried out at that time, if necessary.
7/8 uses the opportunity to move pci_restore_standard_config() to pci-driver.c, where it belongs IMO.
8/8 makes the PCI PM core code put devices into low power states during the "late" phase of suspend which allows us to avoid a long-standing race related to shared interrupts and to handle devices that require some platform-specific operations to be put into low power states appropriately at the same time.
Comments welcome.
Thanks,
Rafael