Skip to contentSkip to conversation

PCI changes for v3.9

GIT PULL In review Bjorn Helgaas 4 participants 14 messages Feb 23, 2013 – Mar 26, 2013

Subsystems (2)
lore
Share & tools
lore

Bjorn Helgaas

author maintainer
#0 lore raw

The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:

Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v3.9-changes

for you to fetch changes up to 018ba0a6efada61b9bc17500101d81c3d35807c2:

Merge branch 'pci/yinghai-root-bus-hotplug' into next (2013-02-19 11:42:17 -0700)

----------------------------------------------------------------

PCI changes for the v3.9 merge window:

Host bridge hotplug
- Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu)
- Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu)
- Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu)
- Stop caching _PRT and make independent of bus numbers (Yinghai Lu)

PCI device hotplug
- Clean up cpqphp dead code (Sasha Levin)
- Disable ARI unless device and upstream bridge support it (Yijing Wang)
- Initialize all hot-added devices (not functions 0-7) (Yijing Wang)

Power management
- Don't touch ASPM if disabled (Joe Lawrence)
- Fix ASPM link state management (Myron Stowe)

Miscellaneous
- Fix PCI_EXP_FLAGS accessor (Alex Williamson)
- Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov)
- Document hotplug resource and MPS parameters (Yijing Wang)
- Add accessor for PCIe capabilities (Myron Stowe)
- Drop pciehp suspend/resume messages (Paul Bolle)
- Make pci_slot built-in only (not a module) (Jiang Liu)
- Remove unused PCI/ACPI bind ops (Jiang Liu)
- Removed used pci_root_bus (Bjorn Helgaas)

----------------------------------------------------------------
Alex Williamson (1):
PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS

Bjorn Helgaas (23):
ACPI: Remove unused struct acpi_pci_root.id member
x86/PCI: Remove unused pci_root_bus
frv/PCI: Remove unused pci_root_bus
mn10300/PCI: Remove unused pci_root_bus
PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h
PCI: Drop "__" prefix on __pci_enable_device_flags()
Merge branch 'pci/misc' into next
Merge branch 'pci/yinghai-survey-resources' into next
Merge branch 'acpi-scan' of git://git.kernel.org/.../rafael/linux-pm into pci/yinghai-survey-resources+acpi-scan Merge branch 'pci/yinghai-survey-resources+acpi-scan' into next
Merge branch 'pci/rafael-set-root-bridge-handle' into next
Merge branch 'acpi-scan' of git://git.kernel.org/.../rafael/linux-pm into pci/acpi-scan2 Merge branch 'pci/yijing-ari' into next
Merge branch 'pci/acpi-scan2' into next
Merge branch 'pci/yinghai-root-bus-hotplug' into next
Merge branch 'pci/yinghai-root-bus-hotplug' into next
Merge branch 'pci/joe-aspm' into next
Merge branch 'pci/misc' into next
PCI: Use atomic_inc_return() rather than atomic_add_return()
Merge branch 'pci/konstantin-runtime-pm' into next
Merge branch 'pci/jiang-pci_slot-kconfig' into next
Merge branch 'pci/misc' into next
Merge branch 'pci/yinghai-root-bus-hotplug' into next

Jiang Liu (6):
ACPI: remove unused acpi_op_bind and acpi_op_unbind
PCI: Fix reference count leak in pci_dev_present()
PCI: Make device create/destroy logic symmetric
PCI: acpiphp: Create companion ACPI devices before creating PCI devices
PCI: acpiphp: Remove dead code for PCI host bridge hotplug ACPI / PCI: Make pci_slot built-in only, not a module

Joe Lawrence (1):
PCI/ASPM: Don't touch ASPM if forcibly disabled

Konstantin Khlebnikov (2):
PCI: Disable Bus Master unconditionally in pci_device_shutdown()
PCI: Catch attempts to disable already-disabled devices

Mika Westerberg (1):
ACPI / scan: Fix check of device_attach() return value.

Myron Stowe (3):
PCI: Introduce accessor to retrieve PCIe Capabilities Register
PCI: Use PCI Express Capability accessor
PCI/ASPM: Deallocate upstream link state even if device is not PCIe

Paul Bolle (1):
PCI: pciehp: Drop suspend/resume ENTRY messages

Rafael J. Wysocki (25):
ACPI: Separate adding ACPI device objects from probing ACPI drivers
ACPI: Change the ordering of PCI root bridge driver registrarion
ACPI: Make acpi_bus_add() and acpi_bus_start() visibly different
ACPI: Reduce the usage of struct acpi_bus_ops
ACPI: Replace struct acpi_bus_ops with enum type
ACPI: Change the ordering of acpi_bus_check_add()
ACPI / PCI: Fold acpi_pci_root_start() into acpi_pci_root_add()
ACPI: Remove acpi_start_single_object() and acpi_bus_start()
ACPI: Remove the arguments of acpi_bus_add() that are not used
ACPI: Drop the second argument of acpi_bus_scan()
ACPI: Replace ACPI device add_type field with a match_driver flag
ACPI: Make acpi_bus_scan() and acpi_bus_add() take only one argument
ACPI: Add .setup() and .cleanup() callbacks to struct acpi_bus_type ACPI / PCI: Rework the setup and cleanup of device wakeup ACPI / PCI: Move the _PRT setup and cleanup code to pci-acpi.c
ACPI: Drop ACPI device .bind() and .unbind() callbacks ACPI / scan: Treat power resources in a special way
ACPI / PCI: Set root bridge ACPI handle in advance
ACPI: Remove the ops field from struct acpi_device
ACPI / scan: Drop the second argument of acpi_device_unregister() ACPI / scan: Drop the second argument of acpi_bus_trim() ACPI / scan: Change the implementation of acpi_bus_trim() ACPI / scan: Add second pass to acpi_bus_trim()
ACPI / scan: Drop acpi_bus_add() and use acpi_bus_scan() instead PCI/PM: Clear state_saved during suspend

