From patchwork Wed Aug 21 19:46:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Capella X-Patchwork-Id: 2847887 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E5D149F271 for ; Wed, 21 Aug 2013 19:47:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 976D220516 for ; Wed, 21 Aug 2013 19:47:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57056204EB for ; Wed, 21 Aug 2013 19:47:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752610Ab3HUTr4 (ORCPT ); Wed, 21 Aug 2013 15:47:56 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:55758 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752733Ab3HUTrz (ORCPT ); Wed, 21 Aug 2013 15:47:55 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so804992pbc.7 for ; Wed, 21 Aug 2013 12:47:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VoiGP4bp0Ydw3t2006E2H00PYs+CT93EuxCRzRGJYxY=; b=aIAJuHyuFeBCci6HFldQlenwFEy08vBiL7avA/OBGqsgsR/sGnG5Jmpyxf52uZeKFR 4yqaC9Ch9VIpRBiQBGY47zmIEIA3SwQAe5rV1VOhtrRJVZ9jQoIfIkIjAlaAkLTrtj5K WCSzWsniCV1m8igOEYSetyN2TB1YvXGXJfmX+kdsqlyMOc9GHeYtm7sXVStIuXiTEm5m sk3POr939K6YVss/VUgqAmDPT0CfRahwbhx+bKwR5SO1m/7bUR2ATgM7FIf3FWD96HCh N5Qh3won4x5YCGXu+8YMV3fuX1nxNuHctukDrkqckOZrkFodAExgC3nTkpruj4T7ah2b nuKw== X-Gm-Message-State: ALoCoQnCQ4miKipQnHW+0s5/svj4v51aO1M1RMXTtQt1pVvOeFPJsC1wgenF/nt93lLN3tIcQnuk X-Received: by 10.68.170.227 with SMTP id ap3mr1376223pbc.162.1377114474701; Wed, 21 Aug 2013 12:47:54 -0700 (PDT) Received: from localhost (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id yo2sm11890352pab.8.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 12:47:53 -0700 (PDT) From: Sebastian Capella To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linaro-dev@lists.linaro.org Cc: len.brown@intel.com, pavel@ucw.cz, rjw@sisk.pl, Sebastian Capella , rob@landley.net, linux-doc@vger.kernel.org Subject: [PATCH RFC 2/2] PM / Hibernate: add section for resume options Date: Wed, 21 Aug 2013 12:46:53 -0700 Message-Id: <1377114413-8521-3-git-send-email-sebastian.capella@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1377114413-8521-1-git-send-email-sebastian.capella@linaro.org> References: <1377114413-8521-1-git-send-email-sebastian.capella@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Expand the existing documentation to explicitly list the options for resuming a hibernation image, including the manual resume option which can be used from the initrd or initramfs and the kernel init resume. Signed-off-by: Sebastian Capella Acked-by: Pavel Machek --- Documentation/power/swsusp.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index 0b4b63e..079160e 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt @@ -50,6 +50,19 @@ echo N > /sys/power/image_size before suspend (it is limited to 500 MB by default). +. The resume process checks for the presence of the resume device, +if found, it then checks the contents for the hibernation image signature. +If both are found, it resumes the hibernation image. + +. The resume process may be triggered in two ways: + 1) During lateinit: If resume=/dev/your_swap_partition is specified on + the kernel command line, lateinit runs the resume process. If the + resume device has not been probed yet, the resume process fails and + bootup continues. + 2) Manually from an initrd or initramfs: May be run from + the init script by using the /sys/power/resume file. It is vital + that this be done prior to remounting any filesystems (even as + read-only) otherwise data may be corrupted. Article about goals and implementation of Software Suspend for Linux ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -326,7 +339,7 @@ Q: How can distributions ship a swsusp-supporting kernel with modular disk drivers (especially SATA)? A: Well, it can be done, load the drivers, then do echo into -/sys/power/disk/resume file from initrd. Be sure not to mount +/sys/power/resume file from initrd. Be sure not to mount anything, not even read-only mount, or you are going to lose your data.