1. 04 6月, 2012 1 次提交
    • T
      ACPI: Add an interface to evaluate _OST · 275c58d7
      Toshi Kani 提交于
      Added acpi_evaluate_hotplug_opt(). All ACPI hotplug handlers must call
      this function when evaluating _OST for hotplug operations. If the
      platform does not support _OST, this function returns AE_NOT_FOUND and
      has no effect on the platform.
      
      ACPI_HOTPLUG_OST is defined when all relevant ACPI hotplug operations,
      such as CPU, memory and container hotplug, are enabled. This assures
      consistent behavior among the hotplug operations with regarding the
      _OST support. When ACPI_HOTPLUG_OST is not defined, this function is
      a no-op.
      
      ACPI PCI hotplug is not enhanced to support _OST at this time since it
      is a legacy method being replaced by PCIe native hotplug. _OST support
      for ACPI PCI hotplug may be added in future if necessary.
      
      Some platforms may require the OS to support _OST in order to support
      ACPI hotplug operations. For example, if a platform has the management
      console where user can request a hotplug operation from, this _OST
      support would be required for the management console to show the result
      of the hotplug request to user.
      
      Added macro definitions of _OST source events and status codes.
      Also renamed OSC_SB_CPUHP_OST_SUPPORT to OSC_SB_HOTPLUG_OST_SUPPORT
      since this _OSC bit is not specific to CPU hotplug. This bit is
      defined in Table 6-147 of ACPI 5.0 as follows.
      
        Bits:       3
        Field Name: Insertion / Ejection _OST Processing Support
        Definition: This bit is set if OSPM will evaluate the _OST
                    object defined under a device when processing
                    insertion and ejection source event codes.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      275c58d7
  2. 12 5月, 2012 2 次提交
  3. 30 3月, 2012 2 次提交
  4. 14 7月, 2011 1 次提交
  5. 15 3月, 2011 1 次提交
  6. 25 2月, 2011 1 次提交
    • R
      ACPI: Remove the wakeup.run_wake_count device field · 51907267
      Rafael J. Wysocki 提交于
      The wakeup.run_wake_count ACPI device field is only used by the PCI
      runtime PM code to "protect" devices from being prepared for
      generating wakeup signals more than once in a row.  However, it
      really doesn't provide any protection, because (1) all of the
      functions it is supposed to protect use their own reference counters
      effectively ensuring that the device will be set up for generating
      wakeup signals just once and (2) the PCI runtime PM code uses
      wakeup.run_wake_count in a racy way, since nothing prevents
      acpi_dev_run_wake() from being called concurrently from two different
      threads for the same device.
      
      Remove the wakeup.run_wake_count ACPI device field which is
      unnecessary, confusing and used in a wrong way.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      51907267
  7. 12 1月, 2011 4 次提交
  8. 07 1月, 2011 1 次提交
  9. 16 10月, 2010 1 次提交
  10. 02 10月, 2010 1 次提交
  11. 25 8月, 2010 1 次提交
    • R
      ACPI/PCI: Do not preserve _OSC control bits returned by a query · 2b8fd918
      Rafael J. Wysocki 提交于
      There is the assumption in acpi_pci_osc_control_set() that it is
      always sufficient to compare the mask of _OSC control bits to be
      requested with the result of an _OSC query where all of the known
      control bits have been checked.  However, in general, that need not
      be the case.  For example, if an _OSC feature A depends on an _OSC
      feature B and control of A, B plus another _OSC feature C is
      requested simultaneously, the BIOS may return A, B, C, while it would
      only return C if A and C were requested without B.
      
      That may result in passing a wrong mask of _OSC control bits to an
      _OSC control request, in which case the BIOS may only grant control
      of a subset of the requested features.  Moreover, acpi_pci_run_osc()
      will return error code if that happens and the caller of
      acpi_pci_osc_control_set() will not know that it's been granted
      control of some _OSC features.  Consequently, the system will
      generally not work as expected.
      
      Apart from this acpi_pci_osc_control_set() always uses the mask
      of _OSC control bits returned by the very first invocation of
      acpi_pci_query_osc(), but that is done with the second argument
      equal to OSC_PCI_SEGMENT_GROUPS_SUPPORT which generally happens
      to affect the returned _OSC control bits.
      
      For these reasons, make acpi_pci_osc_control_set() always check if
      control of the requested _OSC features will be granted before making
      the final control request.  As a result, the osc_control_qry and
      osc_queried members of struct acpi_pci_root are not necessary any
      more, so drop them and remove the remaining code referring to them.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      2b8fd918
  12. 04 4月, 2010 1 次提交
    • B
      ACPI: pci_root: save downstream bus range · 6ad95513
      Bjorn Helgaas 提交于
      Previously, we only saved the root bus number, i.e., the beginning of the
      downstream bus range.  We now support IORESOURCE_BUS resources, so this
      patch uses that to keep track of both the beginning and the end of the
      downstream bus range.
      
      It's important to know both the beginning and the end for supporting _CBA
      (see PCI Firmware spec, rev 3.0, sec 4.1.3) and so we know the limits for
      any possible PCI bus renumbering (we can't renumber downstream buses to be
      outside the bus number range claimed by the host bridge).
      
      It's clear from the spec that the bus range is supposed to be in _CRS, but
      if we don't find it there, we'll assume [_BBN - 0xFF] or [0 - 0xFF].
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Reviewed-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      6ad95513
  13. 23 2月, 2010 2 次提交
    • R
      PCI / ACPI / PM: Platform support for PCI PME wake-up · b67ea761
      Rafael J. Wysocki 提交于
      Although the majority of PCI devices can generate PMEs that in
      principle may be used to wake up devices suspended at run time,
      platform support is generally necessary to convert PMEs into wake-up
      events that can be delivered to the kernel.  If ACPI is used for this
      purpose, PME signals generated by a PCI device will trigger the ACPI
      GPE associated with the device to generate an ACPI wake-up event that
      we can set up a handler for, provided that everything is configured
      correctly.
      
      Unfortunately, the subset of PCI devices that have GPEs associated
      with them is quite limited.  The devices without dedicated GPEs have
      to rely on the GPEs associated with other devices (in the majority of
      cases their upstream bridges and, possibly, the root bridge) to
      generate ACPI wake-up events in response to PME signals from them.
      
      Add ACPI platform support for PCI PME wake-up:
      o Add a framework making is possible to use ACPI system notify
        handlers for run-time PM.
      o Add new PCI platform callback ->run_wake() to struct
        pci_platform_pm_ops allowing us to enable/disable the platform to
        generate wake-up events for given device.  Implemet this callback
        for the ACPI platform.
      o Define ACPI wake-up handlers for PCI devices and PCI root buses and
        make the PCI-ACPI binding code register wake-up notifiers for all
        PCI devices present in the ACPI tables.
      o Add function pci_dev_run_wake() which can be used by PCI drivers to
        check if given device is capable of generating wake-up events at
        run time.
      
      Developed in cooperation with Matthew Garrett <mjg@redhat.com>.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      b67ea761
    • R
      ACPI / PM: Add more run-time wake-up fields · f517709d
      Rafael J. Wysocki 提交于
      Use the run_wake flag to mark all devices for which run-time wake-up
      events may be generated by the platform.  Introduce a new wake-up
      flag, always_enabled, for marking devices that should be permanently
      enabled to generate run-time events.  Also, introduce a reference
      counter for run-wake devices and a function that will initialize all
      of the run-time wake-up fields for given device.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      f517709d
  14. 28 1月, 2010 1 次提交
  15. 26 9月, 2009 7 次提交
  16. 20 9月, 2009 1 次提交
  17. 10 9月, 2009 2 次提交
  18. 29 8月, 2009 1 次提交
  19. 27 8月, 2009 2 次提交
  20. 26 6月, 2009 1 次提交
  21. 18 6月, 2009 3 次提交
  22. 13 6月, 2009 1 次提交
  23. 07 4月, 2009 1 次提交
  24. 05 4月, 2009 1 次提交
    • B
      ACPI: support acpi_device_ops .notify methods · 46ec8598
      Bjorn Helgaas 提交于
      This patch adds support for ACPI device driver .notify() methods.  If
      such a method is present, Linux/ACPI installs a handler for device
      notifications (but not for system notifications such as Bus Check,
      Device Check, etc).  When a device notification occurs, Linux/ACPI
      passes it on to the driver's .notify() method.
      
      In most cases, this removes the need for drivers to install their own
      handlers for device-specific notifications.
      
      For fixed hardware devices like some power and sleep buttons, there's
      no notification value because there's no control method to execute a
      Notify opcode.  When a fixed hardware device generates an event, we
      handle it the same as a regular device notification, except we send
      a ACPI_FIXED_HARDWARE_EVENT value.  This is outside the normal 0x0-0xff
      range used by Notify opcodes.
      
      Several drivers install their own handlers for system Bus Check and
      Device Check notifications so they can support hot-plug.  This patch
      doesn't affect that usage.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Reviewed-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      46ec8598