1. 30 9月, 2013 5 次提交
  2. 13 9月, 2013 1 次提交
  3. 10 9月, 2013 1 次提交
    • R
      ACPI / hotplug / PCI: Avoid parent bus rescans on spurious device checks · a47d8c8e
      Rafael J. Wysocki 提交于
      In the current ACPIPHP notify handler we always go directly for a
      rescan of the parent bus if we get a device check notification for
      a device that is not a bridge.  However, this obviously is
      overzealous if nothing really changes, because this way we may rescan
      the whole PCI hierarchy pretty much in vain.
      
      That happens on Alex Williamson's machine whose ACPI tables contain
      device objects that are supposed to coresspond to PCIe root ports,
      but those ports aren't physically present (or at least they aren't
      visible in the PCI config space to us).  The BIOS generates multiple
      device check notifies for those objects during boot and for each of
      them we go straight for the parent bus rescan, but the parent bus is
      the root bus in this particular case.  In consequence, we rescan the
      whole PCI bus from the top several times in a row, which is
      completely unnecessary, increases boot time by 50% (after previous
      fixes) and generates excess dmesg output from the PCI subsystem.
      
      Fix the problem by checking if we can find anything new in the
      slot corresponding to the device we've got a device check notify
      for and doing nothig if that's not the case.
      
      The spec (ACPI 5.0, Section 5.6.6) appears to mandate this behavior,
      as it says:
      
        Device Check. Used to notify OSPM that the device either appeared
        or disappeared. If the device has appeared, OSPM will re-enumerate
        from the parent. If the device has disappeared, OSPM will
        invalidate the state of the device. OSPM may optimize out
        re-enumeration.
      
      Therefore, according to the spec, we are free to do nothing if
      nothing changes.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=60865Reported-and-tested-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a47d8c8e
  4. 07 9月, 2013 2 次提交
  5. 06 9月, 2013 1 次提交
    • R
      ACPI / hotplug / PCI: Don't trim devices before scanning the namespace · 89ec2f2e
      Rafael J. Wysocki 提交于
      In acpiphp_bus_add() we first remove device objects corresponding to
      the given handle and the ACPI namespace branch below it, which are
      then re-created by acpi_bus_scan().  This used to be done to clean
      up after surprise removals, but now we do the cleanup through
      trim_stale_devices() which checks if the devices in question are
      actually gone before removing them, so the device hierarchy trimming
      in acpiphp_bus_add() is not necessary any more and, moreover, it may
      lead to problems if it removes device objects corresponding to
      devices that are actually present.
      
      For this reason, remove the leftover acpiphp_bus_trim() from
      acpiphp_bus_add().
      Reported-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      89ec2f2e
  6. 30 8月, 2013 5 次提交
  7. 29 8月, 2013 4 次提交
  8. 28 8月, 2013 1 次提交
  9. 27 8月, 2013 2 次提交
  10. 23 8月, 2013 8 次提交
  11. 18 8月, 2013 1 次提交
    • R
      ACPI / hotplug / PCI: Fix NULL pointer dereference in cleanup_bridge() · 1aaac071
      Rafael J. Wysocki 提交于
      After commit bbd34fcd (ACPI / hotplug / PCI: Register all devices
      under the given bridge) register_slot() is called for all PCI
      devices under a given bridge that have corresponding objects in
      the ACPI namespace, but it calls acpiphp_register_hotplug_slot()
      only for devices satisfying specific criteria.  Still,
      cleanup_bridge() calls acpiphp_unregister_hotplug_slot() for all
      objects created by register_slot(), although it should only call it
      for the ones that acpiphp_register_hotplug_slot() has been called
      for (successfully).  This causes a NULL pointer to be dereferenced
      by the acpiphp_unregister_hotplug_slot() executed by cleanup_bridge()
      if the object it is called for has not been passed to
      acpiphp_register_hotplug_slot().
      
      To fix this problem, check if the 'slot' field of the object passed
      to acpiphp_unregister_hotplug_slot() in cleanup_bridge() is not NULL,
      which only is the case if acpiphp_register_hotplug_slot() has been
      executed for that object.  In addition to that, make register_slot()
      reset the 'slot' field to NULL if acpiphp_register_hotplug_slot() has
      failed for the given object to prevent stale pointers from being
      used by acpiphp_unregister_hotplug_slot().
      Reported-and-tested-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1aaac071
  12. 16 8月, 2013 1 次提交
  13. 15 8月, 2013 7 次提交
  14. 14 8月, 2013 1 次提交