[RFC|PATCH] Compile time printk verbosity

2009-09-01 Thread Marc Andre Tanner
This series adds a configuration option to selectively compile out printk message strings based on a verbosity level. This works by wrapping printk with a macro which evaluates to a constant if condition which the compiler will be able to optimize out. However because printk might be wrapped

[PATCH 5/7] drivers: make macro independent of printk's return value

2009-09-01 Thread Marc Andre Tanner
Because printk might be wrapped by a macro avoid constructs which assume that the return value can be interpreted as a boolean value. This doesn't work because the macro has no return value which results in a compile error void value not ignored as it ought to be. Signed-off-by: Marc Andre

[PATCH 1/7] printk: introduce CONFIG_PRINTK_VERBOSITY

2009-09-01 Thread Marc Andre Tanner
Introduce a config option which allows to selectively compile out printk messages based on a specified verbosity level. Signed-off-by: Marc Andre Tanner m...@brain-dump.org --- init/Kconfig | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git

[PATCH 6/7] video/stk-webcam: change use of STK_ERROR

2009-09-01 Thread Marc Andre Tanner
Don't rely on the return value of STK_ERROR which is a wrapper around printk use a normal if clause instead. Signed-off-by: Marc Andre Tanner m...@brain-dump.org --- drivers/media/video/stk-webcam.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 4/7] drivers: replace printk with printk_unfiltered

2009-09-01 Thread Marc Andre Tanner
Use the unfiltered variant in cases where the return value is of interest. Signed-off-by: Marc Andre Tanner m...@brain-dump.org --- drivers/char/mem.c |2 +- drivers/md/md.c|2 +- drivers/scsi/aic7xxx/aic79xx_osm.h |2 +-

[PATCH 2/7] printk: move printk to the end of the file

2009-09-01 Thread Marc Andre Tanner
A later patch will #undef printk because the macro would otherwise conflict with the function definition. Moving the printk function to the end of the file makes sure that the macro is expanded within the rest of the file. Signed-off-by: Marc Andre Tanner m...@brain-dump.org --- kernel/printk.c

[PATCH 3/7] printk: introduce printk_unfiltered as an alias to printk

2009-09-01 Thread Marc Andre Tanner
The standard printk function will be wrapped by a macro. However this doesn't work in all situations (for example when the return value of printk is of interest). We therefore provide a new function which is just an alias to printk and therefore bypasses the macro. Signed-off-by: Marc Andre

Re: [PATCH 7/7] printk: provide a filtering macro for printk

2009-09-01 Thread Jamie Lokier
Marc Andre Tanner wrote: + * The check with sizeof(void*) should make sure that we don't operate on + * pointers, which the compiler wouldn't be able to optimize out, but only + * on string constants. Take a look at __builtin_constant_p in the GCC manual. You'll probably find that wrapping

Re: [RFC|PATCH] Compile time printk verbosity

2009-09-01 Thread Mike Frysinger
On Tue, Sep 1, 2009 at 18:31, Marc Andre Tanner wrote: This series adds a configuration option to selectively compile out printk message strings based on a verbosity level. This works by wrapping printk with a macro which evaluates to a constant if condition which the compiler will be able to

RE: [PATCH 7/7] printk: provide a filtering macro for printk

2009-09-01 Thread H Hartley Sweeten
On Tuesday, September 01, 2009 4:24 PM, Tim Bird wrote: Marc Andre Tanner wrote: The macro filters out printk messages based on a configurable verbosity level (CONFIG_PRINTK_VERBOSITY). Signed-off-by: Marc Andre Tanner m...@brain-dump.org --- include/linux/kernel.h | 24

Re: 100Mbit ethernet performance on embedded devices

2009-09-01 Thread Aras Vaichas
On Thu, Aug 20, 2009 at 12:50 AM, Johannes Stezenbach j...@sig21.net wrote: Hi, a while ago I was working on a SoC with 200MHz ARM926EJ-S CPU and integrated 100Mbit ethernet core, connected on internal (fast) memory bus, with DMA.  With iperf I measured:  TCP RX ~70Mbit/sec  (iperf -s on