1. 01 4月, 2009 2 次提交
  2. 19 12月, 2008 1 次提交
    • R
      ACPI hibernate: Add a mechanism to save/restore ACPI NVS memory · 3f4b0ef7
      Rafael J. Wysocki 提交于
      According to the ACPI Specification 3.0b, Section 15.3.2,
      "OSPM will call the _PTS control method some time before entering a
      sleeping state, to allow the platform's AML code to update this
      memory image before entering the sleeping state. After the system
      awakes from an S4 state, OSPM will restore this memory area and call
      the _WAK control method to enable the BIOS to reclaim its memory
      image."  For this reason, implement a mechanism allowing us to save
      the NVS memory during hibernation and to restore it during the
      subsequent resume.
      
      Based on a patch by Zhang Rui.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NNigel Cunningham <nigel@tuxonice.net>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      3f4b0ef7
  3. 02 2月, 2008 3 次提交
  4. 19 10月, 2007 1 次提交
    • R
      Hibernation: Check if ACPI is enabled during restore in the right place · c7e0831d
      Rafael J. Wysocki 提交于
      The following scenario leads to total confusion of the platform firmware on
      some boxes (eg. HPC nx6325):
      * Hibernate with ACPI enabled
      * Resume passing "acpi=off" to the boot kernel
      
      To prevent this from happening it's necessary to check if ACPI is enabled (and
      enable it if that's not the case) _right_ _after_ control has been transfered
      from the boot kernel to the image kernel, before device_power_up() is called
      (ie.  with interrupts disabled).   Enabling ACPI after calling
      device_power_up() turns out to be insufficient.
      
      For this reason, introduce new hibernation callback ->leave() that will be
      executed before device_power_up() by the restored image kernel.   To make it
      work, it also is necessary to move swsusp_suspend() from swsusp.c to disk.c
      (it's name is changed to "create_image", which is more up to the point).
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c7e0831d
  5. 08 5月, 2007 2 次提交
  6. 05 4月, 2007 1 次提交
  7. 12 2月, 2007 1 次提交
  8. 08 12月, 2006 4 次提交
    • R
      [PATCH] swsusp: Fix labels · 59a49335
      Rafael J. Wysocki 提交于
      Move all labels in the swsusp code to the second column, so that they won't
      fool diff -p.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@suspend2.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      59a49335
    • R
      [PATCH] swsusp: Measure memory shrinking time · 0d3a9abe
      Rafael J. Wysocki 提交于
      Make swsusp measure and print the time needed to shrink memory during the
      suspend.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@suspend2.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0d3a9abe
    • R
      [PATCH] swsusp: Improve handling of highmem · 8357376d
      Rafael J. Wysocki 提交于
      Currently swsusp saves the contents of highmem pages by copying them to the
      normal zone which is quite inefficient (eg.  it requires two normal pages
      to be used for saving one highmem page).  This may be improved by using
      highmem for saving the contents of saveable highmem pages.
      
      Namely, during the suspend phase of the suspend-resume cycle we try to
      allocate as many free highmem pages as there are saveable highmem pages.
      If there are not enough highmem image pages to store the contents of all of
      the saveable highmem pages, some of them will be stored in the "normal"
      memory.  Next, we allocate as many free "normal" pages as needed to store
      the (remaining) image data.  We use a memory bitmap to mark the allocated
      free pages (ie.  highmem as well as "normal" image pages).
      
      Now, we use another memory bitmap to mark all of the saveable pages
      (highmem as well as "normal") and the contents of the saveable pages are
      copied into the image pages.  Then, the second bitmap is used to save the
      pfns corresponding to the saveable pages and the first one is used to save
      their data.
      
      During the resume phase the pfns of the pages that were saveable during the
      suspend are loaded from the image and used to mark the "unsafe" page
      frames.  Next, we try to allocate as many free highmem page frames as to
      load all of the image data that had been in the highmem before the suspend
      and we allocate so many free "normal" page frames that the total number of
      allocated free pages (highmem and "normal") is equal to the size of the
      image.  While doing this we have to make sure that there will be some extra
      free "normal" and "safe" page frames for two lists of PBEs constructed
      later.
      
      Now, the image data are loaded, if possible, into their "original" page
      frames.  The image data that cannot be written into their "original" page
      frames are loaded into "safe" page frames and their "original" kernel
      virtual addresses, as well as the addresses of the "safe" pages containing
      their copies, are stored in one of two lists of PBEs.
      
      One list of PBEs is for the copies of "normal" suspend pages (ie.  "normal"
      pages that were saveable during the suspend) and it is used in the same way
      as previously (ie.  by the architecture-dependent parts of swsusp).  The
      other list of PBEs is for the copies of highmem suspend pages.  The pages
      in this list are restored (in a reversible way) right before the
      arch-dependent code is called.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8357376d
    • R
      [PATCH] swsusp: use block device offsets to identify swap locations · 3aef83e0
      Rafael J. Wysocki 提交于
      Make swsusp use block device offsets instead of swap offsets to identify swap
      locations and make it use the same code paths for writing as well as for
      reading data.
      
      This allows us to use the same code for handling swap files and swap
      partitions and to simplify the code, eg.  by dropping rw_swap_page_sync().
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3aef83e0
  9. 26 9月, 2006 2 次提交
    • R
      [PATCH] swsusp: Introduce memory bitmaps · b788db79
      Rafael J. Wysocki 提交于
      Introduce the memory bitmap data structure and make swsusp use in the suspend
      phase.
      
      The current swsusp's internal data structure is not very efficient from the
      memory usage point of view, so it seems reasonable to replace it with a data
      structure that will require less memory, such as a pair of bitmaps.
      
      The idea is to use bitmaps that may be allocated as sets of individual pages,
      so that we can avoid making allocations of order greater than 0.  For this
      reason the memory bitmap structure consists of several linked lists of objects
      that contain pointers to memory pages with the actual bitmap data.  Still, for
      a typical system all of these lists fit in a single page, so it's reasonable
      to introduce an additional mechanism allowing us to allocate all of them
      efficiently without sacrificing the generality of the design.  This is done
      with the help of the chain_allocator structure and associated functions.
      
      We need to use two memory bitmaps during the suspend phase of the
      suspend-resume cycle.  One of them is necessary for marking the saveable
      pages, and the second is used to mark the pages in which to store the copies
      of them (aka image pages).
      
      First, the bitmaps are created and we allocate as many image pages as needed
      (the corresponding bits in the second bitmap are set as soon as the pages are
      allocated).  Second, the bits corresponding to the saveable pages are set in
      the first bitmap and the saveable pages are copied to the image pages.
      Finally, the first bitmap is used to save the kernel virtual addresses of the
      saveable pages and the second one is used to save the contents of the image
      pages.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b788db79
    • D
      PM: issue PM_EVENT_PRETHAW · f1cc0a89
      David Brownell 提交于
      This patch is the first of this series that should actually change any
      behavior ...  by issuing the new event, now tha the rest of the kernel is
      prepared to receive it.
      
      This converts the PM core to issue the new PRETHAW message, which the rest of
      the kernel is now ready to receive.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f1cc0a89
  10. 26 6月, 2006 1 次提交
  11. 23 6月, 2006 3 次提交
  12. 23 3月, 2006 3 次提交
  13. 18 2月, 2006 1 次提交
  14. 08 2月, 2006 1 次提交
  15. 02 2月, 2006 1 次提交
  16. 07 1月, 2006 7 次提交
  17. 09 11月, 2005 3 次提交
  18. 07 11月, 2005 2 次提交
  19. 31 10月, 2005 1 次提交