1. 10 6月, 2010 2 次提交
  2. 29 5月, 2010 2 次提交
    • R
      ACPI / EC / PM: Fix names of functions that block/unblock EC transactions · fe955682
      Rafael J. Wysocki 提交于
      The names of the functions used for blocking/unblocking EC
      transactions during suspend/hibernation suggest that the transactions
      are suspended and resumed by them, while in fact they are disabled
      and enabled.  Rename the functions (and the flag used by them) to
      better reflect what they really do.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      fe955682
    • R
      ACPI / EC / PM: Fix race between EC transactions and system suspend · d5a64513
      Rafael J. Wysocki 提交于
      There still is a race that may result in suspending the system in
      the middle of an EC transaction in progress, which leads to problems
      (like the kernel thinking that the ACPI global lock is held during
      resume while in fact it's not).
      
      To remove the race condition, modify the ACPI platform suspend and
      hibernate callbacks so that EC transactions are blocked right after
      executing the _PTS global control method and are allowed to happen
      again right after the low-level wakeup.
      
      Introduce acpi_pm_freeze() that will disable GPEs, wait until the
      event queues are empty and block EC transactions.  Use it wherever
      GPEs are disabled in preparation for switching local interrupts off.
      Introduce acpi_pm_thaw() that will allow EC transactions to happen
      again and enable runtime GPEs.  Use it to balance acpi_pm_freeze()
      wherever necessary.
      
      In addition to that use acpi_ec_resume_transactions_early() to
      unblock EC transactions as early as reasonably possible during
      resume.  Also unblock EC transactions in acpi_hibernation_finish()
      and in the analogous suspend routine to make sure that the EC
      transactions are enabled in all error paths.
      
      Fixes https://bugzilla.kernel.org/show_bug.cgi?id=14668Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reported-and-tested-by: NMaxim Levitsky <maximlevitsky@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d5a64513
  3. 12 5月, 2010 2 次提交
  4. 07 5月, 2010 1 次提交
  5. 06 5月, 2010 1 次提交
  6. 09 3月, 2010 1 次提交
  7. 23 2月, 2010 1 次提交
    • R
      ACPI: Use GPE reference counting to support shared GPEs · 9630bdd9
      Rafael J. Wysocki 提交于
      ACPI GPEs may map to multiple devices.  The current GPE interface
      only provides a mechanism for enabling and disabling GPEs, making
      it difficult to change the state of GPEs at runtime without extensive
      cooperation between devices.
      
      Add an API to allow devices to indicate whether or not they want
      their device's GPE to be enabled for both runtime and wakeup events.
      
      Remove the old GPE type handling entirely, which gets rid of various
      quirks, like the implicit disabling with GPE type setting. This
      requires a small amount of rework in order to ensure that non-wake
      GPEs are enabled by default to preserve existing behaviour.
      
      Based on patches from Matthew Garrett <mjg@redhat.com>.
      Signed-off-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      9630bdd9
  8. 31 12月, 2009 1 次提交
  9. 24 11月, 2009 1 次提交
  10. 06 11月, 2009 2 次提交
  11. 10 9月, 2009 2 次提交
  12. 30 8月, 2009 1 次提交
  13. 30 7月, 2009 1 次提交
  14. 20 4月, 2009 1 次提交
    • R
      PM/Suspend: Introduce two new platform callbacks to avoid breakage · 6a7c7eaf
      Rafael J. Wysocki 提交于
      Commit 900af0d9 (PM: Change suspend
      code ordering) changed the ordering of suspend code in such a way
      that the platform .prepare() callback is now executed after the
      device drivers' late suspend callbacks have run.  Unfortunately, this
      turns out to break ARM platforms that need to talk via I2C to power
      control devices during the .prepare() callback.
      
      For this reason introduce two new platform suspend callbacks,
      .prepare_late() and .wake(), that will be called just prior to
      disabling non-boot CPUs and right after bringing them back on line,
      respectively, and use them instead of .prepare() and .finish() for
      ACPI suspend.  Make the PM core execute the .prepare() and .finish()
      platform suspend callbacks where they were executed previously (that
      is, right after calling the regular suspend methods provided by
      device drivers and right before executing their regular resume
      methods, respectively).
      
      It is not necessary to make analogous changes to the hibernation
      code and data structures at the moment, because they are only used
      by ACPI platforms.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reported-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NLen Brown <len.brown@intel.com>
      6a7c7eaf
  15. 18 4月, 2009 1 次提交
  16. 04 4月, 2009 1 次提交
  17. 27 3月, 2009 1 次提交
  18. 17 3月, 2009 1 次提交
  19. 16 3月, 2009 2 次提交
  20. 07 2月, 2009 1 次提交
  21. 17 1月, 2009 2 次提交
  22. 09 1月, 2009 1 次提交
  23. 31 12月, 2008 1 次提交
  24. 19 12月, 2008 2 次提交
  25. 27 11月, 2008 1 次提交
  26. 25 10月, 2008 1 次提交
  27. 23 10月, 2008 2 次提交
    • L
      ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n · b849075c
      Len Brown 提交于
      drivers/acpi/sleep/main.c:27: warning: ‘acpi_target_sleep_state’ defined but not used
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b849075c
    • R
      ACPI suspend: Fix CONFIG_ACPI_SLEEP dependence and some compilation warnings · 5d1e072b
      Rafael J. Wysocki 提交于
      Initially CONFIG_PM_SLEEP was defined as
      CONFIG_SUSPEND || CONFIG_HIBERNATION and some ACPI code, most
      importantly the code in drivers/acpi/main.c, was written with this
      assumption.  Currently, however, CONFIG_PM_SLEEP is also set when
      CONFIG_XEN_SAVE_RESTORE is set.
      
      This causes some compilation warnings to appear in
      drivers/acpi/main.c if both CONFIG_SUSPEND and CONFIG_HIBERNATION
      are unset and CONFIG_PM_SLEEP is set (this was impossible before).
      To fix this problem, redefine CONFIG_ACPI_SLEEP do depend directly
      on CONFIG_SUSPEND || CONFIG_HIBERNATION, as originally intended, and
      use it instead of CONFIG_PM_SLEEP in drivers/acpi/main.c, wherever
      appropriate.
      
      Additionally, move the acpi_target_sleep_state definition from under
      the #ifdef to prevent compilation from failing in some cases.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      5d1e072b
  28. 17 10月, 2008 3 次提交
    • R
      ACPI suspend: Blacklist HP xw4600 Workstation for old code ordering · 4fb507b6
      Rafael J. Wysocki 提交于
      HP xw4600 Workstation is known to require the "old" (ie. compatible
      with ACPI 1.0) suspend code ordering, so blacklist it for this
      purpose.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Tested-by: NJohn Brown <john.brown3@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      4fb507b6
    • R
      ACPI Suspend: Enable ACPI during resume if SCI_EN is not set · d0c71fe7
      Rafael J. Wysocki 提交于
      On some machines, like for example MSI Wind U100, the BIOS doesn't
      enable ACPI before returning control to the OS, which sometimes
      causes resume to fail.  This is against the ACPI specification,
      which clearly states that "When the platform is waking from an S1, S2
      or S3 state, OSPM assumes the hardware is already in the ACPI mode
      and will not issue an ACPI_ENABLE", but it won't hurt to check the
      SCI_EN bit and enable ACPI during resume from S3 if this bit is not
      set.
      
      Fortunately, we already have acpi_enable() for that, so use it in the
      resume code path, before executing _BFS, in analogy with the
      resume-from-hibernation code path.
      
      NOTE: We aren't supposed to set SCI_EN directly, because it's owned
      by the hardware.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Pavel Machek <pavel@suse.cz>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d0c71fe7
    • Z
      ACPI: Add the support for _TTS object · e49f711c
      Zhao Yakui 提交于
          The _TTS object is defined in the section 7.3 of acpi 3.0b spec.
          The _TTS control method is executed by the OSPM at the beginning of
      the sleep transition process for S1,S2, S3, S4, and orderly S5 shutdown.
      OS will invoke _TTS before it has notified any native mode device drivers
      of the sleep state transition. The target sleeping state value is passed to
      the _TTS control method.
      
          The _TTS control method is also executed by the OSPM at the end of
      any sleep transition process when the system transitions to S0 from
      S1, S2, S3, or S4. The _TTS object should be evaluated after it has
      notified any native mode device drivers of the end of the sleep state
      transition. The working state value (0) is passed to the _TTS control method.
      
          So it is necessary to add the support for _TTS object. The _TTS object
      will be evaluated if it exists.
          At the same time a block notifier is added to the reboot notifier list so
      that the _TTS object will also be evaluated when the system shutdown.
      
      lenb: note that as of Sep 2008, I've not yet seen _TTS in any shipping BIOS.
      So this patch is to future-proof Linux, rather than fix the installed base.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=11132Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: NLi Shaohua <shaohua.li@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e49f711c
  29. 11 10月, 2008 1 次提交