All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] PCI changes for v3.9
@ 2013-02-23 21:21 Bjorn Helgaas
  2013-02-24  2:49 ` Yinghai Lu
  0 siblings, 1 reply; 14+ messages in thread
From: Bjorn Helgaas @ 2013-02-23 21:21 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-pci, linux-kernel

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI changes for v3.9
  2013-02-23 21:21 [GIT PULL] PCI changes for v3.9 Bjorn Helgaas
@ 2013-02-24  2:49 ` Yinghai Lu
  2013-02-24 14:23   ` Rafael J. Wysocki
  2013-02-26  5:19   ` Linus Torvalds
  0 siblings, 2 replies; 14+ messages in thread
From: Yinghai Lu @ 2013-02-24  2:49 UTC (permalink / raw)
  To: Bjorn Helgaas, Linus Torvalds, Rafael J. Wysocki; +Cc: linux-pci, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 11685 bytes --]

On Sat, Feb 23, 2013 at 1:21 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> 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

>
> ----------------------------------------------------------------
>
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: fix_pci_merge.patch --]
[-- Type: application/octet-stream, Size: 4805 bytes --]

---
 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(-)

Index: linux-2.6/arch/ia64/pci/pci.c
===================================================================
--- linux-2.6.orig/arch/ia64/pci/pci.c
+++ 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;
Index: linux-2.6/drivers/acpi/internal.h
===================================================================
--- linux-2.6.orig/drivers/acpi/internal.h
+++ 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);
Index: linux-2.6/drivers/acpi/scan.c
===================================================================
--- linux-2.6.orig/drivers/acpi/scan.c
+++ 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
 }
Index: linux-2.6/drivers/pci/hotplug/acpiphp_glue.c
===================================================================
--- linux-2.6.orig/drivers/pci/hotplug/acpiphp_glue.c
+++ 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 */
Index: linux-2.6/drivers/pci/pci-acpi.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci-acpi.c
+++ 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 = {

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI changes for v3.9
  2013-02-24  2:49 ` Yinghai Lu
@ 2013-02-24 14:23   ` Rafael J. Wysocki
  2013-02-26  5:19   ` Linus Torvalds
  1 sibling, 0 replies; 14+ messages in thread
From: Rafael J. Wysocki @ 2013-02-24 14:23 UTC (permalink / raw)
  To: Yinghai Lu; +Cc: Bjorn Helgaas, Linus Torvalds, linux-pci, linux-kernel

On Saturday, February 23, 2013 06:49:27 PM Yinghai Lu wrote:
> On Sat, Feb 23, 2013 at 1:21 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> > 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.

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

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI changes for v3.9
  2013-02-24  2:49 ` Yinghai Lu
  2013-02-24 14:23   ` Rafael J. Wysocki
@ 2013-02-26  5:19   ` Linus Torvalds
  2013-02-26  6:46     ` Yinghai Lu
  1 sibling, 1 reply; 14+ messages in thread
From: Linus Torvalds @ 2013-02-26  5:19 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Bjorn Helgaas, Rafael J. Wysocki, linux-pci, Linux Kernel Mailing List

On Sat, Feb 23, 2013 at 6:49 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>
> 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI changes for v3.9
  2013-02-26  5:19   ` Linus Torvalds
@ 2013-02-26  6:46     ` Yinghai Lu
  2013-02-26 16:13       ` Linus Torvalds
  0 siblings, 1 reply; 14+ messages in thread
From: Yinghai Lu @ 2013-02-26  6:46 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Bjorn Helgaas, Rafael J. Wysocki, linux-pci, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

On Mon, Feb 25, 2013 at 9:19 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Sat, Feb 23, 2013 at 6:49 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>>
>> 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().

>
> 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

[-- Attachment #2: fix_acpi_pci_root_acquire_lock.patch --]
[-- Type: application/octet-stream, Size: 556 bytes --]

---
 drivers/acpi/pci_root.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/drivers/acpi/pci_root.c
===================================================================
--- linux-2.6.orig/drivers/acpi/pci_root.c
+++ 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)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI changes for v3.9
  2013-02-26  6:46     ` Yinghai Lu
@ 2013-02-26 16:13       ` Linus Torvalds
  2013-02-26 18:14         ` Yinghai Lu
  0 siblings, 1 reply; 14+ messages in thread
From: Linus Torvalds @ 2013-02-26 16:13 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Bjorn Helgaas, Rafael J. Wysocki, linux-pci, Linux Kernel Mailing List

On Mon, Feb 25, 2013 at 10:46 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Mon, Feb 25, 2013 at 9:19 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> 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.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI changes for v3.9
  2013-02-26 16:13       ` Linus Torvalds
@ 2013-02-26 18:14         ` Yinghai Lu
  2013-02-27 21:47           ` Rafael J. Wysocki
  0 siblings, 1 reply; 14+ messages in thread
From: Yinghai Lu @ 2013-02-26 18:14 UTC (permalink / raw)
  To: Linus Torvalds, Bjorn Helgaas, Rafael J. Wysocki
  Cc: linux-pci, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]

