Skip to content

drivers/base: bugfix for supplier<-consumer ordering in device_kset

Pingfan Liu linux-omap linux-pci linux-pm linuxppc-dev lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 29 repliesIn review
  2. v22 patches 4 repliesSuperseded
  3. v13 patches 6 repliesSuperseded

Changes in v3 from the cover letter

It is a little hard to impose both "parent<-child" and "supplier<-consumer" on devices_kset. Hence v3 drops this method, postpones the issue to shutdown time instead of probing, and utilizes device-tree info during shutdown instead of the item's seq inside devices_kset.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drivers/base: fold the routine of device's shutdown into a funcdrivers/base/core.c+52 -480 replies
2/4drivers/base: utilize device tree info to shutdown devicesdrivers/base/core.c include/linux/device.h+44 -525 replies
3/4drivers/base: clean up the usage of devices_kset_move_last()drivers/base/core.c+0 -74 replies
4/4Revert "driver core: correct device's shutdown order"drivers/base/base.h drivers/base/core.c drivers/base/dd.c+0 -580 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchPingfan LiuKishon Vijay Abraham I
1/4
2/4T-b T-b T-b R-b R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHv3 0/4] drivers/base: bugfix for supplier<-consumer ordering in device_kset

commit 52cdbdd49853 ("driver core: correct device's shutdown order") places an assumption of supplier<-consumer order on the process of probe. But it turns out to break down the parent <- child order in some scene. E.g in pci, a bridge is enabled by pci core, and behind it, the devices have been probed. Then comes the bridge's module, which enables extra feature(such as hotplug) on this bridge.
This will break the parent<-children order and cause failure when "kexec -e" in some scenario.

v2 -> v3:
It is a little hard to impose both "parent<-child" and "supplier<-consumer" on devices_kset. Hence v3 drops this method, postpones the issue to shutdown time instead of probing, and utilizes device-tree info during shutdown instead of the item's seq inside devices_kset.

Pingfan Liu (4):
drivers/base: fold the routine of device's shutdown into a func drivers/base: utilize device tree info to shutdown devices drivers/base: clean up the usage of devices_kset_move_last() Revert "driver core: correct device's shutdown order"

 drivers/base/base.h    |   1 -
 drivers/base/core.c    | 196 +++++++++++++++++++++++--------------------------
 drivers/base/dd.c      |   8 --
 include/linux/device.h |   1 +
 4 files changed, 92 insertions(+), 114 deletions(-)
Cc Greg Kroah-Hartman <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Grygorii Strashko <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Bjorn Helgaas <[email protected]>
Cc Dave Young <[email protected]>
Signature · 1 line
2.7.4