Config printk buffer size
Subsystems (9)
This should allow the printk buffer to be sized during config. The default size is still 16K. It could use some checking to insure power-of-2, but CML1 doesn't have a way to
do it that I see. All the architectures should be covered, and all the default files also have it.
It gets added in the kernel hacking section.
Having 8 software raid volumes most of the kernel hardware detection messages get lost. Having to edit kernel/printk.c before/after every kernel change is a mess and easy to forget.
I'm gouing to work on a resizing buffer, that drops to 4K or 8K after dmesg is called with the right switch.
Patch against 2.4.3-ac2 since it has more arch supported.
The embedded systems like arm, might want to change the default size to something smaller for their arch, whiuch is easier with this patch.
-Thomas
Documentation/Configure.help +7 -1
@@ -15191,7 +15191,13 @@ send a BREAK and then within 5 seconds a command keypress. The keys are documented in Documentation/sysrq.txt. Don't say Y unless you really know what this hack does. - +Printk buffer size +CONFIG_PRINTK_BUF_LEN + Printk buffer size in K bytes. This should be a power of 2. + The 2.2.x kernels used a default of 8. The 2.4.x kernels + use a default of 16. Systems with many Software-RAID volumes + should increase since the md.o drivers have a lot of printk + output during boot. ISDN subsystem CONFIG_ISDN ISDN ("Integrated Services Digital Networks", called RNIS in France)
arch/alpha/config.in +1 -0
@@ -361,6 +361,7 @@ fi bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 bool 'Legacy kernel start address' CONFIG_ALPHA_LEGACY_START_ADDRESS
arch/alpha/defconfig +1 -0
@@ -634,4 +634,5 @@ # CONFIG_MATHEMU=y CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16 CONFIG_ALPHA_LEGACY_START_ADDRESS=y
arch/arm/config.in +1 -0
@@ -414,6 +414,7 @@ bool 'Verbose user fault messages' CONFIG_DEBUG_USER bool 'Include debugging information in kernel binary' CONFIG_DEBUG_INFO bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 if [ "$CONFIG_CPU_26" = "y" ]; then bool 'Disable pgtable cache' CONFIG_NO_PGT_CACHE fi
arch/arm/def-configs/a5k +1 -0
@@ -532,5 +532,6 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16 CONFIG_NO_PGT_CACHE=y CONFIG_DEBUG_LL=y
arch/arm/def-configs/assabet +1 -0
@@ -566,4 +566,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/brutus +1 -0
@@ -293,4 +293,5 @@ CONFIG_DEBUG_USER=y CONFIG_DEBUG_INFO=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/cerf +1 -0
@@ -431,4 +431,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/clps7500 +1 -0
@@ -487,4 +487,5 @@ # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_INFO is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/ebsa110 +1 -0
@@ -502,4 +502,5 @@ # CONFIG_DEBUG_USER is not set # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/empeg +1 -0
@@ -261,4 +261,5 @@ CONFIG_DEBUG_USER_BACKTRACE=y # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/footbridge +1 -0
@@ -890,5 +890,6 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16 CONFIG_DEBUG_LL=y # CONFIG_DEBUG_DC21285_PORT is not set
arch/arm/def-configs/graphicsclient +1 -0
@@ -541,4 +541,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/integrator +1 -0
@@ -508,4 +508,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16 CONFIG_DEBUG_LL=y
arch/arm/def-configs/lart +1 -0
@@ -492,4 +492,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16 CONFIG_DEBUG_LL=y
arch/arm/def-configs/lusl7200 +1 -0
@@ -226,4 +226,5 @@ CONFIG_DEBUG_USER=y CONFIG_DEBUG_INFO=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 CONFIG_DEBUG_LL=y
arch/arm/def-configs/neponset +1 -0
@@ -573,4 +573,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/pangolin +1 -0
@@ -488,4 +488,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/def-configs/rpc +1 -0
@@ -707,4 +707,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16 CONFIG_DEBUG_LL=y
arch/arm/def-configs/shark +1 -0
@@ -652,4 +652,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 CONFIG_DEBUG_LL=y
arch/arm/def-configs/sherman +1 -0
@@ -207,4 +207,5 @@ CONFIG_DEBUG_USER=y CONFIG_DEBUG_INFO=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 CONFIG_DEBUG_LL=y
arch/arm/def-configs/victor +1 -0
@@ -200,4 +200,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/arm/defconfig +1 -0
@@ -719,4 +719,5 @@ CONFIG_DEBUG_USER=y # CONFIG_DEBUG_INFO is not set CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16 # CONFIG_DEBUG_LL is not set
arch/cris/config.in +1 -0
@@ -223,4 +223,5 @@ if [ "$CONFIG_PROFILE" = "y" ]; then int ' Profile shift count' CONFIG_PROFILE_SHIFT 2 fi +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/cris/defconfig +1 -0
@@ -472,3 +472,4 @@ # Kernel hacking # # CONFIG_PROFILE is not set +CONFIG_PRINTK_BUF_LEN=16
arch/i386/config.in +1 -0
@@ -384,6 +384,7 @@ bool ' Debug memory allocations' CONFIG_DEBUG_SLAB bool ' Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT + int ' Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 bool ' Magic SysRq key' CONFIG_MAGIC_SYSRQ bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK bool ' Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
arch/i386/defconfig +1 -0
@@ -722,3 +722,4 @@ # CONFIG_DEBUG_IOVIRT=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ia64/config.in +1 -1
@@ -255,5 +255,5 @@ bool 'Print possible IA64 hazards to console' CONFIG_IA64_PRINT_HAZARDS bool 'Enable new unwind support' CONFIG_IA64_NEW_UNWIND bool 'Disable VHPT' CONFIG_DISABLE_VHPT - +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/ia64/defconfig +1 -0
@@ -276,3 +276,4 @@ # CONFIG_IA64_DEBUG_IRQ is not set # CONFIG_IA64_PRINT_HAZARDS is not set # CONFIG_KDB is not set +CONFIG_PRINTK_BUF_LEN=16
arch/m68k/config.in +1 -0
@@ -540,4 +540,5 @@ #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/m68k/defconfig +1 -0
@@ -327,3 +327,4 @@ # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips/config.in +1 -0
@@ -400,4 +400,5 @@ bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG fi bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/mips/defconfig +1 -1
@@ -354,4 +354,4 @@ # CONFIG_CROSSCOMPILE=y # CONFIG_MIPS_FPE_MODULE is not set -# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_MAGIC_SYSRQ is not setCONFIG_PRINTK_BUF_LEN=16
arch/mips/defconfig-cobalt +1 -0
@@ -596,3 +596,4 @@ # CONFIG_CROSSCOMPILE is not set # CONFIG_MIPS_FPE_MODULE is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips/defconfig-ddb5476 +1 -0
@@ -539,3 +539,4 @@ # CONFIG_LL_DEBUG is not set # CONFIG_MAGIC_SYSRQ is not set # CONFIG_MIPS_UNCACHED is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips/defconfig-decstation +1 -0
@@ -328,3 +328,4 @@ # CONFIG_MIPS_FPE_MODULE is not set # CONFIG_REMOTE_DEBUG is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips/defconfig-ip22 +1 -0
@@ -355,3 +355,4 @@ CONFIG_CROSSCOMPILE=y # CONFIG_MIPS_FPE_MODULE is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips/defconfig-it8172 +1 -0
@@ -567,3 +567,4 @@ # CONFIG_LL_DEBUG is not set # CONFIG_MAGIC_SYSRQ is not set # CONFIG_MIPS_UNCACHED is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips/defconfig-orion +1 -0
@@ -302,3 +302,4 @@ # CONFIG_CROSSCOMPILE=y # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips/defconfig-rm200 +1 -0
@@ -363,3 +363,4 @@ CONFIG_CROSSCOMPILE=y # CONFIG_MIPS_FPE_MODULE is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips64/config.in +1 -0
@@ -265,4 +265,5 @@ fi bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/mips64/defconfig +1 -0
@@ -458,3 +458,4 @@ CONFIG_CROSSCOMPILE=y # CONFIG_REMOTE_DEBUG is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips64/defconfig-ip22 +1 -0
@@ -372,3 +372,4 @@ CONFIG_CROSSCOMPILE=y # CONFIG_REMOTE_DEBUG is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/mips64/defconfig-ip27 +1 -0
@@ -458,3 +458,4 @@ CONFIG_CROSSCOMPILE=y # CONFIG_REMOTE_DEBUG is not set # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/parisc/config.common +1 -0
@@ -156,4 +156,5 @@ #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/parisc/defconfig +1 -0
@@ -475,3 +475,4 @@ # Kernel hacking # CONFIG_MAGIC_SYSRQ=y +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/config.in +1 -0
@@ -351,4 +351,5 @@ bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ bool 'Include kgdb kernel debugger' CONFIG_KGDB bool 'Include xmon kernel debugger' CONFIG_XMON +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/ppc/configs/IVMS8_defconfig +1 -0
@@ -450,3 +450,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/SM850_defconfig +1 -0
@@ -418,3 +418,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/SPD823TS_defconfig +1 -0
@@ -414,3 +414,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/TQM823L_defconfig +1 -0
@@ -417,3 +417,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/TQM850L_defconfig +1 -0
@@ -417,3 +417,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/TQM860L_defconfig +1 -0
@@ -417,3 +417,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/apus_defconfig +1 -0
@@ -598,3 +598,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/bseip_defconfig +1 -0
@@ -430,3 +430,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/common_defconfig +1 -0
@@ -838,3 +838,4 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_KGDB is not set CONFIG_XMON=y +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/est8260_defconfig +1 -0
@@ -413,3 +413,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/ibmchrp_defconfig +1 -0
@@ -634,3 +634,4 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_KGDB is not set CONFIG_XMON=y +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/mbx_defconfig +1 -0
@@ -422,3 +422,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/oak_defconfig +1 -0
@@ -393,3 +393,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/power3_defconfig +1 -0
@@ -660,3 +660,4 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_KGDB is not set CONFIG_XMON=y +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/rpxcllf_defconfig +1 -0
@@ -429,3 +429,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/rpxlite_defconfig +1 -0
@@ -429,3 +429,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/configs/walnut_defconfig +1 -0
@@ -396,3 +396,4 @@ # CONFIG_MAGIC_SYSRQ is not set # CONFIG_KGDB is not set # CONFIG_XMON is not set +CONFIG_PRINTK_BUF_LEN=16
arch/ppc/defconfig +2 -0
@@ -837,3 +837,5 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_KGDB is not set CONFIG_XMON=y +CONFIG_PRINTK_BUF_LEN=16 +
arch/s390/config.in +1 -0
@@ -66,5 +66,6 @@ bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG fi # this does not work. bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/s390/defconfig +1 -0
@@ -218,3 +218,4 @@ # # Kernel hacking # +CONFIG_PRINTK_BUF_LEN=16
arch/s390x/config.in +1 -0
@@ -69,5 +69,6 @@ bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG fi # this does not work. bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/s390x/defconfig +1 -0
@@ -217,3 +217,4 @@ # # Kernel hacking # +CONFIG_PRINTK_BUF_LEN=16
arch/sh/config.in +1 -0
@@ -265,4 +265,5 @@ bool 'GDB Stub kernel debug' CONFIG_DEBUG_KERNEL_WITH_GDB_STUB bool 'Early printk support' CONFIG_SH_EARLY_PRINTK fi +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/sh/defconfig +1 -0
@@ -204,3 +204,4 @@ CONFIG_DEBUG_KERNEL_WITH_GDB_STUB=y CONFIG_GDB_STUB_VBR=a0000000 CONFIG_SH_EARLY_PRINTK=y +CONFIG_PRINTK_BUF_LEN=16
arch/sparc/config.in +1 -0
@@ -261,4 +261,5 @@ comment 'Kernel hacking' bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/sparc/defconfig +1 -0
@@ -381,3 +381,4 @@ # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16
arch/sparc64/config.in +1 -0
@@ -349,4 +349,5 @@ bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ #bool 'ECache flush trap support at ta 0x72' CONFIG_EC_FLUSH_TRAP +int 'Printk buffer size (in K bytes)' CONFIG_PRINTK_BUF_LEN 16 endmenu
arch/sparc64/defconfig +2 -0
@@ -640,3 +640,5 @@ # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set +CONFIG_PRINTK_BUF_LEN=16 +
kernel/printk.c +1 -1
@@ -27,7 +27,7 @@#include <asm/uaccess.h> -#define LOG_BUF_LEN (16384)/* This must be a power of two */ +#define LOG_BUF_LEN (CONFIG_PRINTK_BUF_LEN*1024)/* This must be a power of two */ #define LOG_BUF_MASK (LOG_BUF_LEN-1)/* printk's without a loglevel use this.. */
"Thomas Dodd wrote:"
kernel/printk.c line 32
Quoted 11 lines
diff -u --new-file --recursive
linux-2.4.3-ac2.orig/kernel/printk.clinux-2.4.3-ac2/kernel/printk.ckernel/printk.c +1
-1@@ -27,7 +27,7 @@#include <asm/uaccess.h> -#define LOG_BUF_LEN (16384)/* This must be a power of two */ +#define LOG_BUF_LEN (CONFIG_PRINTK_BUF_LEN*1024)/* This must be a power of two */ #define LOG_BUF_MASK (LOG_BUF_LEN-1)
IMO, it would be nice to add a test here whether the CONFIG_PRINTK_BUF_LEN value is really set as a power of two, eg.:
#if (LOG_BUF_LEN & LOG_BUF_MASK)
#error CONFIG_PRINTK_BUF_LEN must be a power of two #endif
(above works with egcs-2.91.66)
Andrzej
Quoted 7 lines · Andrzej Krzysztofowicz
IMO, it would be nice to add a test here whether the
CONFIG_PRINTK_BUF_LENvalue is really set as a power of two, eg.:#if (
LOG_BUF_LEN&LOG_BUF_MASK)
#errorCONFIG_PRINTK_BUF_LENmust be a power of two #endif
I couldn't figure out how to do it in the config, forgot about preprocessing. But Alan wants a menu option instead.
Anyone who uses the embedded systems want a different default? Let me know and I'll put it in the default config files.
I'm sure a small hand held with fixed devices doesn't need even a 8K buffer. Just don't know which ones.
-Thomas