Sasha Levin (1):
PCI: cpqphp: Cleanup and remove unreachable paths

Tang Chen (1):
PCI/ACPI: Print info if host bridge notify handler installation fails

Yijing Wang (10):
PCI: Enable ARI if dev and upstream bridge support it; disable otherwise
PCI: Rename pci_enable_ari() to pci_configure_ari()
PCI: Consolidate "next-function" functions
PCI: pciehp: Iterate over all devices in slot, not functions 0-7
PCI: cpcihp: Iterate over all devices in slot, not functions 0-7
PCI: sgihp: Iterate over all devices in slot, not functions 0-7
PCI: shpchp: Iterate over all devices in slot, not functions 0-7
PCI: Document hpiosize= and hpmemsize= resource reservation parameters
PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc
PCI: Remove unused "rc" in virtfn_add_bus()

Yinghai Lu (19):
x86/PCI: Factor out pcibios_allocate_bridge_resources() x86/PCI: Factor out pcibios_allocate_dev_resources() x86/PCI: Allocate resources on a per-bus basis for hot-adding root buses x86/PCI: Factor out pcibios_allocate_dev_rom_resource() x86/PCI: Don't track firmware-assigned BAR values for hot-added devices x86/PCI: Keep resource allocation functions after boot PCI/ACPI: Reserve firmware-allocated resources for hot-added root buses x86/PCI: Implement pcibios_resource_survey_bus()
ACPI: update ej_event interface to take acpi_device
PCI: Kill pci_is_reassigndev()
PCI: acpiphp: Add is_hotplug_bridge detection
PCI: Add root bus children dev's res to fail list
PCI: Set pci_dev dev_node early so IOAPIC irq_descs are allocated locally PCI/ACPI: acpiphp: Rename alloc_acpiphp_hp_work() to alloc_acpi_hp_work()
PCI: acpiphp: Move host bridge hotplug to pci_root.c
PCI: acpiphp: Keep driver loaded even if no slots found
PCI: Skip attaching driver in device_add()
PCI: Put pci_dev in device tree as early as possible PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers

 Documentation/kernel-parameters.txt     |  21 ++
 arch/frv/mb93090-mb00/pci-frv.h         |   1 -
 arch/frv/mb93090-mb00/pci-vdk.c         |   4 +-
 arch/ia64/pci/pci.c                     |   8 +
 arch/mn10300/unit-asb2305/pci-asb2305.h |   1 -
 arch/mn10300/unit-asb2305/pci.c         |   4 +-
 arch/x86/include/asm/pci.h              |   3 +
 arch/x86/include/asm/pci_x86.h          |   1 -
 arch/x86/pci/acpi.c                     |   9 +
 arch/x86/pci/common.c                   |   1 -
 arch/x86/pci/i386.c                     | 185 +++++++++++-------
 arch/x86/pci/legacy.c                   |   2 +-
 arch/x86/pci/numaq_32.c                 |   2 +-
 drivers/acpi/Kconfig                    |   5 +-
 drivers/acpi/Makefile                   |   2 +-
 drivers/acpi/acpi_memhotplug.c          |  26 +--
 drivers/acpi/container.c                |  31 +--
 drivers/acpi/device_pm.c                |   2 +-
 drivers/acpi/dock.c                     |  17 +-
 drivers/acpi/glue.c                     |  50 +++--
 drivers/acpi/internal.h                 |   7 +
 drivers/acpi/osl.c                      |  24 ++-
 drivers/acpi/pci_bind.c                 | 122 ------------
 drivers/acpi/pci_irq.c                  | 102 ++++------
 drivers/acpi/pci_root.c                 | 233 +++++++++++++---------
 drivers/acpi/pci_slot.c                 |  13 +-
 drivers/acpi/processor_driver.c         |  32 +---
 drivers/acpi/scan.c                     | 330 ++++++++++++--------------------
 drivers/pci/access.c                    |   6 +-
 drivers/pci/bus.c                       |  81 ++------
 drivers/pci/hotplug/acpiphp.h           |  14 +-
 drivers/pci/hotplug/acpiphp_core.c      |  23 +--
 drivers/pci/hotplug/acpiphp_glue.c      | 292 ++++++----------------------
 drivers/pci/hotplug/cpci_hotplug_pci.c  |  29 ++-
 drivers/pci/hotplug/cpqphp_ctrl.c       |  57 ++----
 drivers/pci/hotplug/pciehp_core.c       |   2 -
 drivers/pci/hotplug/pciehp_pci.c        |  44 ++---
 drivers/pci/hotplug/sgi_hotplug.c       |  73 ++++---
 drivers/pci/hotplug/shpchp_pci.c        |  36 ++--
 drivers/pci/iov.c                       |  10 +-
 drivers/pci/pci-acpi.c                  |  45 +++--
 drivers/pci/pci-driver.c                |  12 +-
 drivers/pci/pci.c                       |  80 +++-----
 drivers/pci/pci.h                       |   9 +-
 drivers/pci/pcie/aspm.c                 |   8 +-
 drivers/pci/pcie/portdrv_core.c         |   2 +-
 drivers/pci/probe.c                     | 104 ++++++----
 drivers/pci/remove.c                    |   4 +-
 drivers/pci/search.c                    |  10 +-
 drivers/pci/setup-bus.c                 |   2 +-
 include/acpi/acpi_bus.h                 |  35 ++--
 include/acpi/acpi_drivers.h             |   5 -
 include/acpi/acpiosxf.h                 |   2 -
 include/linux/acpi.h                    |   5 +
 include/linux/pci.h                     |  15 +-
 55 files changed, 919 insertions(+), 1324 deletions(-)
 delete mode 100644 drivers/acpi/pci_bind.c
