All of lore.kernel.org
 help / color / mirror / Atom feed
* move LOG_BUF_SIZE to header file
@ 2002-12-10 19:16 Randy.Dunlap
  2002-12-10 19:41 ` Andrew Morton
  0 siblings, 1 reply; 11+ messages in thread
From: Randy.Dunlap @ 2002-12-10 19:16 UTC (permalink / raw)
  To: linux-kernel


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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-12-18  4:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-10 19:16 move LOG_BUF_SIZE to header file Randy.Dunlap
2002-12-10 19:41 ` Andrew Morton
2002-12-17  6:11   ` [PATCH] " Randy.Dunlap
2002-12-17  6:39     ` James H. Cloos Jr.
2002-12-17 17:22       ` Randy.Dunlap
2002-12-17  9:41     ` Christoph Hellwig
2002-12-17 17:14       ` Randy.Dunlap
2002-12-17 17:27     ` Andrew Morton
2002-12-17 22:33       ` [PATCH] (v3) move LOG_BUF_SIZE to header/config Randy.Dunlap
2002-12-18  1:14         ` Andrew Morton
2002-12-18  4:03           ` Randy.Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.