Skip to content

ACPI / hotplug / PCI: Consolidation of ACPIPHP with ACPI core device hotplug

Rafael J. Wysocki linux-acpi linux-pci lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 posting 2/224 patches 2 repliesIn review
  2. v3 Latest7 patches 2 repliesIn review
  3. v2 posting 1/26 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches9 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ACPICA: Introduce acpi_get_data_full() and rework acpi_get_data()drivers/acpi/acpica/nsxfeval.c include/acpi/acpixf.h+34 -30 replies
2/7ACPI / hotplug: Fix potential races in notify handlersdrivers/acpi/bus.c drivers/acpi/internal.h drivers/acpi/scan.c+35 -90 replies
3/7ACPI / hotplug / PCI: Define hotplug context lock in the coredrivers/acpi/scan.c drivers/pci/hotplug/acpiphp_glue.c include/acpi/acpi_bus.h+33 -210 replies
4/7ACPI / hotplug / PCI: Consolidate ACPIPHP with ACPI core hotplugdrivers/acpi/scan.c drivers/pci/hotplug/acpiphp.h drivers/pci/hotplug/acpiphp_glue.c +1 more+136 -1370 replies
5/7ACPI / hotplug / PCI: Rework the handling of eject requestsdrivers/acpi/scan.c+10 -100 replies
6/7ACPI / hotplug / PCI: Simplify acpi_install_hotplug_notify_handler()drivers/acpi/scan.c drivers/pci/hotplug/acpiphp_glue.c include/acpi/acpi_bus.h+5 -50 replies
7/7ACPI / hotplug / PCI: Hotplug notifications from acpi_bus_notify()drivers/acpi/bus.c drivers/acpi/internal.h drivers/acpi/scan.c +3 more+46 -1340 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by.

PatchMika Westerberg
SeriesT-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

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

Read the v3 thread

Cover letter [PATCH v3 0/7] ACPI / hotplug / PCI: Consolidation of ACPIPHP with ACPI core device hotplug
Quoted 42 lines · Rafael J. Wysocki
Quoted 22 lines · Rafael J. Wysocki
Quoted 13 lines · Rafael J. Wysocki

Hi All,

It looks like there's time for more adventurous stuff. :-)

The following series is on top of the one I sent on Sunday:

https://lkml.org/lkml/2014/1/26/191

The final outcome of the patches below is that all ACPI hotplug notifications for PCI devices and for core system things like CPU, memory, PCI roots etc., will be dispatched from acpi_bus_notify() and it is not necessary to install a separate hotplug notify handler for each device any more.

Quoted 7 lines

[1/5] Attach ACPIPHP hotplug contexts to struct acpi_device objects.
[2/5] Introduce wrappers for installing and removing hotplug notify handlers
(those wrappers go away later on, but they are useful for separating
changes).
[3/5] Consolidate ACPI hotplug signaling for PCI and ACPI core.
[4/5] Simplify notify handle registration wrapper.
[5/5] Dispatch ACPI hotplug notifications for "core" devices and PCI from acpi_bus_notify().

Quoted 4 lines

Unfortunately, I realized that patches [3-5/5] were buggy. The bugs were kind of subtle and might not be easy to reproduce, but they were bugs anyway. :-)

A respin of the whole series follows.

After the Mika's testing it turned out that they were more buggy than I had though. Oh well.

The following patchset is a reworked version of the previous one. Functionality-wise the final result should be very similar, but not exactly the same.

[1/6] Fix a theoretical race condition in acpi_hotplug_notify_cb().
[2/6] Move the hotplug context lock definition to the ACPI core (from ACPIPHP). [3/6] Consolidate ACPI hotplug signaling for PCI and ACPI core (this is a combination
of patches [1-3/5] from the previous series).
[4/6] Rework the handling of eject requests in the ACPI core.
[5/6] Simplify a routine for installing hotplug notify handlers.
[6/6] Dispatch ACPI hotplug notifications for "core" devices and PCI from acpi_bus_notify().

Quoted 4 lines

This is on top of https://lkml.org/lkml/2014/2/1/123 which in turn is on top of the current mainline.

For the adventurous all this stuff is on the test-next branch of linux-pm.git.

As stated in the message at http://marc.info/?l=linux-acpi&m=139135963030012&w=4 , patch [1/6] was actaully wrong and the whole patchset had to be reworked for that reason. What follows is an entirely new version:

[1/7] Add a new function to ACPICA allowing a callback to be executed under the
namespace mutex after calling acpi_ns_get_attached_data().

[2/7] Use the new ACPICA's function to fix a couple of potential races related
to ACPI notifies.

[3/7] Same as [2/6] above.
[4/7] Same as [3/6] above, rebased.
[5/7] Same as [4/6] above.
[6/7] Same as [5/6] above.
[7/7] Dispatch ACPI hotplug notifications for "core" devices and PCI from
acpi_bus_notify(). This actually is different from [6/6] above, although it serves the same purpose.

Thanks!

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.