#1 lore raw
Quoted 11 lines · Bjorn Helgaas

The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:

Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v3.9-changes

for you to fetch changes up to 018ba0a6efada61b9bc17500101d81c3d35807c2:

Merge branch 'pci/yinghai-root-bus-hotplug' into next (2013-02-19 11:42:17 -0700)

may render of bunch of conflicts...

Please check if attached diff is right, and hope it could save Linus some time.

Thanks

Yinghai

Quoted 208 lines

----------------------------------------------------------------

PCI changes for the v3.9 merge window:

Host bridge hotplug
- Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu)
- Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu)
- Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu)
- Stop caching _PRT and make independent of bus numbers (Yinghai Lu)

PCI device hotplug
- Clean up cpqphp dead code (Sasha Levin)
- Disable ARI unless device and upstream bridge support it (Yijing Wang)
- Initialize all hot-added devices (not functions 0-7) (Yijing Wang)

Power management
- Don't touch ASPM if disabled (Joe Lawrence)
- Fix ASPM link state management (Myron Stowe)

Miscellaneous
- Fix PCI_EXP_FLAGS accessor (Alex Williamson)
- Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov)
- Document hotplug resource and MPS parameters (Yijing Wang)
- Add accessor for PCIe capabilities (Myron Stowe)
- Drop pciehp suspend/resume messages (Paul Bolle)
- Make pci_slot built-in only (not a module) (Jiang Liu)
- Remove unused PCI/ACPI bind ops (Jiang Liu)
- Removed used pci_root_bus (Bjorn Helgaas)

----------------------------------------------------------------
Alex Williamson (1):
PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS

Bjorn Helgaas (23):
ACPI: Remove unused struct acpi_pci_root.id member
x86/PCI: Remove unused pci_root_bus
frv/PCI: Remove unused pci_root_bus
mn10300/PCI: Remove unused pci_root_bus
PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h
PCI: Drop "__" prefix on __pci_enable_device_flags()
Merge branch 'pci/misc' into next
Merge branch 'pci/yinghai-survey-resources' into next
Merge branch 'acpi-scan' of git://git.kernel.org/.../rafael/linux-pm into pci/yinghai-survey-resources+acpi-scan Merge branch 'pci/yinghai-survey-resources+acpi-scan' into next
Merge branch 'pci/rafael-set-root-bridge-handle' into next
Merge branch 'acpi-scan' of git://git.kernel.org/.../rafael/linux-pm into pci/acpi-scan2 Merge branch 'pci/yijing-ari' into next
Merge branch 'pci/acpi-scan2' into next
Merge branch 'pci/yinghai-root-bus-hotplug' into next
Merge branch 'pci/yinghai-root-bus-hotplug' into next
Merge branch 'pci/joe-aspm' into next
Merge branch 'pci/misc' into next
PCI: Use atomic_inc_return() rather than atomic_add_return()
Merge branch 'pci/konstantin-runtime-pm' into next
Merge branch 'pci/jiang-pci_slot-kconfig' into next
Merge branch 'pci/misc' into next
Merge branch 'pci/yinghai-root-bus-hotplug' into next

Jiang Liu (6):
ACPI: remove unused acpi_op_bind and acpi_op_unbind
PCI: Fix reference count leak in pci_dev_present()
PCI: Make device create/destroy logic symmetric
PCI: acpiphp: Create companion ACPI devices before creating PCI devices
PCI: acpiphp: Remove dead code for PCI host bridge hotplug ACPI / PCI: Make pci_slot built-in only, not a module

Joe Lawrence (1):
PCI/ASPM: Don't touch ASPM if forcibly disabled

Konstantin Khlebnikov (2):
PCI: Disable Bus Master unconditionally in pci_device_shutdown()
PCI: Catch attempts to disable already-disabled devices

Mika Westerberg (1):
ACPI / scan: Fix check of device_attach() return value.

Myron Stowe (3):
PCI: Introduce accessor to retrieve PCIe Capabilities Register
PCI: Use PCI Express Capability accessor
PCI/ASPM: Deallocate upstream link state even if device is not PCIe

Paul Bolle (1):
PCI: pciehp: Drop suspend/resume ENTRY messages

