1. 02 2月, 2008 7 次提交
  2. 25 1月, 2008 3 次提交
  3. 15 11月, 2007 1 次提交
  4. 19 10月, 2007 5 次提交
  5. 27 7月, 2007 1 次提交
  6. 20 7月, 2007 5 次提交
    • R
      PM: introduce hibernation and suspend notifiers · b10d9117
      Rafael J. Wysocki 提交于
      Make it possible to register hibernation and suspend notifiers, so that
      subsystems can perform hibernation-related or suspend-related operations that
      should not be carried out by device drivers' .suspend() and .resume()
      routines.
      
      [akpm@linux-foundation.org: build fixes]
      [akpm@linux-foundation.org: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b10d9117
    • R
      Hibernation: prepare to enter the low power state · b1457bcc
      Rafael J. Wysocki 提交于
      During hibernation we call hibernation_ops->prepare() before creating the image,
      but then, before saving it, we cancel the power transition by calling
      hibernation_ops->finish().  Thus prior to calling hibernation_ops->enter() we
      should let the platform firmware know that we're going to enter the low power
      state after all.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b1457bcc
    • R
      swsusp: fix hibernation code ordering · 10a1803d
      Rafael J. Wysocki 提交于
      Change the code ordering so that hibernation_ops->prepare() is called after
      device_suspend().  This is needed so that we don't violate the ACPI
      specification, which states that the _PTS and _GTS system-control methods,
      executed from acpi_sleep_prepare(), ought to be called after devices have been
      put in low power states.
      
      The "Finish" label in hibernation_restore() is moved, because device_suspend()
      resumes devices if the suspending of them fails and the restore code ordering
      should reflect the hibernation code ordering.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      10a1803d
    • R
      swsusp: introduce restore platform operations · a634cc10
      Rafael J. Wysocki 提交于
      At least on some machines it is necessary to prepare the ACPI firmware for the
      restoration of the system memory state from the hibernation image if the
      "platform" mode of hibernation has been used.  Namely, in that cases we need
      to disable the GPEs before replacing the "boot" kernel with the "frozen"
      kernel (cf.  http://bugzilla.kernel.org/show_bug.cgi?id=7887).  After the
      restore they will be re-enabled by hibernation_ops->finish(), but if the
      restore fails, they have to be re-enabled by the restore code explicitly.
      
      For this purpose we can introduce two additional hibernation operations,
      called pre_restore() and restore_cleanup() and call them from the restore code
      path.  Still, they should be called if the "platform" mode of hibernation has
      been used, so we need to pass the information about the hibernation mode from
      the "frozen" kernel to the "boot" kernel in the image header.
      
      Apparently, we can't drop the disabling of GPEs before the restore because of
      Bug #7887 .   We also can't do it unconditionally, because the GPEs wouldn't
      have been enabled after a successful restore if the suspend had been done in
      the 'shutdown' or 'reboot' mode.
      
      In principle we could (and probably should) unconditionally disable the GPEs
      before each snapshot creation *and* before the restore, but then we'd have to
      unconditionally enable them after the snapshot creation as well as after the
      restore (or restore failure)   Still, for this purpose we'd need to modify
      acpi_enter_sleep_state_prep() and acpi_leave_sleep_state() and we'd have to
      introduce some mechanism synchronizing the disablind/enabling of the GPEs with
      the device drivers' .suspend()/.resume() routines and with
      disable_/enable_nonboot_cpus().   However, this would have affected the
      suspend (ie.  s2ram) code as well as the hibernation, which I'd like to avoid
      in this patch series.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a634cc10
    • R
      swsusp: remove code duplication between disk.c and user.c · 7777fab9
      Rafael J. Wysocki 提交于
      Currently, much of the code in kernel/power/disk.c is duplicated in
      kernel/power/user.c , mainly for historical reasons.  By eliminating this code
      duplication we can reduce the size of user.c quite substantially and remove
      the maintenance difficulty resulting from it.
      
      [bunk@stusta.de: kernel/power/disk.c: make code static]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7777fab9
  7. 17 5月, 2007 1 次提交
  8. 10 5月, 2007 1 次提交
    • R
      PM: Separate hibernation code from suspend code · a3d25c27
      Rafael J. Wysocki 提交于
      [ With Johannes Berg <johannes@sipsolutions.net> ]
      
      Separate the hibernation (aka suspend to disk code) from the other suspend
      code.  In particular:
      
       * Remove the definitions related to hibernation from include/linux/pm.h
       * Introduce struct hibernation_ops and a new hibernate() function to hibernate
         the system, defined in include/linux/suspend.h
       * Separate suspend code in kernel/power/main.c from hibernation-related code
         in kernel/power/disk.c and kernel/power/user.c (with the help of
         hibernation_ops)
       * Switch ACPI (the only user of pm_ops.pm_disk_mode) to hibernation_ops
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Greg KH <greg@kroah.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a3d25c27
  9. 08 5月, 2007 3 次提交
  10. 03 5月, 2007 1 次提交
  11. 01 5月, 2007 2 次提交
    • J
      power management: remove firmware disk mode · 11d77d0c
      Johannes Berg 提交于
      This patch removes the firmware disk suspend mode which is the wrong approach,
      it is supposed to be used for implementing firmware-based disk suspend but
      cannot actually be used for that.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: <linux-pm@lists.linux-foundation.org>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NRussell King <rmk@arm.linux.org.uk>
      Cc: Greg KH <greg@kroah.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      11d77d0c
    • J
      rework pm_ops pm_disk_mode, kill misuse · fe0c935a
      Johannes Berg 提交于
      This patch series cleans up some misconceptions about pm_ops.  Some users of
      the pm_ops structure attempt to use it to stop the user from entering suspend
      to disk, this, however, is not possible since the user can always use
      "shutdown" in /sys/power/disk and then the pm_ops are never invoked.  Also,
      platforms that don't support suspend to disk simply should not allow
      configuring SOFTWARE_SUSPEND (read the help text on it, it only selects
      suspend to disk and nothing else, all the other stuff depends on PM).
      
      The pm_ops structure is actually intended to provide a way to enter
      platform-defined sleep states (currently supported states are "standby" and
      "mem" (suspend to ram)) and additionally (if SOFTWARE_SUSPEND is configured)
      allows a platform to support a platform specific way to enter low-power mode
      once everything has been saved to disk.  This is currently only used by ACPI
      (S4).
      
      This patch:
      
      The pm_ops.pm_disk_mode is used in totally bogus ways since nobody really
      seems to understand what it actually does.
      
      This patch clarifies the pm_disk_mode description.
      
      It also removes all the arm and sh users that think they can veto suspend to
      disk via pm_ops; not so since the user can always do echo shutdown >
      /sys/power/disk, they need to find a better way involving Kconfig or such.
      
      ACPI is the only user left with a non-zero pm_disk_mode.
      
      The patch also sets the default mode to shutdown again, but when a new pm_ops
      is registered its pm_disk_mode is selected as default, that way the default
      stays for ACPI where it is apparently required.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: David Brownell <david-b@pacbell.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: <linux-pm@lists.linux-foundation.org>
      Cc: Len Brown <lenb@kernel.org>
      Acked-by: NRussell King <rmk@arm.linux.org.uk>
      Cc: Greg KH <greg@kroah.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fe0c935a
  12. 28 3月, 2007 1 次提交
    • R
      [PATCH] Revert "swsusp: disable nonboot CPUs before entering platform suspend" · 436ce716
      Rafael J. Wysocki 提交于
      This reverts commit 94985134 and
      insteads removes the WARN_ON() that caused that commit in the first
      place.
      
      The problem is that we call disable_nonboot_cpus() in swsusp before
      powering down the system in order to avoid triggering the WARN_ON()
      in arch/x86_64/kernel/acpi/sleep.c:init_low_mapping() and this doesn't
      work well on Thomas' system.
      
      So instead, remove the WARN_ON() in arch/x86_64/kernel/acpi/sleep.c:
      init_low_mapping(), which triggers every time during the suspend to disk
      in the platform mode, as the potential problem it is related to doesn't
      seem to occur in practice.
      
      [ I think we might want to disallow the case of multiple users of that
        mm, or something.  Normally, playing with the current process page
        tables on the current CPU should be fine as long as we don't have
        other threads using those tables at the same time..
      
        Anyway, not pretty, but better than the warning or the lockup - Linus ]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      436ce716
  13. 23 3月, 2007 1 次提交
  14. 17 3月, 2007 2 次提交
  15. 12 2月, 2007 1 次提交
  16. 08 12月, 2006 5 次提交