From: Tony Lindgren <tony@atomide.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>,
tony.luck@intel.com, Nick Piggin <nickpiggin@yahoo.com.au>
Subject: [PATCH] Fix CONFIG_PRINTK_TIME hangs on some systems
Date: Thu, 4 May 2006 03:24:16 -0700 [thread overview]
Message-ID: <20060504102415.GL8664@atomide.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
Hi all,
This issue has been discussed earlier on LKML, but AFAIK
there has not been any better solution available:
http://lkml.org/lkml/2005/8/18/173
Regards,
Tony
[-- Attachment #2: patch-printk-time-hangs --]
[-- Type: text/plain, Size: 919 bytes --]
Fix CONFIG_PRINTK_TIME hangs on systems where sched_clock() does
not work before timer is initialized.
Signed-off-by: Tony Lindgren <tony@atomide.com>
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -431,11 +431,23 @@ static void zap_locks(void)
init_MUTEX(&console_sem);
}
-#if defined(CONFIG_PRINTK_TIME)
-static int printk_time = 1;
-#else
static int printk_time = 0;
-#endif
+
+#ifdef CONFIG_PRINTK_TIME
+
+/*
+ * Initialize printk time. Note that on some systems sched_clock()
+ * does not work until timer is initialized.
+ */
+static int __init printk_time_init(void)
+{
+ printk_time = 1;
+
+ return 0;
+}
+subsys_initcall(printk_time_init);
+
+#else
static int __init printk_time_setup(char *str)
{
@@ -447,6 +459,8 @@ static int __init printk_time_setup(char
__setup("time", printk_time_setup);
+#endif
+
__attribute__((weak)) unsigned long long printk_clock(void)
{
return sched_clock();
next reply other threads:[~2006-05-04 10:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-04 10:24 Tony Lindgren [this message]
2006-05-04 16:14 Luck, Tony
2006-05-05 6:54 ` Tony Lindgren
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=20060504102415.GL8664@atomide.com \
--to=tony@atomide.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=tony.luck@intel.com \
/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
Powered by JetHome