Rafael J. Wysocki (25):
ACPI: Separate adding ACPI device objects from probing ACPI drivers
ACPI: Change the ordering of PCI root bridge driver registrarion
ACPI: Make acpi_bus_add() and acpi_bus_start() visibly different
ACPI: Reduce the usage of struct acpi_bus_ops
ACPI: Replace struct acpi_bus_ops with enum type
ACPI: Change the ordering of acpi_bus_check_add()
ACPI / PCI: Fold acpi_pci_root_start() into acpi_pci_root_add()
ACPI: Remove acpi_start_single_object() and acpi_bus_start()
ACPI: Remove the arguments of acpi_bus_add() that are not used
ACPI: Drop the second argument of acpi_bus_scan()
ACPI: Replace ACPI device add_type field with a match_driver flag
ACPI: Make acpi_bus_scan() and acpi_bus_add() take only one argument
ACPI: Add .setup() and .cleanup() callbacks to struct acpi_bus_type ACPI / PCI: Rework the setup and cleanup of device wakeup ACPI / PCI: Move the _PRT setup and cleanup code to pci-acpi.c
ACPI: Drop ACPI device .bind() and .unbind() callbacks ACPI / scan: Treat power resources in a special way
ACPI / PCI: Set root bridge ACPI handle in advance
ACPI: Remove the ops field from struct acpi_device
ACPI / scan: Drop the second argument of acpi_device_unregister() ACPI / scan: Drop the second argument of acpi_bus_trim() ACPI / scan: Change the implementation of acpi_bus_trim() ACPI / scan: Add second pass to acpi_bus_trim()
ACPI / scan: Drop acpi_bus_add() and use acpi_bus_scan() instead PCI/PM: Clear state_saved during suspend

Sasha Levin (1):
PCI: cpqphp: Cleanup and remove unreachable paths

Tang Chen (1):
PCI/ACPI: Print info if host bridge notify handler installation fails

Yijing Wang (10):
PCI: Enable ARI if dev and upstream bridge support it; disable otherwise
PCI: Rename pci_enable_ari() to pci_configure_ari()
PCI: Consolidate "next-function" functions
PCI: pciehp: Iterate over all devices in slot, not functions 0-7
PCI: cpcihp: Iterate over all devices in slot, not functions 0-7
PCI: sgihp: Iterate over all devices in slot, not functions 0-7
PCI: shpchp: Iterate over all devices in slot, not functions 0-7
PCI: Document hpiosize= and hpmemsize= resource reservation parameters
PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc
PCI: Remove unused "rc" in virtfn_add_bus()

Yinghai Lu (19):
x86/PCI: Factor out pcibios_allocate_bridge_resources() x86/PCI: Factor out pcibios_allocate_dev_resources() x86/PCI: Allocate resources on a per-bus basis for hot-adding root buses x86/PCI: Factor out pcibios_allocate_dev_rom_resource() x86/PCI: Don't track firmware-assigned BAR values for hot-added devices x86/PCI: Keep resource allocation functions after boot PCI/ACPI: Reserve firmware-allocated resources for hot-added root buses x86/PCI: Implement pcibios_resource_survey_bus()
ACPI: update ej_event interface to take acpi_device
PCI: Kill pci_is_reassigndev()
PCI: acpiphp: Add is_hotplug_bridge detection
PCI: Add root bus children dev's res to fail list
PCI: Set pci_dev dev_node early so IOAPIC irq_descs are allocated locally PCI/ACPI: acpiphp: Rename alloc_acpiphp_hp_work() to alloc_acpi_hp_work()
PCI: acpiphp: Move host bridge hotplug to pci_root.c
PCI: acpiphp: Keep driver loaded even if no slots found
PCI: Skip attaching driver in device_add()
PCI: Put pci_dev in device tree as early as possible PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers

 Documentation/kernel-parameters.txt     |  21 ++
 arch/frv/mb93090-mb00/pci-frv.h         |   1 -
 arch/frv/mb93090-mb00/pci-vdk.c         |   4 +-
 arch/ia64/pci/pci.c                     |   8 +
 arch/mn10300/unit-asb2305/pci-asb2305.h |   1 -
 arch/mn10300/unit-asb2305/pci.c         |   4 +-
 arch/x86/include/asm/pci.h              |   3 +
 arch/x86/include/asm/pci_x86.h          |   1 -
 arch/x86/pci/acpi.c                     |   9 +
 arch/x86/pci/common.c                   |   1 -
 arch/x86/pci/i386.c                     | 185 +++++++++++-------
 arch/x86/pci/legacy.c                   |   2 +-
 arch/x86/pci/numaq_32.c                 |   2 +-
 drivers/acpi/Kconfig                    |   5 +-
 drivers/acpi/Makefile                   |   2 +-
 drivers/acpi/acpi_memhotplug.c          |  26 +--
 drivers/acpi/container.c                |  31 +--
 drivers/acpi/device_pm.c                |   2 +-
 drivers/acpi/dock.c                     |  17 +-
 drivers/acpi/glue.c                     |  50 +++--
 drivers/acpi/internal.h                 |   7 +
 drivers/acpi/osl.c                      |  24 ++-
 drivers/acpi/pci_bind.c                 | 122 ------------
 drivers/acpi/pci_irq.c                  | 102 ++++------
 drivers/acpi/pci_root.c                 | 233 +++++++++++++---------
 drivers/acpi/pci_slot.c                 |  13 +-
 drivers/acpi/processor_driver.c         |  32 +---
 drivers/acpi/scan.c                     | 330 ++++++++++++--------------------
 drivers/pci/access.c                    |   6 +-
 drivers/pci/bus.c                       |  81 ++------
 drivers/pci/hotplug/acpiphp.h           |  14 +-
 drivers/pci/hotplug/acpiphp_core.c      |  23 +--
 drivers/pci/hotplug/acpiphp_glue.c      | 292 ++++++----------------------
 drivers/pci/hotplug/cpci_hotplug_pci.c  |  29 ++-
 drivers/pci/hotplug/cpqphp_ctrl.c       |  57 ++----
 drivers/pci/hotplug/pciehp_core.c       |   2 -
 drivers/pci/hotplug/pciehp_pci.c        |  44 ++---
 drivers/pci/hotplug/sgi_hotplug.c       |  73 ++++---
 drivers/pci/hotplug/shpchp_pci.c        |  36 ++--
 drivers/pci/iov.c                       |  10 +-
 drivers/pci/pci-acpi.c                  |  45 +++--
 drivers/pci/pci-driver.c                |  12 +-
 drivers/pci/pci.c                       |  80 +++-----
 drivers/pci/pci.h                       |   9 +-
 drivers/pci/pcie/aspm.c                 |   8 +-
 drivers/pci/pcie/portdrv_core.c         |   2 +-
 drivers/pci/probe.c                     | 104 ++++++----
 drivers/pci/remove.c                    |   4 +-
 drivers/pci/search.c                    |  10 +-
 drivers/pci/setup-bus.c                 |   2 +-
 include/acpi/acpi_bus.h                 |  35 ++--
 include/acpi/acpi_drivers.h             |   5 -
 include/acpi/acpiosxf.h                 |   2 -
 include/linux/acpi.h                    |   5 +
 include/linux/pci.h                     |  15 +-
 55 files changed, 919 insertions(+), 1324 deletions(-)
 delete mode 100644 drivers/acpi/pci_bind.c
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

