Skip to content

PCI, ACPI, x86: pci root bus hotplug support

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest40 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/40PCI: fix default vga ref_countdrivers/gpu/vga/vgaarb.c+9 -53 replies
2/40PCI, x86: clear initial value for root info resourcesarch/x86/pci/acpi.c+1 -20 replies
3/40PCI, ia64: clear initial value for root info resourcesarch/ia64/pci/pci.c+1 -20 replies
4/40PCI, acpiphp: Add is_hotplug_bridge detectiondrivers/pci/hotplug/acpiphp_glue.c+26 -10 replies
5/40PCI: Add root bus children dev's res to fail listdrivers/pci/setup-bus.c+1 -10 replies
6/40PCI: Split out stop_bus_device and remove_bus_dev again.drivers/pci/remove.c+35 -160 replies
7/40x86, PCI: Separate pcibios_allocate_bridge_resources()arch/x86/pci/i386.c+24 -220 replies
8/40x86, PCI: Separate pcibios_allocate_dev_resources()arch/x86/pci/i386.c+23 -190 replies
9/40x86, PCI: Let pcibios_allocate_bus_resources() take bus insteadarch/x86/pci/i386.c+25 -130 replies
10/40x86, PCI: Separate rom resource claim outarch/x86/pci/i386.c+35 -170 replies
11/40PCI, x86: Add pcibios_fw_addr_donearch/x86/pci/i386.c+9 -10 replies
12/40PCI, x86: Remove __init for hw/fw allocated functionsarch/x86/pci/i386.c+6 -60 replies
13/40PCI: Claim hw/fw allocated resources in hot add path.arch/x86/pci/i386.c drivers/pci/bus.c include/linux/pci.h+16 -00 replies
14/40PCI: Separate out pci_assign_unassigned_bus_resources()drivers/pci/setup-bus.c include/linux/pci.h+19 -140 replies
15/40PCI: Move back pci_rescan_bus() to probe.cdrivers/pci/probe.c drivers/pci/setup-bus.c+21 -220 replies
16/40PCI: pci_bus_size_bridges() should not size own bridgedrivers/pci/hotplug/acpiphp_glue.c drivers/pci/setup-bus.c include/linux/pci.h+18 -100 replies
17/40PCI: Use __pci_bus_size_bridges() directly in pci_assign_unassigned_bus_resources()drivers/pci/setup-bus.c+1 -70 replies
18/40PCI: Rescan bus using callback method toodrivers/pci/pci-sysfs.c+19 -90 replies
19/40PCI, sysfs: Clean up rescan/remove with schedule_callbackdrivers/pci/pci-sysfs.c+14 -110 replies
20/40PCI: Fix a device reference count leakage issue in pci_dev_present()drivers/pci/search.c+5 -50 replies
21/40PCI: Add pci_stop_and_remove_root_bus()drivers/pci/probe.c drivers/pci/remove.c include/linux/pci.h+40 -10 replies
22/40PCI, acpiphp: Separate out hot-add support of pci host bridgedrivers/acpi/Makefile drivers/acpi/pci_root_hp.c drivers/pci/hotplug/acpiphp_glue.c+254 -441 reply
23/40PCI, ACPI: Pass device instead of handle when config root bridgedrivers/acpi/pci_root_hp.c+3 -30 replies
24/40PCI, acpi: Update acpi_pci_driver add/remove interfacedrivers/acpi/pci_root.c drivers/acpi/pci_slot.c drivers/pci/hotplug/acpiphp_glue.c +1 more+18 -140 replies
25/40PCI, ACPI: Make acpi_pci_root_remove remove pci root bus toodrivers/acpi/pci_root.c+16 -00 replies
26/40PCI, ACPI: del root bus prtdrivers/acpi/pci_root.c+6 -00 replies
27/40ACPI: acpi_bus_trim to support two steps.drivers/acpi/scan.c+1 -40 replies
28/40PCI, ACPI: Add pci_root_hp hot removal notification support.drivers/acpi/pci_root_hp.c+67 -00 replies
29/40PCI, ACPI: Add alloc_acpi_hp_work()drivers/acpi/osl.c include/acpi/acpiosxf.h+30 -00 replies
30/40PCI, acpiphp: Use acpi_hp_workdrivers/pci/hotplug/acpiphp_glue.c+6 -360 replies
31/40PCI, pci_root_hp: Use acpi_hp_workdrivers/acpi/pci_root_hp.c+3 -310 replies
32/40PCI, ACPI: Make kacpi_hotplug_wq staticdrivers/acpi/osl.c include/acpi/acpiosxf.h+1 -40 replies
33/40ACPI, PCI: Use normal list for struct acpi_pci_driverdrivers/acpi/pci_root.c include/linux/acpi.h+4 -140 replies
34/40ACPI, PCI: Notify acpi_pci_drivers when hot-plugging PCI root bridgesdrivers/acpi/pci_root.c+11 -00 replies
35/40ACPI, PCI: Protect global lists in drivers/acpi/pci_root.cdrivers/acpi/pci_root.c+40 -300 replies
36/40PCI: Set dev_node early for pci_devdrivers/pci/probe.c+1 -00 replies
37/40PCI, x86: Move pci_enable_bridges() downdrivers/acpi/pci_root.c drivers/pci/probe.c drivers/pci/setup-bus.c+4 -20 replies
38/40ACPI, PCI: Skip extra pci_enable_bridges for non hot-add rootdrivers/acpi/pci_root.c drivers/acpi/pci_root_hp.c include/acpi/acpi_bus.h+4 -10 replies
39/40PCI, acpiphp: Don't ailout even no slots found yet.drivers/pci/hotplug/acpiphp.h drivers/pci/hotplug/acpiphp_core.c drivers/pci/hotplug/acpiphp_glue.c+2 -440 replies
40/40ACPI: Enable SCI_EMULATE to manually simulate physical hotplug testing.drivers/acpi/Kconfig drivers/acpi/Makefile drivers/acpi/sci_emu.c+156 -00 replies

