Skip to content

PCI, x86: pci root bus hotplug support

Yinghai Lu linux-acpi linux-iommu linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest47 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/47IOMMU: Update dmar units devices list during hotplugdrivers/iommu/intel-iommu.c include/linux/dmar.h+180 -120 replies
2/47PNPACPI: Fix device ref leaking in acpi_pnp_matchdrivers/pnp/pnpacpi/core.c+6 -10 replies
3/47IOMMU: Fix tboot force iommu logicdrivers/iommu/intel-iommu.c+3 -30 replies
4/47x86, PCI: Fix non acpi path pci_sysdata leaking with release_fnarch/x86/pci/common.c+11 -60 replies
5/47PCI: Separate out pci_assign_unassigned_bus_resources()drivers/pci/setup-bus.c include/linux/pci.h+19 -140 replies
6/47PCI: Move back pci_rescan_bus()drivers/pci/probe.c drivers/pci/setup-bus.c+21 -220 replies
7/47PCI: pci_bus_size_bridges() should not size own bridgedrivers/pci/hotplug/acpiphp_glue.c drivers/pci/hotplug/cpci_hotplug_pci.c drivers/pci/hotplug/shpchp_pci.c +2 more+20 -120 replies
8/47PCI: Use __pci_bus_size_bridges() directly in pci_assign_unassigned_bus_resources()drivers/pci/setup-bus.c+1 -70 replies
9/47PCI, sysfs: Use device_type and attr_groups with pci devdrivers/pci/pci-sysfs.c drivers/pci/pci.h drivers/pci/probe.c+32 -00 replies
10/47PCI, sysfs: create rescan_bridge under /sys/.../pci/devices/... for pci bridgesDocumentation/ABI/testing/sysfs-bus-pci drivers/pci/pci-sysfs.c+34 -00 replies
11/47PCI: Add pci_bus_add_single_device()drivers/pci/bus.c include/linux/pci.h+40 -00 replies
12/47PCI: Make pci_rescan_bus_bridge_resize() use pci_scan_bridge insteaddrivers/pci/probe.c+6 -40 replies
13/47PCI: Clean up rescan_bus_bridge_resize()drivers/pci/pci-sysfs.c+2 -50 replies
14/47PCI: Rescan bus or bridge using callback method toodrivers/pci/pci-sysfs.c+31 -120 replies
15/47PCI, sysfs: Clean up rescan/remove with scheule_callbackdrivers/pci/pci-sysfs.c+20 -170 replies
16/47x86, PCI: Separate pcibios_allocate_bridge_resources()arch/x86/pci/i386.c+24 -220 replies
17/47x86, PCI: Separate pcibios_allocate_dev_resources()arch/x86/pci/i386.c+23 -190 replies
18/47x86, PCI: Let pcibios_allocate_bus_resources() take bus insteadarch/x86/pci/i386.c+25 -130 replies
19/47PCI: Claim hw/fw allocated resources in hot add path.arch/x86/pci/i386.c drivers/pci/bus.c include/linux/pci.h+19 -40 replies
20/47Correctly clean up pci root buses in function pci_remove_bus()drivers/pci/remove.c+4 -50 replies
21/47PCI: Move pci_stop_and_remove_behind_bridge() downdrivers/pci/remove.c+15 -150 replies
22/47PCI: Add __pci_remove_bus_devices()drivers/pci/remove.c+11 -170 replies
23/47PCI: Use list_for_each_entry_safe instead of list_for_each_safedrivers/pci/remove.c+5 -70 replies
24/47PCI: Add pci_stop_and_remove_bus()drivers/pci/remove.c include/linux/pci.h+33 -00 replies
25/47Fix an access-after-free issue in function pci_stop_and_remove_bus()drivers/pci/remove.c+4 -10 replies
26/47PCI, ACPI: Make acpi_pci_root_remove remove pci root bus toodrivers/acpi/pci_root.c+14 -00 replies
27/47PCI, acpiphp: Separate out hot-add support of pci host bridgedrivers/acpi/Makefile drivers/acpi/pci_root_hp.c drivers/pci/hotplug/acpiphp.h +1 more+260 -920 replies
28/47PCI, ACPI: Add pci_root_hp hot removal notification support.drivers/acpi/pci_root_hp.c+61 -00 replies
29/47PCI, ACPI: Add alloc_acpi_hp_work()drivers/acpi/osl.c include/acpi/acpiosxf.h+30 -00 replies
30/47PCI, acpiphp: Use acpi_hp_workdrivers/pci/hotplug/acpiphp_glue.c+6 -360 replies
31/47PCI, pci_root_hp: Use acpi_hp_workdrivers/acpi/pci_root_hp.c+3 -310 replies
32/47PCI, ACPI: Make kacpi_hotplug_wq staticdrivers/acpi/osl.c include/acpi/acpiosxf.h+1 -40 replies
33/47PCI: Add debug print out for pci related dev releasedrivers/pci/probe.c+3 -00 replies
34/47PCI, pciehp: Separate pci_hp_add_bridge()drivers/pci/hotplug-pci.c drivers/pci/hotplug/pciehp_pci.c drivers/pci/pci.h+16 -160 replies
35/47PCI, cphi_hotplug: Simplify configure_slotdrivers/pci/hotplug/cpci_hotplug_pci.c+6 -290 replies
36/47PCI, shpchp: Simplify configure_devicedrivers/pci/hotplug/shpchp_pci.c+15 -300 replies
37/47PCI: Kill pci_is_reassignedev()drivers/pci/pci.c+3 -140 replies
38/47PCI, sysfs: Prepare to kill pci device rescanDocumentation/feature-removal-schedule.txt drivers/pci/pci-sysfs.c+12 -00 replies
39/47ACPI: Enable SCI_EMULATE to manually simulate physical hotplug testing.drivers/acpi/Kconfig drivers/acpi/Makefile drivers/acpi/bus.c +2 more+160 -00 replies
40/47PCI: Add pci bus removal through /sys/.../pci_bus/.../removeDocumentation/ABI/testing/sysfs-bus-pci drivers/pci/pci-sysfs.c+38 -04 replies
40/47PCI: Add pci bus removal through /sys/.../pci_bus/.../removedrivers/acpi/pci_slot.c drivers/pci/hotplug/acpiphp_core.c drivers/pci/hotplug/pci_hotplug_core.c +7 more+187 -422 replies
41/47PCI, ACPI: Add acpi_pci_root_rescan()drivers/acpi/pci_root_hp.c include/linux/pci-acpi.h+24 -00 replies
42/47PCI: Add __pci_scan_root_bus() that can skip bus_adddrivers/pci/probe.c include/linux/pci.h+13 -30 replies
43/47x86, PCI: add __pci_scan_root_bus_on_node() that can skip bus_addarch/x86/include/asm/pci.h arch/x86/pci/common.c+10 -30 replies
44/47x86, PCI: add __pcibios_scan_specific_bus that can skip bus_addarch/x86/pci/legacy.c+13 -60 replies
45/47x86, PCI: Add pcibios_root_rescan()arch/x86/include/asm/pci.h arch/x86/pci/legacy.c+28 -00 replies
46/47x86, PCI: Add arch version pci_root_rescan()arch/x86/pci/common.c+7 -00 replies
47/47PCI: Add /sys/bus/pci/rescan_rootDocumentation/ABI/testing/sysfs-bus-pci drivers/pci/pci-sysfs.c+28 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/47] PCI, x86: pci root bus hotplug support