---
 arch/ia64/pci/pci.c                |    6 +-----
 drivers/acpi/internal.h            |    4 ----
 drivers/acpi/scan.c                |   10 +---------
 drivers/pci/hotplug/acpiphp_glue.c |   35 +++--------------------------------
 drivers/pci/pci-acpi.c             |    8 --------
 5 files changed, 5 insertions(+), 58 deletions(-)
arch/ia64/pci/pci.c +1 -5
Index: linux-2.6/arch/ia64/pci/pci.c
===================================================================
@@ -393,9 +393,6 @@ out1:
 	return NULL;
 }
 
-<<<<<<< HEAD
-static int is_valid_resource(struct pci_dev *dev, int idx)
-=======
 int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
 {
 	struct pci_controller *controller = bridge->bus->sysdata;
@@ -404,8 +401,7 @@ int pcibios_root_bridge_prepare(struct p
 	return 0;
 }
 
-static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
->>>>>>> pci/next
+static int is_valid_resource(struct pci_dev *dev, int idx)
 {
 	unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
 	struct resource *devr = &dev->resource[idx], *busr;
drivers/acpi/internal.h +0 -4
Index: linux-2.6/drivers/acpi/internal.h
===================================================================
@@ -94,16 +94,12 @@ struct acpi_ec {
 
 extern struct acpi_ec *first_ec;
 
-<<<<<<< HEAD
-=======
 #ifdef	CONFIG_ACPI_PCI_SLOT
 void acpi_pci_slot_init(void);
 #else
 static inline void acpi_pci_slot_init(void) { }
 #endif
-int acpi_pci_root_init(void);
 void acpi_pci_root_hp_init(void);
->>>>>>> pci/next
 int acpi_ec_init(void);
 int acpi_ec_ecdt_probe(void);
 int acpi_boot_ec_enable(void);
drivers/acpi/scan.c +1 -9
Index: linux-2.6/drivers/acpi/scan.c
===================================================================
@@ -1779,14 +1779,11 @@ int __init acpi_scan_init(void)
 	}
 
 	acpi_pci_root_init();
-<<<<<<< HEAD
 	acpi_pci_link_init();
 	acpi_platform_init();
 	acpi_csrt_init();
 	acpi_container_init();
-=======
 	acpi_pci_slot_init();
->>>>>>> pci/next
 
 	mutex_lock(&acpi_scan_lock);
 	/*
@@ -1808,13 +1805,8 @@ int __init acpi_scan_init(void)
 
 	acpi_update_all_gpes();
 
-<<<<<<< HEAD
+	acpi_pci_root_hp_init();
  out:
 	mutex_unlock(&acpi_scan_lock);
 	return result;
-=======
-	acpi_pci_root_hp_init();
-
-	return 0;
->>>>>>> pci/next
 }
drivers/pci/hotplug/acpiphp_glue.c +3 -32
Index: linux-2.6/drivers/pci/hotplug/acpiphp_glue.c
===================================================================
@@ -1135,30 +1135,10 @@ static void _handle_hotplug_event_bridge
 	hp_work = container_of(work, struct acpi_hp_work, work);
 	handle = hp_work->handle;
 	type = hp_work->type;
-<<<<<<< HEAD
+	bridge = (struct acpiphp_bridge *)hp_work->context;
 
 	acpi_scan_lock_acquire();
 
-	if (acpi_bus_get_device(handle, &device)) {
-		/* This bridge must have just been physically inserted */
-		handle_bridge_insertion(handle, type);
-		goto out;
-	}
-
-	bridge = acpiphp_handle_to_bridge(handle);
-	if (type == ACPI_NOTIFY_BUS_CHECK) {
-		acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, ACPI_UINT32_MAX,
-			count_sub_bridges, NULL, &num_sub_bridges, NULL);
-	}
-
-	if (!bridge && !num_sub_bridges) {
-		err("cannot get bridge info\n");
-		goto out;
-	}
-=======
-	bridge = (struct acpiphp_bridge *)hp_work->context;
->>>>>>> pci/next
-
 	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
 
 	switch (type) {
@@ -1213,11 +1193,7 @@ static void _handle_hotplug_event_bridge
 		break;
 	}
 
-<<<<<<< HEAD
-out:
 	acpi_scan_lock_release();
-=======
->>>>>>> pci/next
 	kfree(hp_work); /* allocated in handle_hotplug_event_bridge */
 }
 
