From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Andrew Morton <akpm@osdl.org>
Cc: Pavel Machek <pavel@suse.cz>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH -mm] swsusp: do not change log level during suspend/resume
Date: Mon, 30 Jan 2006 23:31:48 +0100 [thread overview]
Message-ID: <200601302331.49297.rjw@sisk.pl> (raw)
Hi,
This patch prevents the kernel from setting the log level to 10 unconditionally
during suspend/resume which was needed in the past for debugging, but
generally is undesirable.
Please apply.
Greetings,
Rafael
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
kernel/power/console.c | 12 +-----------
kernel/power/power.h | 5 +++++
2 files changed, 6 insertions(+), 11 deletions(-)
Index: linux-2.6.16-rc1-mm4/kernel/power/console.c
===================================================================
--- linux-2.6.16-rc1-mm4.orig/kernel/power/console.c 2006-01-30 21:17:53.000000000 +0100
+++ linux-2.6.16-rc1-mm4/kernel/power/console.c 2006-01-30 21:32:24.000000000 +0100
@@ -9,18 +9,11 @@
#include <linux/console.h>
#include "power.h"
-static int new_loglevel = 10;
-static int orig_loglevel;
#ifdef SUSPEND_CONSOLE
static int orig_fgconsole, orig_kmsg;
-#endif
int pm_prepare_console(void)
{
- orig_loglevel = console_loglevel;
- console_loglevel = new_loglevel;
-
-#ifdef SUSPEND_CONSOLE
acquire_console_sem();
orig_fgconsole = fg_console;
@@ -41,18 +34,15 @@ int pm_prepare_console(void)
}
orig_kmsg = kmsg_redirect;
kmsg_redirect = SUSPEND_CONSOLE;
-#endif
return 0;
}
void pm_restore_console(void)
{
- console_loglevel = orig_loglevel;
-#ifdef SUSPEND_CONSOLE
acquire_console_sem();
set_console(orig_fgconsole);
release_console_sem();
kmsg_redirect = orig_kmsg;
-#endif
return;
}
+#endif
Index: linux-2.6.16-rc1-mm4/kernel/power/power.h
===================================================================
--- linux-2.6.16-rc1-mm4.orig/kernel/power/power.h 2006-01-30 21:19:43.000000000 +0100
+++ linux-2.6.16-rc1-mm4/kernel/power/power.h 2006-01-30 21:33:19.000000000 +0100
@@ -43,8 +43,13 @@ static struct subsys_attribute _name##_a
extern struct subsystem power_subsys;
+#ifdef SUSPEND_CONSOLE
extern int pm_prepare_console(void);
extern void pm_restore_console(void);
+#else
+static int pm_prepare_console(void) { return 0; }
+static void pm_restore_console(void) {}
+#endif
/* References to section boundaries */
extern const void __nosave_begin, __nosave_end;
reply other threads:[~2006-01-30 22:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200601302331.49297.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®