Reviews trailers per patch

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

PatchJason Baron
1/40
2/40
3/40
4/40Reported-and-tested-by A-b
5/40
6/40
7/40
8/40
9/40
10/40
11/40
12/40
13/40
14/40
15/40
16/40
17/40
18/40
19/40
20/40
21/40
22/40
23/40
24/40
25/40
26/40
27/40
28/40
29/40
30/40
31/40
32/40
33/40
34/40
35/40
36/40
37/40
38/40
39/40
40/40

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

Read the v1 thread

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

It supports pci root bus removal with
echo "PCI0 3" > /sys/kernel/debug/acpi/sci_notify

add with
echo "PCI0 0" > /sys/kernel/debug/acpi/sci_notify

based on pci/next

We need to separate pci root bus add from acpiphp. so user could only root bus hotplug and pciehp that will make system fw simple.
Also later CONFIG_HOTPLUG will be removed, so pci root bus hotplug will be enabled by default and user still need select acpiphp and pciehp for normal pci device hotplug support.

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

-v6: do not depend on busn-alloc anymore.

part1: cleanup for pci/next
[PATCH 01/40] PCI: fix default vga ref_count
[PATCH 02/40] PCI, x86: clear initial value for root info resources [PATCH 03/40] PCI, ia64: clear initial value for root info resources [PATCH 04/40] PCI, acpiphp: Add is_hotplug_bridge detection [PATCH 05/40] PCI: Add root bus children dev's res to fail list [PATCH 06/40] PCI: Split out stop_bus_device and remove_bus_dev

part2: reserve BIOS allocated resource for hotadd root bus [PATCH 07/40] x86, PCI: Separate pcibios_allocate_bridge_resources() [PATCH 08/40] x86, PCI: Separate pcibios_allocate_dev_resources() [PATCH 09/40] x86, PCI: Let pcibios_allocate_bus_resources() take us instead [PATCH 10/40] x86, PCI: Separate rom resource claim out
[PATCH 11/40] PCI, x86: Add pcibios_fw_addr_done
[PATCH 12/40] PCI, x86: Remove __init for hw/fw allocated functions [PATCH 13/40] PCI: Claim hw/fw allocated resources in hot add path.