@@ -1258,15 +1234,10 @@ static void _handle_hotplug_event_func(s
 	type = hp_work->type;
 	func = (struct acpiphp_func *)hp_work->context;
 
-	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
-
-<<<<<<< HEAD
-	func = (struct acpiphp_func *)context;
-
 	acpi_scan_lock_acquire();
 
-=======
->>>>>>> pci/next
+	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
+
 	switch (type) {
 	case ACPI_NOTIFY_BUS_CHECK:
 		/* bus re-enumerate */
drivers/pci/pci-acpi.c +0 -8
Index: linux-2.6/drivers/pci/pci-acpi.c
===================================================================
@@ -329,14 +329,6 @@ static void pci_acpi_cleanup(struct devi
 		device_set_run_wake(dev, false);
 		pci_acpi_remove_pm_notifier(adev);
 	}
-<<<<<<< HEAD
-
-	if (pci_dev->subordinate)
-		acpi_pci_irq_del_prt(pci_domain_nr(pci_dev->bus),
-				     pci_dev->subordinate->number);
-=======
-	acpi_power_resource_unregister_device(dev, handle);
->>>>>>> pci/next
 }
 
 static struct acpi_bus_type acpi_pci_bus = {
#2 lore raw
Quoted 9 lines · Yinghai Lu
Quoted 8 lines · Bjorn Helgaas

The following changes since commit d1c3ed669a2d452cacfb48c2d171a1f364dae2ed:

Linux 3.8-rc2 (2013-01-02 18:13:21 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git tags/pci-v3.9-changes

Quoted 7 lines
Quoted 3 lines

for you to fetch changes up to 018ba0a6efada61b9bc17500101d81c3d35807c2:

Merge branch 'pci/yinghai-root-bus-hotplug' into next (2013-02-19 11:42:17 -0700)

may render of bunch of conflicts...

Please check if attached diff is right, and hope it could save Linus some time.

It looks correct to me as far as the ACPI part is concerned.

Thanks,
Rafael

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#3 lore raw
In reply to Yinghai Lu
Quoted 2 lines · Yinghai Lu

Please check if attached diff is right, and hope it could save Linus some time.

Hmm. I did things a bit differently, moving things around more in drivers/acpi/internal.h.

Also, my *gut* feel is that the new _handle_hotplug_event_root() function should do that whole dance with acpi_scan_lock_acquire()/acpi_scan_lock_release(), but I didn't really know if it's required or appropriate, so I left it alone. Could you take a look?

Linus

#4 lore raw
Quoted 6 lines · Linus Torvalds
Quoted 2 lines · Yinghai Lu

Please check if attached diff is right, and hope it could save Linus some time.

Hmm. I did things a bit differently, moving things around more in drivers/acpi/internal.h.

Yes, it is better to put them together with acpi_pci_root_init().

Quoted 6 lines

Also, my *gut* feel is that the new _handle_hotplug_event_root() function should do that whole dance with acpi_scan_lock_acquire()/acpi_scan_lock_release(), but I didn't really know if it's required or appropriate, so I left it alone. Could you take a look?

Yes, we need that for root bridge hot add path.

for hot remove path, we already have lock acquire/release in acpi_bus_hot_remove_device().

Please check attached patch for hot add path.

Thanks

Yinghai

---
 drivers/acpi/pci_root.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/acpi/pci_root.c +2 -0
Index: linux-2.6/drivers/acpi/pci_root.c
===================================================================
@@ -640,8 +640,10 @@ static void handle_root_bridge_insertion
 		return;
 	}
 
+	acpi_scan_lock_acquire();
 	if (acpi_bus_scan(handle))
 		printk(KERN_ERR "cannot add bridge to acpi list\n");
+	acpi_scan_lock_release();
 }
 
 static void handle_root_bridge_removal(struct acpi_device *device)
#5 lore raw
Quoted 9 lines · Yinghai Lu
Quoted 6 lines · Linus Torvalds

Also, my *gut* feel is that the new _handle_hotplug_event_root() function should do that whole dance with acpi_scan_lock_acquire()/acpi_scan_lock_release(), but I didn't really know if it's required or appropriate, so I left it alone. Could you take a look?

Quoted 6 lines

Yes, we need that for root bridge hot add path.

for hot remove path, we already have lock acquire/release in acpi_bus_hot_remove_device().

Please check attached patch for hot add path.

Quite frankly, doing this in handle_root_bridge_insertion() doesn't match the pattern elsewhere. Elsewhere you also protected the whole acpi_get_name() lookup etc. Which is why I felt that it would make more sense to add this to _handle_hotplug_event_root().

But there may be good reasons why the root bridge case is different, and I don't have strong opinions, I just wanted people to look at his case. I'll let you and Bjorn sort it out...

Linus

#6 lore raw
Quoted 17 lines · Linus Torvalds
Quoted 9 lines · Yinghai Lu
Quoted 6 lines · Linus Torvalds

Also, my *gut* feel is that the new _handle_hotplug_event_root() function should do that whole dance with acpi_scan_lock_acquire()/acpi_scan_lock_release(), but I didn't really know if it's required or appropriate, so I left it alone. Could you take a look?

Quoted 6 lines

Yes, we need that for root bridge hot add path.

for hot remove path, we already have lock acquire/release in acpi_bus_hot_remove_device().

Please check attached patch for hot add path.

Quoted 8 lines

Quite frankly, doing this in handle_root_bridge_insertion() doesn't match the pattern elsewhere. Elsewhere you also protected the whole acpi_get_name() lookup etc. Which is why I felt that it would make more sense to add this to _handle_hotplug_event_root().

But there may be good reasons why the root bridge case is different, and I don't have strong opinions, I just wanted people to look at his case. I'll let you and Bjorn sort it out...

ok,

Bjorn, Rafael,

Can you please check if you are ok with attached patch ?

Thanks

Yinghai

Subject: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug

During merging pci tree with pm/acpi tree, Linus noticed that we don't have same lock using patten about acpi pci root as acpiphp.

Here apply same lock patten, and we need to change acpi_bus_hot_remove_device executing via acpi_os_hotplug_execute() as it also hold the lock in acpi_bus_hot_remove_device.

That will make acpi_bus_hot_remove_device calling the same as other callers.

---
 drivers/acpi/pci_root.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/acpi/pci_root.c +7 -2
Index: linux-2.6/drivers/acpi/pci_root.c
===================================================================
@@ -652,6 +652,7 @@ static void handle_root_bridge_insertion
 
 static void handle_root_bridge_removal(struct acpi_device *device)
 {
+	acpi_status status;
 	struct acpi_eject_event *ej_event;
 
 	ej_event = kmalloc(sizeof(*ej_event), GFP_KERNEL);
@@ -667,7 +668,9 @@ static void handle_root_bridge_removal(s
 	ej_event->device = device;
 	ej_event->event = ACPI_NOTIFY_EJECT_REQUEST;
 
-	acpi_bus_hot_remove_device(ej_event);
+	status = acpi_os_hotplug_execute(acpi_bus_hot_remove_device, ej_event);
+	if (ACPI_FAILURE(status))
+		kfree(ej_event);
 }
 
 static void _handle_hotplug_event_root(struct work_struct *work)
@@ -682,8 +685,9 @@ static void _handle_hotplug_event_root(s
 	handle = hp_work->handle;
 	type = hp_work->type;
 
-	root = acpi_pci_find_root(handle);
+	acpi_scan_lock_acquire();
 
+	root = acpi_pci_find_root(handle);
 	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
 
 	switch (type) {
@@ -717,6 +721,7 @@ static void _handle_hotplug_event_root(s
 		break;
 	}
 
+	acpi_scan_lock_release();
 	kfree(hp_work); /* allocated in handle_hotplug_event_bridge */
 	kfree(buffer.pointer);
 }
#7 lore raw
Quoted 28 lines · Yinghai Lu
Quoted 17 lines · Linus Torvalds
Quoted 9 lines · Yinghai Lu
Quoted 6 lines · Linus Torvalds

Also, my *gut* feel is that the new _handle_hotplug_event_root() function should do that whole dance with acpi_scan_lock_acquire()/acpi_scan_lock_release(), but I didn't really know if it's required or appropriate, so I left it alone. Could you take a look?

Quoted 6 lines

Yes, we need that for root bridge hot add path.

for hot remove path, we already have lock acquire/release in acpi_bus_hot_remove_device().

Please check attached patch for hot add path.

Quoted 8 lines

Quite frankly, doing this in handle_root_bridge_insertion() doesn't match the pattern elsewhere. Elsewhere you also protected the whole acpi_get_name() lookup etc. Which is why I felt that it would make more sense to add this to _handle_hotplug_event_root().

But there may be good reasons why the root bridge case is different, and I don't have strong opinions, I just wanted people to look at his case. I'll let you and Bjorn sort it out...

Quoted 5 lines

ok,

Bjorn, Rafael,

Can you please check if you are ok with attached patch ?

The patch looks correct to me.

Thanks,
Rafael

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

PATCH 1/1 PCI, ACPI: hold acpi_scan_lock during root bus hotplug

During merging pci tree with pm/acpi tree, Linus noticed that we don't have same lock using patten about acpi pci root as acpiphp.

Here apply same lock patten, and we need to change acpi_bus_hot_remove_device executing via acpi_os_hotplug_execute() as it also hold the lock in acpi_bus_hot_remove_device.

That will make acpi_bus_hot_remove_device calling the same as other callers.

---
 drivers/acpi/pci_root.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/acpi/pci_root.c +7 -2
Index: linux-2.6/drivers/acpi/pci_root.c
===================================================================
@@ -646,6 +646,7 @@ static void handle_root_bridge_insertion
 
 static void handle_root_bridge_removal(struct acpi_device *device)
 {
+	acpi_status status;
 	struct acpi_eject_event *ej_event;
 
 	ej_event = kmalloc(sizeof(*ej_event), GFP_KERNEL);
@@ -661,7 +662,9 @@ static void handle_root_bridge_removal(s
 	ej_event->device = device;
 	ej_event->event = ACPI_NOTIFY_EJECT_REQUEST;
 
-	acpi_bus_hot_remove_device(ej_event);
+	status = acpi_os_hotplug_execute(acpi_bus_hot_remove_device, ej_event);
+	if (ACPI_FAILURE(status))
+		kfree(ej_event);
 }
 
 static void _handle_hotplug_event_root(struct work_struct *work)
@@ -676,8 +679,9 @@ static void _handle_hotplug_event_root(s
 	handle = hp_work->handle;
 	type = hp_work->type;
 
-	root = acpi_pci_find_root(handle);
+	acpi_scan_lock_acquire();
 
+	root = acpi_pci_find_root(handle);
 	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
 
 	switch (type) {
@@ -711,6 +715,7 @@ static void _handle_hotplug_event_root(s
 		break;
 	}
 
+	acpi_scan_lock_release();
 	kfree(hp_work); /* allocated in handle_hotplug_event_bridge */
 	kfree(buffer.pointer);
 }
#9 lore raw

Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug

Quoted 8 lines · Yinghai Lu

During merging pci tree with pm/acpi tree, Linus noticed that we don't have same lock using patten about acpi pci root as acpiphp.

Here apply same lock patten, and we need to change acpi_bus_hot_remove_device executing via acpi_os_hotplug_execute() as it also hold the lock in acpi_bus_hot_remove_device.

Quoted 6 lines

That will make acpi_bus_hot_remove_device calling the same as other callers.

Bjorn, this needs to go in before final 3.9.

Are you going to handle it, or should I take care of it?

Rafael

Quoted 50 lines
---
 drivers/acpi/pci_root.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/acpi/pci_root.c
===================================================================

drivers/acpi/pci_root.c +7 -3
@@ -646,6 +646,7 @@ static void handle_root_bridge_insertion
 
 static void handle_root_bridge_removal(struct acpi_device *device)
 {
+	acpi_status status;
 	struct acpi_eject_event *ej_event;
 
 	ej_event = kmalloc(sizeof(*ej_event), GFP_KERNEL);
@@ -661,7 +662,9 @@ static void handle_root_bridge_removal(s
 	ej_event->device = device;
 	ej_event->event = ACPI_NOTIFY_EJECT_REQUEST;
 
-	acpi_bus_hot_remove_device(ej_event);
+	status = acpi_os_hotplug_execute(acpi_bus_hot_remove_device, ej_event);
+	if (ACPI_FAILURE(status))
+		kfree(ej_event);
 }
 
 static void _handle_hotplug_event_root(struct work_struct *work)
@@ -676,8 +679,9 @@ static void _handle_hotplug_event_root(s
 	handle = hp_work->handle;
 	type = hp_work->type;
 
-	root = acpi_pci_find_root(handle);
+	acpi_scan_lock_acquire();
 
+	root = acpi_pci_find_root(handle);
 	acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
 
 	switch (type) {
@@ -711,6 +715,7 @@ static void _handle_hotplug_event_root(s
 		break;
 	}
 
+	acpi_scan_lock_release();
 	kfree(hp_work); /* allocated in handle_hotplug_event_bridge */
 	kfree(buffer.pointer);
 }
--

To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

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

Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug

Quoted 12 lines · Rafael J. Wysocki
Quoted 11 lines · Yinghai Lu

During merging pci tree with pm/acpi tree, Linus noticed that we don't have same lock using patten about acpi pci root as acpiphp.

Here apply same lock patten, and we need to change acpi_bus_hot_remove_device executing via acpi_os_hotplug_execute() as it also hold the lock in acpi_bus_hot_remove_device.

That will make acpi_bus_hot_remove_device calling the same as other callers.

Quoted 7 lines
Quoted 3 lines

Bjorn, this needs to go in before final 3.9.

Are you going to handle it, or should I take care of it?

It should be better via your pm+acpi tree, as that lock is added via your tree.

Thanks

Yinghai

#11 lore raw

Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug

Quoted 17 lines · Yinghai Lu
Quoted 16 lines · Rafael J. Wysocki
Quoted 14 lines · Yinghai Lu

During merging pci tree with pm/acpi tree, Linus noticed that we don't have same lock using patten about acpi pci root as acpiphp.

Here apply same lock patten, and we need to change acpi_bus_hot_remove_device executing via acpi_os_hotplug_execute() as it also hold the lock in acpi_bus_hot_remove_device.

That will make acpi_bus_hot_remove_device calling the same as other callers.

Quoted 5 lines
Quoted 3 lines

Bjorn, this needs to go in before final 3.9.

Are you going to handle it, or should I take care of it?

It should be better via your pm+acpi tree, as that lock is added via your tree.

OK, I'll take it, then, if Bjorn doesn't object.

Thanks,
Rafael

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
author maintainer
#12 lore raw

Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug

Quoted 18 lines · Rafael J. Wysocki
Quoted 17 lines · Yinghai Lu
Quoted 16 lines · Rafael J. Wysocki
Quoted 14 lines · Yinghai Lu

During merging pci tree with pm/acpi tree, Linus noticed that we don't have same lock using patten about acpi pci root as acpiphp.

Here apply same lock patten, and we need to change acpi_bus_hot_remove_device executing via acpi_os_hotplug_execute() as it also hold the lock in acpi_bus_hot_remove_device.

That will make acpi_bus_hot_remove_device calling the same as other callers.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Bjorn, this needs to go in before final 3.9.

Are you going to handle it, or should I take care of it?

It should be better via your pm+acpi tree, as that lock is added via your tree.

OK, I'll take it, then, if Bjorn doesn't object.

Yep, that's fine with me.

#13 lore raw

Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug

Quoted 21 lines · Bjorn Helgaas
Quoted 20 lines · Rafael J. Wysocki
Quoted 19 lines · Yinghai Lu
Quoted 18 lines · Rafael J. Wysocki
Quoted 8 lines · Yinghai Lu

During merging pci tree with pm/acpi tree, Linus noticed that we don't have same lock using patten about acpi pci root as acpiphp.

Here apply same lock patten, and we need to change acpi_bus_hot_remove_device executing via acpi_os_hotplug_execute() as it also hold the lock in acpi_bus_hot_remove_device.

Quoted 6 lines

That will make acpi_bus_hot_remove_device calling the same as other callers.

Bjorn, this needs to go in before final 3.9.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Are you going to handle it, or should I take care of it?

It should be better via your pm+acpi tree, as that lock is added via your tree.

OK, I'll take it, then, if Bjorn doesn't object.

Yep, that's fine with me.

Cool, thanks. :-)

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