On Tue, Feb 26, 2013 at 8:13 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Mon, Feb 25, 2013 at 10:46 PM, Yinghai Lu <yinghai@kernel.org> wrote:
>> On Mon, Feb 25, 2013 at 9:19 PM, Linus Torvalds
>> <torvalds@linux-foundation.org> wrote:
>>>
>>> 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.
>
> 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

[-- Attachment #2: fix_acpi_pci_root_acquire_lock.patch --]
[-- Type: application/octet-stream, Size: 1963 bytes --]

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.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>

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

Index: linux-2.6/drivers/acpi/pci_root.c
===================================================================
--- linux-2.6.orig/drivers/acpi/pci_root.c
+++ 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);
 }

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [GIT PULL] PCI changes for v3.9
  2013-02-26 18:14         ` Yinghai Lu
@ 2013-02-27 21:47           ` Rafael J. Wysocki
  2013-03-11  5:05             ` [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug Yinghai Lu
  0 siblings, 1 reply; 14+ messages in thread
From: Rafael J. Wysocki @ 2013-02-27 21:47 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Linus Torvalds, Bjorn Helgaas, linux-pci, Linux Kernel Mailing List

On Tuesday, February 26, 2013 10:14:29 AM Yinghai Lu wrote:
> On Tue, Feb 26, 2013 at 8:13 AM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> > On Mon, Feb 25, 2013 at 10:46 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> >> On Mon, Feb 25, 2013 at 9:19 PM, Linus Torvalds
> >> <torvalds@linux-foundation.org> wrote:
> >>>
> >>> 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.
> >
> > 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 ?

The patch looks correct to me.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug
  2013-02-27 21:47           ` Rafael J. Wysocki
@ 2013-03-11  5:05             ` Yinghai Lu
  2013-03-26 13:24               ` Rafael J. Wysocki
  0 siblings, 1 reply; 14+ messages in thread
From: Yinghai Lu @ 2013-03-11  5:05 UTC (permalink / raw)
  To: Bjorn Helgaas, Rafael J. Wysocki, Linus Torvalds
  Cc: linux-pci, linux-acpi, linux-kernel, 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.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

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

Index: linux-2.6/drivers/acpi/pci_root.c
===================================================================
--- linux-2.6.orig/drivers/acpi/pci_root.c
+++ 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);
 }

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug
  2013-03-11  5:05             ` [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug Yinghai Lu
@ 2013-03-26 13:24               ` Rafael J. Wysocki
  2013-03-26 15:12                 ` Yinghai Lu
  0 siblings, 1 reply; 14+ messages in thread
From: Rafael J. Wysocki @ 2013-03-26 13:24 UTC (permalink / raw)
  To: Yinghai Lu, Bjorn Helgaas
  Cc: Linus Torvalds, linux-pci, linux-acpi, linux-kernel

On Sunday, March 10, 2013 10:05:16 PM Yinghai Lu wrote:
> 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.
> 
> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

Bjorn, this needs to go in before final 3.9.

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

Rafael


> ---
>  drivers/acpi/pci_root.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/drivers/acpi/pci_root.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/pci_root.c
> +++ 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);
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug
  2013-03-26 13:24               ` Rafael J. Wysocki
