]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/printk.c
Merge omap-upstream
[linux-2.6-omap-h63xx.git] / kernel / printk.c
index bd2cd062878d6fb1f4b40895ddee7dbe9f9468da..52daa19a4c15d03c84c195a2e9c8d641c953b536 100644 (file)
 
 #define __LOG_BUF_LEN  (1 << CONFIG_LOG_BUF_SHIFT)
 
+#ifdef        CONFIG_DEBUG_LL
+extern void printascii(char *);
+#endif
+
 /* printk's without a loglevel use this.. */
 #define DEFAULT_MESSAGE_LOGLEVEL 4 /* KERN_WARNING */
 
@@ -444,12 +448,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
-module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
+
+#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)
 {
@@ -464,6 +479,9 @@ static int __init printk_time_setup(char *str)
 
 __setup("time", printk_time_setup);
 
+#endif
+module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);
+
 __attribute__((weak)) unsigned long long printk_clock(void)
 {
        return sched_clock();
@@ -542,6 +560,10 @@ asmlinkage int vprintk(const char *fmt, va_list args)
        /* Emit the output into the temporary buffer */
        printed_len = vscnprintf(printk_buf, sizeof(printk_buf), fmt, args);
 
+#ifdef CONFIG_DEBUG_LL
+       printascii(printk_buf);
+#endif
+
        /*
         * Copy the output into log_buf.  If the caller didn't provide
         * appropriate log level tags, we insert them here