part3: pci_assign_unsissigned_bus_resources() for root bus add.
[PATCH 14/40] PCI: Separate out pci_assign_unassigned_bus_resources()
[PATCH 15/40] PCI: Move back pci_rescan_bus() to probe.c
[PATCH 16/40] PCI: pci_bus_size_bridges() should not size own bridge
[PATCH 17/40] PCI: Use __pci_bus_size_bridges() directly in pci_assign_unassigned_bus_resources() [PATCH 18/40] PCI: Rescan bus using callback method too
[PATCH 19/40] PCI, sysfs: Clean up rescan/remove with schedule_callback

part4: Separate root bus add from acpiphp and add removal support. [PATCH 20/40] PCI: Fix a device reference count leakage issue in [PATCH 21/40] PCI: Add pci_stop_and_remove_root_bus() [PATCH 22/40] PCI, acpiphp: Separate out hot-add support of pci host [PATCH 23/40] PCI, ACPI: Pass device instead of handle when config [PATCH 24/40] PCI, acpi: Update acpi_pci_driver add/remove interface [PATCH 25/40] PCI, ACPI: Make acpi_pci_root_remove remove pci root [PATCH 26/40] PCI, ACPI: del root bus prt
[PATCH 27/40] ACPI: acpi_bus_trim to support two steps. [PATCH 28/40] PCI, ACPI: Add pci_root_hp hot removal notification [PATCH 29/40] PCI, ACPI: Add alloc_acpi_hp_work()
[PATCH 30/40] PCI, acpiphp: Use acpi_hp_work
[PATCH 31/40] PCI, pci_root_hp: Use acpi_hp_work
[PATCH 32/40] PCI, ACPI: Make kacpi_hotplug_wq static

part5: add/remove calling for acpi_pci_drivers.
[PATCH 33/40] ACPI, PCI: Use normal list for struct acpi_pci_driver [PATCH 34/40] ACPI, PCI: Notify acpi_pci_drivers when hot-plugging [PATCH 35/40] ACPI, PCI: Protect global lists in
[PATCH 36/40] PCI: Set dev_node early for pci_dev
[PATCH 37/40] PCI, x86: Move pci_enable_bridges() down [PATCH 38/40] ACPI, PCI: Skip extra pci_enable_bridges for non [PATCH 39/40] PCI, acpiphp: Don't ailout even no slots found yet.

part6: acpi add/remove simulation
[PATCH 40/40] ACPI: Enable SCI_EMULATE to manually simulate physical

 arch/ia64/pci/pci.c                |    3 +-
 arch/x86/pci/acpi.c                |    3 +-
 arch/x86/pci/i386.c                |  185 ++++++++++++++++--------
 drivers/acpi/Kconfig               |   10 ++
 drivers/acpi/Makefile              |    2 +
 drivers/acpi/osl.c                 |   24 +++-
 drivers/acpi/pci_root.c            |  123 ++++++++++------
 drivers/acpi/pci_root_hp.c         |  278 ++++++++++++++++++++++++++++++++++++
 drivers/acpi/pci_slot.c            |   12 +-
 drivers/acpi/scan.c                |    5 +-
 drivers/acpi/sci_emu.c             |  145 +++++++++++++++++++
 drivers/gpu/vga/vgaarb.c           |   14 ++-
 drivers/pci/bus.c                  |    2 +
 drivers/pci/hotplug/acpiphp.h      |    1 -
 drivers/pci/hotplug/acpiphp_core.c |   23 +---
 drivers/pci/hotplug/acpiphp_glue.c |  165 +++++++--------------
 drivers/pci/pci-sysfs.c            |   41 ++++--
 drivers/pci/probe.c                |   26 ++++-
 drivers/pci/remove.c               |   87 +++++++++--
 drivers/pci/search.c               |   10 +-
 drivers/pci/setup-bus.c            |   54 +++-----
 include/acpi/acpi_bus.h            |    1 +
 include/acpi/acpiosxf.h            |    9 +-
 include/linux/acpi.h               |    6 +-
 include/linux/pci.h                |    5 +
 25 files changed, 899 insertions(+), 335 deletions(-)
 create mode 100644 drivers/acpi/pci_root_hp.c
 create mode 100644 drivers/acpi/sci_emu.c
Signature · 1 line
1.7.7