@ 2013-03-26 15:12                 ` Yinghai Lu
  2013-03-26 22:54                   ` Rafael J. Wysocki
  0 siblings, 1 reply; 14+ messages in thread
From: Yinghai Lu @ 2013-03-26 15:12 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Bjorn Helgaas, Linus Torvalds, linux-pci, linux-acpi, linux-kernel

On Tue, Mar 26, 2013 at 6:24 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Sunday, March 10, 2013 10:05:16 PM Yinghai Lu wrote:
>> 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.
>>
>> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
>> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
>
> 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug
  2013-03-26 22:54                   ` Rafael J. Wysocki
@ 2013-03-26 22:48                     ` Bjorn Helgaas
  2013-03-26 22:58                       ` Rafael J. Wysocki
  0 siblings, 1 reply; 14+ messages in thread
From: Bjorn Helgaas @ 2013-03-26 22:48 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Yinghai Lu, Linus Torvalds, linux-pci, linux-acpi, linux-kernel

On Tue, Mar 26, 2013 at 4:54 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Tuesday, March 26, 2013 08:12:30 AM Yinghai Lu wrote:
>> On Tue, Mar 26, 2013 at 6:24 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
>> > On Sunday, March 10, 2013 10:05:16 PM Yinghai Lu wrote:
>> >> 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.
>> >>
>> >> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
>> >> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>> >> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
>> >
>> > 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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug
  2013-03-26 15:12                 ` Yinghai Lu
@ 2013-03-26 22:54                   ` Rafael J. Wysocki
  2013-03-26 22:48                     ` Bjorn Helgaas
  0 siblings, 1 reply; 14+ messages in thread
From: Rafael J. Wysocki @ 2013-03-26 22:54 UTC (permalink / raw)
  To: Yinghai Lu
  Cc: Bjorn Helgaas, Linus Torvalds, linux-pci, linux-acpi, linux-kernel

On Tuesday, March 26, 2013 08:12:30 AM Yinghai Lu wrote:
> On Tue, Mar 26, 2013 at 6:24 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Sunday, March 10, 2013 10:05:16 PM Yinghai Lu wrote:
> >> 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.
> >>
> >> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> >> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> >> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > 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


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug
  2013-03-26 22:48                     ` Bjorn Helgaas
@ 2013-03-26 22:58                       ` Rafael J. Wysocki
  0 siblings, 0 replies; 14+ messages in thread
From: Rafael J. Wysocki @ 2013-03-26 22:58 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Yinghai Lu, Linus Torvalds, linux-pci, linux-acpi, linux-kernel

On Tuesday, March 26, 2013 04:48:49 PM Bjorn Helgaas wrote:
> On Tue, Mar 26, 2013 at 4:54 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Tuesday, March 26, 2013 08:12:30 AM Yinghai Lu wrote:
> >> On Tue, Mar 26, 2013 at 6:24 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> >> > On Sunday, March 10, 2013 10:05:16 PM Yinghai Lu wrote:
> >> >> 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.
> >> >>
> >> >> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
> >> >> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> >> >> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> >> >
> >> > 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.

Cool, thanks. :-)


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-03-26 22:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-23 21:21 [GIT PULL] PCI changes for v3.9 Bjorn Helgaas
2013-02-24  2:49 ` Yinghai Lu
2013-02-24 14:23   ` Rafael J. Wysocki
2013-02-26  5:19   ` Linus Torvalds
2013-02-26  6:46     ` Yinghai Lu
2013-02-26 16:13       ` Linus Torvalds
2013-02-26 18:14         ` Yinghai Lu
2013-02-27 21:47           ` Rafael J. Wysocki
2013-03-11  5:05             ` [PATCH] PCI, ACPI: hold acpi_scan_lock during root bus hotplug Yinghai Lu
2013-03-26 13:24               ` Rafael J. Wysocki
2013-03-26 15:12                 ` Yinghai Lu
2013-03-26 22:54                   ` Rafael J. Wysocki
2013-03-26 22:48                     ` Bjorn Helgaas
2013-03-26 22:58                       ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.