1. 16 Apr, 2013 4 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/jiang-subdrivers' into next · a3b6bbd5
      Bjorn Helgaas authored
      * pci/jiang-subdrivers:
        PCI/ACPI: Remove support of ACPI PCI subdrivers
        PCI: acpiphp: Protect acpiphp data structures from concurrent updates
        PCI: acpiphp: Use normal list to simplify implementation
        PCI: acpiphp: Do not use ACPI PCI subdriver mechanism
        PCI: acpiphp: Convert acpiphp to be builtin only, not modular
        PCI/ACPI: Handle PCI slot devices when creating/destroying PCI buses
        x86/PCI: Implement pcibios_{add|remove}_bus() hooks
        ia64/PCI: Implement pcibios_{add|remove}_bus() hooks
        PCI/ACPI: Prepare stub functions to handle ACPI PCI (hotplug) slots
        PCI: Add pcibios hooks for adding and removing PCI buses
        PCI: acpiphp: Replace local macros with standard ACPI macros
        PCI: acpiphp: Remove all functions even if function 0 doesn't exist
        PCI: acpiphp: Use list_for_each_entry_safe() in acpiphp_sanitize_bus()
        PCI: Clean up usages of pci_bus->is_added
        PCI: When removing bus, always remove legacy files & unregister
      a3b6bbd5
    • Myron Stowe's avatar
      PCI/ACPI: Remove support of ACPI PCI subdrivers · c309dbb4
      Myron Stowe authored
      Both sub-drivers of the "PCI Root Bridge ("pci_bridge")" driver, "acpiphp"
      and "pci_slot", have been converted to hook directly into the PCI core.
      
      With the conversions there are no remaining usages of the 'struct
      acpi_pci_driver' list based infrastructure.  This patch removes it.
      Signed-off-by: default avatarMyron Stowe <myron.stowe@redhat.com>
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Toshi Kani <toshi.kani@hp.com>
      c309dbb4
    • Jiang Liu's avatar
      PCI: acpiphp: Protect acpiphp data structures from concurrent updates · 3d54a316
      Jiang Liu authored
      Now acpiphp_enumerate_slots() and acpiphp_remove_slots() may be invoked
      concurrently by the PCI core, so add a bridge_mutex and reference count
      mechanism to protect acpiphp bridge/slot/function data structures.
      
      To avoid deadlock, handle_hotplug_event_bridge() will requeue the
      hotplug event onto the kacpi_hotplug_wq by calling alloc_acpi_hp_work().
      But the workaround has introduced a minor race window because the
      'bridge' passed to _handle_hotplug_event_bridge() may have already been
      destroyed when _handle_hotplug_event_bridge() is actually executed by
      the kacpi_hotplug_wq.  So hold a reference count on the passed 'bridge'.
      Fix the same issue for handle_hotplug_event_func() too.
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Toshi Kani <toshi.kani@hp.com>
      3d54a316
    • Yijing Wang's avatar
      PCI: acpiphp: Use normal list to simplify implementation · ad41dd9d
      Yijing Wang authored
      Use normal list for struct acpiphp_slot to simplify implementation.
      Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarYinghai Lu <yinghai@kernel.org>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Toshi Kani <toshi.kani@hp.com>
      ad41dd9d
  2. 15 Apr, 2013 15 commits
  3. 12 Apr, 2013 12 commits
  4. 10 Apr, 2013 2 commits
    • Gabor Juhos's avatar
      MIPS/PCI: Implement pcibios_get_phb_of_node · 9a97cd43
      Gabor Juhos authored
      The of_node field of the device assigned to a
      PCI bus is used during scanning of the PCI bus.
      However on MIPS, the of_node field is assigned
      only after the bus has been scanned.
      
      Implement the architecture specific version of
      'pcibios_get_phb_of_node'. Which ensures that the
      PCI driver core will initialize the of_node field
      before starting the scan.
      
      Also remove the local assignment of bus->dev.of_node,
      it is not needed after the patch.
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      9a97cd43
    • Bjorn Helgaas's avatar
      PCI: Remove __weak annotation from pcibios_get_phb_of_node decl · 10629d71
      Bjorn Helgaas authored
      The __weak annotation on the pcibios_get_phb_of_node() declaration
      causes *every* definition to be marked "weak."  The linker then
      selects one based on link order, which may be the wrong one.
      
      Gabor found that on MIPS, the linker selected the generic implementation
      from drivers/pci even though arch/mips supplied a definition without the
      __weak annotation:
      
      $ mipsel-openwrt-linux-readelf -s arch/mips/pci/built-in.o \
          drivers/pci/built-in.o vmlinux.o | grep pcibios_get_phb_of_node
            86: 0000046c    12 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node
          1430: 00012e2c   104 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node
         31898: 0017e4ec   104 FUNC    WEAK   DEFAULT    2 pcibios_get_phb_of_node
      
      This removes the __weak annotation from the pcibios_get_phb_of_node()
      declaration so arch-specific non-weak implementations work reliably.
      Suggested-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      10629d71
  5. 04 Apr, 2013 1 commit
  6. 03 Apr, 2013 1 commit
  7. 29 Mar, 2013 1 commit
    • Bjorn Helgaas's avatar
      Merge branch 'pci/shuah-defines' into next · 83326063
      Bjorn Helgaas authored
      * pci/shuah-defines:
        iommu/amd: Remove calc_devid() and use PCI_DEVID() from PCI
        iommu/amd: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI
        PCI/AER: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI
        PCI: Add PCI_BUS_NUM() and PCI_DEVID() interfaces
      83326063
  8. 26 Mar, 2013 4 commits