1. 12 1月, 2011 1 次提交
    • L
      ACPICA: Rename some function and variable names · 3a37898d
      Lin Ming 提交于
      Some function and variable names are renamed to be consistent with
      ACPICA code base.
      
      acpi_raw_enable_gpe -> acpi_ev_add_gpe_reference
      acpi_raw_disable_gpe -> acpi_ev_remove_gpe_reference
      acpi_gpe_can_wake -> acpi_setup_gpe_for_wake
      acpi_gpe_wakeup -> acpi_set_gpe_wake_mask
      acpi_update_gpes -> acpi_update_all_gpes
      acpi_all_gpes_initialized -> acpi_gbl_all_gpes_initialized
      acpi_handler_info -> acpi_gpe_handler_info
      ...
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      3a37898d
  2. 07 1月, 2011 1 次提交
    • R
      ACPI / PM: Use device wakeup flags for handling ACPI wakeup devices · f2b56bc8
      Rafael J. Wysocki 提交于
      There are ACPI devices (buttons and the laptop lid) that can wake up
      the system from sleep states and have no "physical" companion
      devices.  The ACPI subsystem uses two flags, wakeup.state.enabled and
      wakeup.flags.always_enabled, for handling those devices, but they
      are not accessible through the standard device wakeup infrastructure.
      User space can only control them via the /proc/acpi/wakeup interface
      that is not really convenient (e.g. the way in which devices are
      enabled to wake up the system is not portable between different
      systems, because it requires one to know the devices' "names" used in
      the system's ACPI tables).
      
      To address this problem, use standard device wakeup flags instead of
      the special ACPI flags for handling those devices.  In particular,
      use device_set_wakeup_capable() to mark the ACPI wakeup devices
      during initialization and use device_set_wakeup_enable() to allow
      or disallow them to wake up the system from sleep states.  Rework
      the /proc/acpi/wakeup interface to take these changes into account.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      f2b56bc8
  3. 07 7月, 2010 2 次提交
    • R
      ACPICA: Introduce acpi_gpe_wakeup() · e8b6f970
      Rafael J. Wysocki 提交于
      ACPICA uses reference counters to avoid disabling GPEs too early in
      case they have been enabled for many times.  This is done separately
      for runtime and for wakeup, but the wakeup GPE reference counter is
      not really necessary, because GPEs are only enabled to wake up the
      system at the hardware level by acpi_enter_sleep_state().  Thus it
      only is necessary to set the corresponding bits in the wakeup enable
      masks of these GPEs' registers right before the system enters a sleep
      state.  Moreover, the GPE wakeup enable bits can only be set when the
      target sleep state of the system is known and they need to be cleared
      immediately after wakeup regardless of how many wakeup devices are
      associated with a given GPE.
      
      On the basis of the above observations, introduce function
      acpi_gpe_wakeup() to be used for setting or clearing the enable bit
      corresponding to a given GPE in its enable register's enable_for_wake
      mask.  Modify the ACPI suspend and wakeup code the use
      acpi_gpe_wakeup() instead of acpi_{enable|disable}_gpe() to set
      and clear GPE enable bits in their registers' enable_for_wake masks
      during system transitions to a sleep state and back to the working
      state, respectively.  [This will allow us to drop the third
      argument of acpi_{enable|disable}_gpe() and simplify the GPE
      handling code.]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLin Ming <ming.m.lin@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e8b6f970
    • R
      ACPI / Wakeup: Simplify enabling of wakeup devices · 78f5f023
      Rafael J. Wysocki 提交于
      To simplify the enabling of wakeup devices during system suspend and
      hibernation, merge acpi_enable_wakeup_device_prep() with
      acpi_disable_wakeup_device() and remove unnecessary (and no longer
      valid) comments from the latter.  Rename acpi_enable_wakeup_device()
      to acpi_enable_wakeup_devices() and acpi_disable_wakeup_device()
      to acpi_disable_wakeup_devices(), because these functions usually
      operate on multiple device objects.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      78f5f023
  4. 18 6月, 2010 1 次提交
    • R
      ACPI / PM: Do not enable GPEs for system wakeup in advance · cb1cb178
      Rafael J. Wysocki 提交于
      After commit 9630bdd9
      (ACPI: Use GPE reference counting to support shared GPEs) the wakeup
      enable mask bits of GPEs are set as soon as the GPEs are enabled to
      wake up the system.  Unfortunately, this leads to a regression
      reported by Michal Hocko, where a system is woken up from ACPI S5 by
      a device that is not supposed to do that, because the wakeup enable
      mask bit of this device's GPE is always set when
      acpi_enter_sleep_state() calls acpi_hw_enable_all_wakeup_gpes(),
      although it should only be set if the device is supposed to wake up
      the system from the target state.
      
      To work around this issue, rework the ACPI power management code so
      that GPEs are not enabled to wake up the system upfront, but only
      during a system state transition when the target state of the system
      is known.  [Of course, this means that the reference counting of
      "wakeup" GPEs doesn't really make sense and it is sufficient to
      set/unset the wakeup mask bits for them during system sleep
      transitions.  This will allow us to simplify the GPE handling code
      quite a bit, but that change is too intrusive for 2.6.35.]
      
      Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15951Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Reported-and-tested-by: NMichal Hocko <mhocko@suse.cz>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      cb1cb178
  5. 23 2月, 2010 2 次提交
  6. 10 9月, 2009 1 次提交
    • R
      ACPI PM: Replace wakeup.prepared with reference counter · 9b83ccd2
      Rafael J. Wysocki 提交于
      The wakeup.prepared flag is used for marking devices that have the
      wake-up power already enabled, so that the wake-up power is not
      enabled twice in a row for the same device.  This assumes, however,
      that device wake-up power will only be enabled once, while the device
      is being prepared for a system-wide sleep transition, and the second
      attempt is made by acpi_enable_wakeup_device_prep().
      
      With the upcoming PCI wake-up rework this assumption will not hold
      any more for PCI bridges and the root bridge whose wake-up power
      may be enabled as a result of wake-up enable propagation from other
      devices (eg. add-on devices that are not associated with any GPEs).
      Thus, there may be many attempts to enable wake-up power on a PCI
      bridge or the root bridge during a system power state transition
      and it's better to replace wakeup.prepared with a reference counter.
      Reviewed-by: NMatthew Garrett <mjg59@srcf.ucam.org>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      9b83ccd2
  7. 07 4月, 2009 1 次提交
  8. 28 3月, 2009 1 次提交
    • B
      ACPI: call acpi_wakeup_device_init() explicitly rather than as initcall · 201b8c65
      Bjorn Helgaas 提交于
      This patch makes acpi_init() call acpi_wakeup_device_init() directly.
      Previously, acpi_wakeup_device_init() was a late_initcall (sequence 7).
      
      acpi_wakeup_device_init() depends on acpi_wakeup_device_list, which
      is populated when ACPI devices are enumerated by acpi_init() ->
      acpi_scan_init().  Using late_initcall is certainly enough to make
      sure acpi_wakeup_device_list is populated, but it is more than
      necessary.  We can just as easily call acpi_wakeup_device_init()
      directly from acpi_init(), which avoids the initcall magic.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      CC: Li Shaohua <shaohua.li@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      201b8c65
  9. 17 3月, 2009 1 次提交
  10. 09 1月, 2009 1 次提交
  11. 31 12月, 2008 2 次提交
  12. 12 11月, 2008 1 次提交
  13. 08 7月, 2008 2 次提交
    • R
      PCI ACPI: Rework PCI handling of wake-up · eb9d0fe4
      Rafael J. Wysocki 提交于
      * Introduce function acpi_pm_device_sleep_wake() for enabling and
        disabling the system wake-up capability of devices that are power
        manageable by ACPI.
      
      * Introduce function acpi_bus_can_wakeup() allowing other (dependent)
        subsystems to check if ACPI is able to enable the system wake-up
        capability of given device.
      
      * Introduce callback .sleep_wake() in struct pci_platform_pm_ops and
        for the ACPI PCI 'driver' make it use acpi_pm_device_sleep_wake().
      
      * Introduce callback .can_wakeup() in struct pci_platform_pm_ops and
        for the ACPI 'driver' make it use acpi_bus_can_wakeup().
      
      * Move the PME# handlig code out of pci_enable_wake() and split it
        into two functions, pci_pme_capable() and pci_pme_active(),
        allowing the caller to check if given device is capable of
        generating PME# from given power state and to enable/disable the
        device's PME# functionality, respectively.
      
      * Modify pci_enable_wake() to use the new ACPI callbacks and the new
        PME#-related functions.
      
      * Drop the generic .platform_enable_wakeup() callback that is not
        used any more.
      
      * Introduce device_set_wakeup_capable() that will set the
        power.can_wakeup flag of given device.
      
      * Rework PCI device PM initialization so that, if given device is
        capable of generating wake-up events, either natively through the
        PME# mechanism, or with the help of the platform, its
        power.can_wakeup flag is set and its power.should_wakeup flag is
        unset as appropriate.
      
      * Make ACPI set the power.can_wakeup flag for devices found to be
        wake-up capable by it.
      
      * Make the ACPI wake-up code enable/disable GPEs for devices that
        have the wakeup.flags.prepared flag set (which means that their
        wake-up power has been enabled).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      eb9d0fe4
    • R
      ACPI: Introduce acpi_device_sleep_wake function · 77e76609
      Rafael J. Wysocki 提交于
      The currect ACPI code attempts to execute _PSW at three different
      places and in one of them only it tries to execute _DSW before _PSW,
      which is inconsistent with the other two cases.
      
      Move the execution of _DSW and _PSW into a separate function called
      acpi_device_sleep_wake() and call it wherever appropriate instead of
      executing _DSW and/or _PSW directly.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      77e76609
  14. 28 9月, 2007 1 次提交
  15. 25 7月, 2007 1 次提交
  16. 07 11月, 2006 1 次提交
  17. 04 4月, 2006 1 次提交
  18. 16 12月, 2005 1 次提交
  19. 05 8月, 2005 1 次提交
  20. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4