RFC PCI PM: Make new suspend-resume callbacks carry out core operations
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest10 patches 30 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | PCI PM: Fix poweroff and restore callbacksdrivers/ | +5 | 0 replies | |
| 1/10 | PCI PM: Fix poweroff and restore callbacksdrivers/ | +5 | 2 replies | |
| 2/10 | PCI PM: Add suspend counterpart of pci_reenable_devicedrivers/ drivers/ drivers/ | +59 | 0 replies | |
| 2/10 | PCI PM: Add suspend counterpart of pci_reenable_devicedrivers/ drivers/ drivers/ | +59 | 4 replies | |
| 3/10 | PCI PM: Power-manage devices without drivers during suspend-resumedrivers/ | +29 | 0 replies | |
| 3/10 | PCI PM: Power-manage devices without drivers during suspend-resumedrivers/ | +29 | 2 replies | |
| 4/10 | PCI PM: Move pci_has_legacy_pm_supportdrivers/ | +8 | 0 replies | |
| 4/10 | PCI PM: Move pci_has_legacy_pm_supportdrivers/ | +8 | 2 replies | |
| 5/10 | PCI PM: Avoid touching devices behind bridges in unknown statedrivers/ drivers/ drivers/ | +74 | 0 replies | |
| 5/10 | PCI PM: Avoid touching devices behind bridges in unknown statedrivers/ drivers/ drivers/ | +74 | 0 replies | |
| 5/10 | PCI PM: Avoid touching devices behind bridges in unknown state (rev. 2)drivers/ drivers/ drivers/ | +74 | 0 replies | |
| 5/10 | PCI PM: Avoid touching devices behind bridges in unknown state (rev. 2)drivers/ drivers/ drivers/ | +74 | 8 replies | |
| 6/10 | PCI PM: Rearrange code in pci-driver.cdrivers/ | +65 | 0 replies | |
| 6/10 | PCI PM: Rearrange code in pci-driver.cdrivers/ | +65 | 4 replies | |
| 7/10 | PCI PM: Call pci_fixup_device from legacy routinesdrivers/ | +19 | 0 replies | |
| 7/10 | PCI PM: Call pci_fixup_device from legacy routinesdrivers/ | +19 | 2 replies | |
| 8/10 | PCI PM: Register power state of devices during initializationdrivers/ | +6 | 0 replies | |
| 8/10 | PCI PM: Register power state of devices during initializationdrivers/ | +6 | 2 replies | |
| 9/10 | PCI PM: Run default PM callbacks for all devices using new frameworkdrivers/ | +53 | 0 replies | |
| 9/10 | PCI PM: Run default PM callbacks for all devices using new frameworkdrivers/ | +53 | 2 replies | |
| 10/10 | PCI PM: Put PM callbacks in the order of executiondrivers/ | +43 | 0 replies | |
| 10/10 | PCI PM: Put PM callbacks in the order of executiondrivers/ | +43 | 2 replies |
Reviews trailers per patch
16 of 22 patches have a Reviewed-by or Acked-by.
| Patch | Pavel Machek |
|---|---|
| 1/10 | A-b A-b |
| 1/10 | A-b A-b |
| 2/10 | A-b A-b |
| 2/10 | A-b A-b |
| 3/10 | A-b A-b |
| 3/10 | A-b A-b |
| 4/10 | A-b A-b |
| 4/10 | A-b A-b |
| 5/10 | |
| 5/10 | |
| 5/10 | |
| 5/10 | |
| 6/10 | |
| 6/10 | |
| 7/10 | A-b A-b |
| 7/10 | A-b A-b |
| 8/10 | A-b A-b |
| 8/10 | A-b A-b |
| 9/10 | A-b A-b |
| 9/10 | A-b A-b |
| 10/10 | A-b A-b |
| 10/10 | A-b A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC][PATCH 0/10] PCI PM: Make new suspend-resume callbacks carry out core operations
Quoted 26 lines · Rafael J. Wysocki
Quoted 11 lines · Rafael J. Wysocki
Hi Len,
The patch below adds the callbacks that save/restore the standard PCI config registers, change the power state of the device etc. to the new suspend-resume callbacks (which are not yet used by device drivers), so that the drivers don't have to worry about these operations.
The saving and restoring of the standard PCI config registers is done with interrupts off, the other things are done with interrupts enabled.
The patch should apply to the current linux-next tree.
Below is a new version of the patch.
Now, the standard config spaces of devices are restored with interrupts disabled, but only if the bridges the devices are behind are in D0. Otherwise, the operation is attempted again with interrupts enabled (presumably the bridge would be put into D0 before that happens).
Also,
pci_disable_device()is not called during resume andpci_reenable_device()is used to enable the devices that were enabled during suspend. This allows us to automatically callpci_set_master()for devices that were bus masters before suspend. Additionally, thepci_reenable_device()may be overriden by the driver, by disabling the device during suspend.
Quoted 7 lines
Finally, bridges are handled a bit differently from the regular devices (they are not put into low power states during suspend and
pci_enable_wake()is not called for them.The patch should apply on top of linux-next with the patch fixing
pci_update_current_state()I sent yesterday
(http://marc.info/?l=linux-kernel&m=123039199607159&w=4).
In the meantime I realized that the pcibios_enable_device() called from pci_reenable_device() in the resume code path should be balanced by a "suspend" call of the same kind.
Also, I decided to split the patch into a series of smaller patches with their own changelogs to make it easier to follow the changes. Perhaps this way it will be more clear what I'm after.
The patches should apply to linux-next with the patch from
http://marc.info/?l=linux-kernel&m=123039199607159&w=4 on top.
Comments welcome.
Happy New Year to everyone,
Rafael