lkml.org 
[lkml]   [2002]   [Dec]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 10 Dec 2002 11:16:04 -0800 (PST)
From"Randy.Dunlap" <>
Subjectmove LOG_BUF_SIZE to header file
Hi,

I'd like to see LOG_BUF_LEN from kernel/printk.c moved to a header file
so that some non-kernel (kernel-mode) tools can know the value being
used (tools like kmsgdump or lkcd etc.).

This patch moves LOG_BUF_LEN to include/linux/kernel.h .
Or it could go to a separate (new) header file...

Comments?

Thanks,
-- 
~Randy



--- ./include/linux/kernel.h%LOGBUF	Wed Nov 27 14:35:46 2002
+++ ./include/linux/kernel.h	Fri Dec  6 15:50:06 2002
@@ -38,6 +38,17 @@
 #define	KERN_INFO	"<6>"	/* informational			*/
 #define	KERN_DEBUG	"<7>"	/* debug-level messages			*/

+#if defined(CONFIG_X86_NUMAQ) || defined(CONFIG_IA64)
+#define LOG_BUF_LEN	(65536)
+#elif defined(CONFIG_ARCH_S390)
+#define LOG_BUF_LEN	(131072)
+#elif defined(CONFIG_SMP)
+#define LOG_BUF_LEN	(32768)
+#else
+#define LOG_BUF_LEN	(16384)			/* This must be a power of two */
+#endif
+#define LOG_BUF_MASK	(LOG_BUF_LEN-1)
+
 struct completion;

 #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
--- ./kernel/printk.c%LOGBUF	Wed Nov 27 14:36:23 2002
+++ ./kernel/printk.c	Fri Dec  6 15:34:31 2002
@@ -16,6 +16,7 @@
  *	01Mar01 Andrew Morton <andrewm@uow.edu.au>
  */

+#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/tty.h>
 #include <linux/tty_driver.h>
@@ -24,24 +25,12 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>			/* For in_interrupt() */
-#include <linux/config.h>
+#include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/delay.h>

 #include <asm/uaccess.h>

-#if defined(CONFIG_X86_NUMAQ) || defined(CONFIG_IA64)
-#define LOG_BUF_LEN	(65536)
-#elif defined(CONFIG_ARCH_S390)
-#define LOG_BUF_LEN	(131072)
-#elif defined(CONFIG_SMP)
-#define LOG_BUF_LEN	(32768)
-#else
-#define LOG_BUF_LEN	(16384)			/* This must be a power of two */
-#endif
-
-#define LOG_BUF_MASK	(LOG_BUF_LEN-1)
-
 #ifndef arch_consoles_callable
 #define arch_consoles_callable() (1)
 #endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:31    [from the cache]
©2003-2008