1. 24 10月, 2017 1 次提交
    • R
      PM / QoS: Fix device resume latency PM QoS · 0cc2b4e5
      Rafael J. Wysocki 提交于
      The special value of 0 for device resume latency PM QoS means
      "no restriction", but there are two problems with that.
      
      First, device resume latency PM QoS requests with 0 as the
      value are always put in front of requests with positive
      values in the priority lists used internally by the PM QoS
      framework, causing 0 to be chosen as an effective constraint
      value.  However, that 0 is then interpreted as "no restriction"
      effectively overriding the other requests with specific
      restrictions which is incorrect.
      
      Second, the users of device resume latency PM QoS have no
      way to specify that *any* resume latency at all should be
      avoided, which is an artificial limitation in general.
      
      To address these issues, modify device resume latency PM QoS to
      use S32_MAX as the "no constraint" value and 0 as the "no
      latency at all" one and rework its users (the cpuidle menu
      governor, the genpd QoS governor and the runtime PM framework)
      to follow these changes.
      
      Also add a special "n/a" value to the corresponding user space I/F
      to allow user space to indicate that it cannot accept any resume
      latencies at all for the given device.
      
      Fixes: 85dc0b8a (PM / QoS: Make it possible to expose PM QoS latency constraints)
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=197323Reported-by: NReinette Chatre <reinette.chatre@intel.com>
      Tested-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NAlex Shi <alex.shi@linaro.org>
      Cc: All applicable <stable@vger.kernel.org>
      0cc2b4e5
  2. 26 9月, 2017 1 次提交
  3. 20 9月, 2017 1 次提交
    • R
      PM: core: Fix device_pm_check_callbacks() · 157c460e
      Rafael J. Wysocki 提交于
      The device_pm_check_callbacks() function doesn't check legacy
      ->suspend and ->resume callback pointers under the device's
      bus type, class and driver, so in some cases it may set the
      no_pm_callbacks flag for the device incorrectly and then the
      callbacks may be skipped during system suspend/resume, which
      shouldn't happen.
      
      Fixes: aa8e54b5 (PM / sleep: Go direct_complete if driver has no callbacks)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: 4.5+ <stable@vger.kernel.org> # 4.5+
      157c460e
  4. 18 9月, 2017 1 次提交
  5. 25 8月, 2017 1 次提交
  6. 11 8月, 2017 1 次提交
  7. 08 8月, 2017 1 次提交
    • R
      PM / wakeup: Set power.can_wakeup if wakeup_sysfs_add() fails · 820b9b0c
      Rafael J. Wysocki 提交于
      Currently, an error from wakeup_sysfs_add() in
      device_set_wakeup_capable() causes the device's power.can_wakeup
      flag to remain unset even though the device technically is capable
      of signaling wakeup.
      
      If wakeup_sysfs_add() fails user space may not be able to enable
      the device to wake up the system from sleep states, but at least
      for some devices that does not matter.
      
      For this reason, set or clear power.can_wakeup upfront and if
      wakeup_sysfs_add() returns an error, print a message to the log.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      820b9b0c
  8. 01 8月, 2017 1 次提交
  9. 25 7月, 2017 5 次提交
  10. 22 7月, 2017 1 次提交
    • R
      PM / sleep: Do not print debug messages by default · 8d8b2441
      Rafael J. Wysocki 提交于
      Debug messages from the system suspend/hibernation infrastructure can
      fill up the entire kernel log buffer in some cases and anyway they
      are only useful for debugging.  They depend on CONFIG_PM_DEBUG, but
      that is set as a rule as some generally useful diagnostic facilities
      depend on it too.
      
      For this reason, avoid printing those messages by default, but make
      it possible to turn them on as needed with the help of a new sysfs
      attribute under /sys/power/.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8d8b2441
  11. 19 7月, 2017 1 次提交
  12. 16 7月, 2017 1 次提交
  13. 12 7月, 2017 1 次提交
  14. 05 7月, 2017 2 次提交
  15. 29 6月, 2017 6 次提交
  16. 28 6月, 2017 5 次提交
  17. 27 6月, 2017 1 次提交
  18. 24 6月, 2017 1 次提交
  19. 22 6月, 2017 5 次提交
  20. 15 6月, 2017 2 次提交
    • R
      ACPI / PM: Ignore spurious SCI wakeups from suspend-to-idle · 33e4f80e
      Rafael J. Wysocki 提交于
      The ACPI SCI (System Control Interrupt) is set up as a wakeup IRQ
      during suspend-to-idle transitions and, consequently, any events
      signaled through it wake up the system from that state.  However,
      on some systems some of the events signaled via the ACPI SCI while
      suspended to idle should not cause the system to wake up.  In fact,
      quite often they should just be discarded.
      
      Arguably, systems should not resume entirely on such events, but in
      order to decide which events really should cause the system to resume
      and which are spurious, it is necessary to resume up to the point
      when ACPI SCIs are actually handled and processed, which is after
      executing dpm_resume_noirq() in the system resume path.
      
      For this reasons, add a loop around freeze_enter() in which the
      platforms can process events signaled via multiplexed IRQ lines
      like the ACPI SCI and add suspend-to-idle hooks that can be
      used for this purpose to struct platform_freeze_ops.
      
      In the ACPI case, the ->wake hook is used for checking if the SCI
      has triggered while suspended and deferring the interrupt-induced
      system wakeup until the events signaled through it are actually
      processed sufficiently to decide whether or not the system should
      resume.  In turn, the ->sync hook allows all of the relevant event
      queues to be flushed so as to prevent events from being missed due
      to race conditions.
      
      In addition to that, some ACPI code processing wakeup events needs
      to be modified to use the "hard" version of wakeup triggers, so that
      it will cause a system resume to happen on device-induced wakeup
      events even if the "soft" mechanism to prevent the system from
      suspending is not enabled.  However, to preserve the existing
      behavior with respect to suspend-to-RAM, this only is done in
      the suspend-to-idle case and only if an SCI has occurred while
      suspended.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      33e4f80e
    • R
      PM / sleep: Print timing information if debug is enabled · 604d8958
      Rafael J. Wysocki 提交于
      Avoid printing the device suspend/resume timing information if
      CONFIG_PM_DEBUG is not set to reduce the log noise level.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      604d8958
  21. 13 6月, 2017 1 次提交