will add pci_stop_and_remove_bus() to support remove bus in /sys/devices/pci.../pci_bus/...

To rescan root, need to
echo 1 > /sys/bus/pci/rescan_root

It supports acpi path root bus and legacy root bus.

This patcheset include some IOMM and dmar and pnpacpi fix with device refcount leaking.
also include some bus remove/rescan cleanup.

The patches need to apply to pci/for-linus and pci/linux-next
[PATCH -v3] PCI: pci_host_bridge related cleanup
[PATCH -v11] PCI: allocate pci bus num range for unassigned bridge busn

could get from
git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-root-bus-hotplug

-v2: Address most of Bjorn's review, except still keeping .../pci_bus/.../remove
Separate pci root hot add support from acpiphp to pci_root_hp add hot removal to pci_root_hp
-v3: Reordering the patches about /sys changes at last that Bjorn objects.
Claim hw/fw allocated bus after root bus hot add.
add two patches for Jiang Liu about removal.

Ashok Raj (1):
ACPI: Enable SCI_EMULATE to manually simulate physical hotplug
testing.

Jiang Liu (2):
Correctly clean up pci root buses in function pci_remove_bus() Fix an access-after-free issue in function pci_stop_and_remove_bus()

Yinghai Lu (44):
IOMMU: Update dmar units devices list during hotplug
PNPACPI: Fix device ref leaking in acpi_pnp_match
IOMMU: Fix tboot force iommu logic
x86, PCI: Fix non acpi path pci_sysdata leaking with release_fn
PCI: Separate out pci_assign_unassigned_bus_resources()
PCI: Move back pci_rescan_bus()
PCI: pci_bus_size_bridges() should not size own bridge
PCI: Use __pci_bus_size_bridges() directly in pci_assign_unassigned_bus_resources() PCI, sysfs: Use device_type and attr_groups with pci dev
PCI, sysfs: create rescan_bridge under /sys/.../pci/devices/... for pci bridges
PCI: Add pci_bus_add_single_device()
PCI: Make pci_rescan_bus_bridge_resize() use pci_scan_bridge instead
PCI: Clean up rescan_bus_bridge_resize()
PCI: Rescan bus or bridge using callback method too
PCI, sysfs: Clean up rescan/remove with scheule_callback
x86, PCI: Separate pcibios_allocate_bridge_resources()
x86, PCI: Separate pcibios_allocate_dev_resources()
x86, PCI: Let pcibios_allocate_bus_resources() take bus instead
PCI: Claim hw/fw allocated resources in hot add path.
PCI: Move pci_stop_and_remove_behind_bridge() down
PCI: Add __pci_remove_bus_devices()
PCI: Use list_for_each_entry_safe instead of list_for_each_safe
PCI: Add pci_stop_and_remove_bus()
PCI, ACPI: Make acpi_pci_root_remove remove pci root bus too
PCI, acpiphp: Separate out hot-add support of pci host bridge
PCI, ACPI: Add pci_root_hp hot removal notification support.
PCI, ACPI: Add alloc_acpi_hp_work()
PCI, acpiphp: Use acpi_hp_work
PCI, pci_root_hp: Use acpi_hp_work
PCI, ACPI: Make kacpi_hotplug_wq static
PCI: Add debug print out for pci related dev release
PCI, pciehp: Separate pci_hp_add_bridge()
PCI, cphi_hotplug: Simplify configure_slot
PCI, shpchp: Simplify configure_device
PCI: Kill pci_is_reassignedev()
PCI, sysfs: Prepare to kill pci device rescan
PCI: Add pci bus removal through /sys/.../pci_bus/.../remove
PCI, ACPI: Add acpi_pci_root_rescan()
PCI: Add __pci_scan_root_bus() that can skip bus_add
x86, PCI: add __pci_scan_root_bus_on_node() that can skip bus_add x86, PCI: add __pcibios_scan_specific_bus that can skip bus_add
x86, PCI: Add pcibios_root_rescan()
x86, PCI: Add arch version pci_root_rescan()
PCI: Add /sys/bus/pci/rescan_root

 Documentation/ABI/testing/sysfs-bus-pci    |   27 +++
 Documentation/feature-removal-schedule.txt |    9 +
 arch/x86/include/asm/pci.h                 |    4 +
 arch/x86/pci/common.c                      |   35 +++-
 arch/x86/pci/i386.c                        |  122 ++++++++-----
 arch/x86/pci/legacy.c                      |   45 ++++-
 drivers/acpi/Kconfig                       |   10 +
 drivers/acpi/Makefile                      |    2 +
 drivers/acpi/bus.c                         |    2 +
 drivers/acpi/internal.h                    |    6 +
 drivers/acpi/osl.c                         |   24 ++-
 drivers/acpi/pci_root.c                    |   14 ++
 drivers/acpi/pci_root_hp.c                 |  288 ++++++++++++++++++++++++++++
 drivers/acpi/sci_emu.c                     |  141 ++++++++++++++
 drivers/iommu/intel-iommu.c                |  194 +++++++++++++++++--
 drivers/pci/bus.c                          |   41 ++++
 drivers/pci/hotplug-pci.c                  |   13 ++
 drivers/pci/hotplug/acpiphp.h              |    9 +-
 drivers/pci/hotplug/acpiphp_glue.c         |  149 +++------------
 drivers/pci/hotplug/cpci_hotplug_pci.c     |   35 +---
 drivers/pci/hotplug/pciehp_pci.c           |   18 +--
 drivers/pci/hotplug/shpchp_pci.c           |   45 ++---
 drivers/pci/pci-sysfs.c                    |  153 +++++++++++++--
 drivers/pci/pci.c                          |   17 +--
 drivers/pci/pci.h                          |    2 +
 drivers/pci/probe.c                        |   46 ++++-
 drivers/pci/remove.c                       |   96 ++++++----
 drivers/pci/setup-bus.c                    |   50 ++----
 drivers/pnp/pnpacpi/core.c                 |    7 +-
 include/acpi/acpiosxf.h                    |    9 +-
 include/linux/dmar.h                       |    4 +
 include/linux/pci-acpi.h                   |    7 +
 include/linux/pci.h                        |    8 +
 33 files changed, 1245 insertions(+), 387 deletions(-)
 create mode 100644 drivers/acpi/pci_root_hp.c
 create mode 100644 drivers/acpi/sci_emu.c
Signature · 1 line
1.7.7