1. 27 Jan, 2013 3 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/yinghai-root-bus-hotplug' into next · 939de1d6
      Bjorn Helgaas authored
      * pci/yinghai-root-bus-hotplug:
        PCI: Put pci_dev in device tree as early as possible
        PCI: Skip attaching driver in device_add()
        PCI: acpiphp: Keep driver loaded even if no slots found
        PCI/ACPI: Print info if host bridge notify handler installation fails
        PCI: acpiphp: Move host bridge hotplug to pci_root.c
        PCI/ACPI: acpiphp: Rename alloc_acpiphp_hp_work() to alloc_acpi_hp_work()
        PCI: Make device create/destroy logic symmetric
        PCI: Fix reference count leak in pci_dev_present()
        PCI: Set pci_dev dev_node early so IOAPIC irq_descs are allocated locally
        PCI: Add root bus children dev's res to fail list
        PCI: acpiphp: Add is_hotplug_bridge detection
      
      Conflicts:
      	drivers/pci/pci.h
      939de1d6
    • Bjorn Helgaas's avatar
      Merge branch 'pci/acpi-scan2' into next · fb455792
      Bjorn Helgaas authored
      * pci/acpi-scan2:
        ACPI / scan: Drop acpi_bus_add() and use acpi_bus_scan() instead
        ACPI: update ej_event interface to take acpi_device
        ACPI / scan: Add second pass to acpi_bus_trim()
        ACPI / scan: Change the implementation of acpi_bus_trim()
        ACPI / scan: Drop the second argument of acpi_bus_trim()
        ACPI / scan: Drop the second argument of acpi_device_unregister()
        ACPI: Remove the ops field from struct acpi_device
        ACPI: remove unused acpi_op_bind and acpi_op_unbind
        ACPI / scan: Fix check of device_attach() return value.
      fb455792
    • Bjorn Helgaas's avatar
      Merge branch 'pci/yijing-ari' into next · 14b5cb37
      Bjorn Helgaas authored
      * pci/yijing-ari:
        PCI: shpchp: Iterate over all devices in slot, not functions 0-7
        PCI: sgihp: Iterate over all devices in slot, not functions 0-7
        PCI: cpcihp: Iterate over all devices in slot, not functions 0-7
        PCI: pciehp: Iterate over all devices in slot, not functions 0-7
        PCI: Consolidate "next-function" functions
        PCI: Rename pci_enable_ari() to pci_configure_ari()
        PCI: Enable ARI if dev and upstream bridge support it; disable otherwise
      14b5cb37
  2. 25 Jan, 2013 18 commits
  3. 24 Jan, 2013 1 commit
    • Yijing Wang's avatar
      PCI: Enable ARI if dev and upstream bridge support it; disable otherwise · b0cc6020
      Yijing Wang authored
      Currently, we enable ARI in a device's upstream bridge if the bridge and
      the device support it.  But we never disable ARI, even if the device is
      removed and replaced with a device that doesn't support ARI.
      
      This means that if we hot-remove an ARI device and replace it with a
      non-ARI multi-function device, we find only function 0 of the new device
      because the upstream bridge still has ARI enabled, and next_ari_fn()
      only returns function 0 for the new non-ARI device.
      
      This patch disables ARI in the upstream bridge if the device doesn't
      support ARI.  See the PCIe spec, r3.0, sec 6.13.
      
      [bhelgaas: changelog, function comment]
      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>
      b0cc6020
  4. 19 Jan, 2013 1 commit
    • Rafael J. Wysocki's avatar
      ACPI / scan: Drop acpi_bus_add() and use acpi_bus_scan() instead · b8bd759a
      Rafael J. Wysocki authored
      The only difference between acpi_bus_scan() and acpi_bus_add() is the
      invocation of acpi_update_all_gpes() in the latter which in fact is
      unnecessary, because acpi_update_all_gpes() has already been called
      by acpi_scan_init() and the way it is implemented guarantees the next
      invocations of it to do nothing.
      
      For this reason, drop acpi_bus_add() and make all its callers use
      acpi_bus_scan() directly instead of it.  Additionally, rearrange the
      code in acpi_scan_init() slightly to improve the visibility of the
      acpi_update_all_gpes() call in there.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarYinghai Lu <yinghai@kernel.org>
      b8bd759a
  5. 17 Jan, 2013 1 commit
  6. 15 Jan, 2013 6 commits
  7. 14 Jan, 2013 2 commits
    • Jiang Liu's avatar
      ACPI: remove unused acpi_op_bind and acpi_op_unbind · 115c9ad8
      Jiang Liu authored
      With commit f2a33cde55a03 "ACPI: Drop ACPI device .bind() and .unbind()
      callbacks", acpi_op_bind and acpi_op_unbind are not used any more. So
      remove them.
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      115c9ad8
    • Rafael J. Wysocki's avatar
      ACPI / PCI: Set root bridge ACPI handle in advance · 6c0cc950
      Rafael J. Wysocki authored
      The ACPI handles of PCI root bridges need to be known to
      acpi_bind_one(), so that it can create the appropriate
      "firmware_node" and "physical_node" files for them, but currently
      the way it gets to know those handles is not exactly straightforward
      (to put it lightly).
      
      This is how it works, roughly:
      
        1. acpi_bus_scan() finds the handle of a PCI root bridge,
           creates a struct acpi_device object for it and passes that
           object to acpi_pci_root_add().
      
        2. acpi_pci_root_add() creates a struct acpi_pci_root object,
           populates its "device" field with its argument's address
           (device->handle is the ACPI handle found in step 1).
      
        3. The struct acpi_pci_root object created in step 2 is passed
           to pci_acpi_scan_root() and used to get resources that are
           passed to pci_create_root_bus().
      
        4. pci_create_root_bus() creates a struct pci_host_bridge object
           and passes its "dev" member to device_register().
      
        5. platform_notify(), which for systems with ACPI is set to
           acpi_platform_notify(), is called.
      
      So far, so good.  Now it starts to be "interesting".
      
        6. acpi_find_bridge_device() is used to find the ACPI handle of
           the given device (which is the PCI root bridge) and executes
           acpi_pci_find_root_bridge(), among other things, for the
           given device object.
      
        7. acpi_pci_find_root_bridge() uses the name (sic!) of the given
           device object to extract the segment and bus numbers of the PCI
           root bridge and passes them to acpi_get_pci_rootbridge_handle().
      
        8. acpi_get_pci_rootbridge_handle() browses the list of ACPI PCI
           root bridges and finds the one that matches the given segment
           and bus numbers.  Its handle is then used to initialize the
           ACPI handle of the PCI root bridge's device object by
           acpi_bind_one().  However, this is *exactly* the ACPI handle we
           started with in step 1.
      
      Needless to say, this is quite embarassing, but it may be avoided
      thanks to commit f3fd0c8a (ACPI: Allow ACPI handles of devices to be
      initialized in advance), which makes it possible to initialize the
      ACPI handle of a device before passing it to device_register().
      
      Accordingly, add a new __weak routine, pcibios_root_bridge_prepare(),
      defaulting to an empty implementation that can be replaced by the
      interested architecutres (x86 and ia64 at the moment) with functions
      that will set the root bridge's ACPI handle before its dev member is
      passed to device_register().  Make both x86 and ia64 provide such
      implementations of pcibios_root_bridge_prepare() and remove
      acpi_pci_find_root_bridge() and acpi_get_pci_rootbridge_handle() that
      aren't necessary any more.
      
      Included is a fix for breakage on systems with non-ACPI PCI host
      bridges from Bjorn Helgaas.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      6c0cc950
  8. 11 Jan, 2013 1 commit
  9. 10 Jan, 2013 2 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/yinghai-survey-resources+acpi-scan' into next · b7040469
      Bjorn Helgaas authored
      * pci/yinghai-survey-resources+acpi-scan:
        ACPI / scan: Treat power resources in a special way
        ACPI: Remove unused struct acpi_pci_root.id member
        ACPI: Drop ACPI device .bind() and .unbind() callbacks
        ACPI / PCI: Move the _PRT setup and cleanup code to pci-acpi.c
        ACPI / PCI: Rework the setup and cleanup of device wakeup
        ACPI: Add .setup() and .cleanup() callbacks to struct acpi_bus_type
        ACPI: Make acpi_bus_scan() and acpi_bus_add() take only one argument
        ACPI: Replace ACPI device add_type field with a match_driver flag
        ACPI: Drop the second argument of acpi_bus_scan()
        ACPI: Remove the arguments of acpi_bus_add() that are not used
        ACPI: Remove acpi_start_single_object() and acpi_bus_start()
        ACPI / PCI: Fold acpi_pci_root_start() into acpi_pci_root_add()
        ACPI: Change the ordering of acpi_bus_check_add()
        ACPI: Replace struct acpi_bus_ops with enum type
        ACPI: Reduce the usage of struct acpi_bus_ops
        ACPI: Make acpi_bus_add() and acpi_bus_start() visibly different
        ACPI: Change the ordering of PCI root bridge driver registrarion
        ACPI: Separate adding ACPI device objects from probing ACPI drivers
      b7040469
    • Bjorn Helgaas's avatar
      Merge branch 'acpi-scan' of... · 295a7f62
      Bjorn Helgaas authored
      Merge branch 'acpi-scan' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into pci/yinghai-survey-resources+acpi-scan
      
      * 'acpi-scan' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / scan: Treat power resources in a special way
        ACPI: Remove unused struct acpi_pci_root.id member
        ACPI: Drop ACPI device .bind() and .unbind() callbacks
        ACPI / PCI: Move the _PRT setup and cleanup code to pci-acpi.c
        ACPI / PCI: Rework the setup and cleanup of device wakeup
        ACPI: Add .setup() and .cleanup() callbacks to struct acpi_bus_type
        ACPI: Make acpi_bus_scan() and acpi_bus_add() take only one argument
        ACPI: Replace ACPI device add_type field with a match_driver flag
        ACPI: Drop the second argument of acpi_bus_scan()
        ACPI: Remove the arguments of acpi_bus_add() that are not used
        ACPI: Remove acpi_start_single_object() and acpi_bus_start()
        ACPI / PCI: Fold acpi_pci_root_start() into acpi_pci_root_add()
        ACPI: Change the ordering of acpi_bus_check_add()
        ACPI: Replace struct acpi_bus_ops with enum type
        ACPI: Reduce the usage of struct acpi_bus_ops
        ACPI: Make acpi_bus_add() and acpi_bus_start() visibly different
        ACPI: Change the ordering of PCI root bridge driver registrarion
        ACPI: Separate adding ACPI device objects from probing ACPI drivers
      
      Conflicts:
      	drivers/acpi/pci_root.c
      295a7f62
  10. 09 Jan, 2013 2 commits
    • Bjorn Helgaas's avatar
      Merge branch 'pci/yinghai-survey-resources' into next · e84813c0
      Bjorn Helgaas authored
      * pci/yinghai-survey-resources:
        x86/PCI: Implement pcibios_resource_survey_bus()
        PCI/ACPI: Reserve firmware-allocated resources for hot-added root buses
        x86/PCI: Keep resource allocation functions after boot
        x86/PCI: Don't track firmware-assigned BAR values for hot-added devices
        x86/PCI: Factor out pcibios_allocate_dev_rom_resource()
        x86/PCI: Allocate resources on a per-bus basis for hot-adding root buses
        x86/PCI: Factor out pcibios_allocate_dev_resources()
        x86/PCI: Factor out pcibios_allocate_bridge_resources()
      e84813c0
    • Bjorn Helgaas's avatar
      Merge branch 'pci/misc' into next · e84d0ded
      Bjorn Helgaas authored
      * pci/misc:
        PCI: cpqphp: Cleanup and remove unreachable paths
        PCI: Drop "__" prefix on __pci_enable_device_flags()
        PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h
        mn10300/PCI: Remove unused pci_root_bus
        frv/PCI: Remove unused pci_root_bus
        x86/PCI: Remove unused pci_root_bus
      e84d0ded
  11. 07 Jan, 2013 3 commits