Re: [PATCH 1/2] lib: Add lz4 compressor module

2013-04-26 Thread Andrew Morton
On Fri, 26 Apr 2013 15:51:05 +1000 Stephen Rothwell s...@canb.auug.org.au wrote: Hi, On Fri, 26 Apr 2013 14:02:01 +0900 Chanho Min chanho@lge.com wrote: @@ -0,0 +1,23 @@ +#include linux/kernel.h + +int __attribute__((weak)) __clzsi2(int val) We have __weak in

Re: [PATCH 1/2] lib: Add lz4 compressor module

2013-04-25 Thread Chanho Min
gcc seems to define __builtin_clz as __clzsi2 in some architecture. But, kernel doesn't link libgcc.a. If kernel should use gcc's built-in function without libgcc.a, do we need to port __clzsi2 to 'arch/*/lib/*'? This breaks alpha (gcc-4.4.4) as well. Can we please get this fixed promptly?

Re: [PATCH 1/2] lib: Add lz4 compressor module

2013-04-25 Thread Stephen Rothwell
Hi, On Fri, 26 Apr 2013 14:02:01 +0900 Chanho Min chanho@lge.com wrote: @@ -0,0 +1,23 @@ +#include linux/kernel.h + +int __attribute__((weak)) __clzsi2(int val) We have __weak in linux/compiler.h -- Cheers, Stephen Rothwells...@canb.auug.org.au

Re: [PATCH 1/2] lib: Add lz4 compressor module

2013-04-22 Thread Geert Uytterhoeven
On Mon, Apr 22, 2013 at 11:22 AM, Chanho Min chanho@lge.com wrote: +#define HTYPE const u8* + +#ifdef __BIG_ENDIAN +#define LZ4_NBCOMMONBYTES(val) (__builtin_clz(val) 3) +#else +#define LZ4_NBCOMMONBYTES(val) (__builtin_ctz(val) 3) +#endif It seems at least m68k and sparc don't have

Re: [PATCH 1/2] lib: Add lz4 compressor module

2013-04-22 Thread Andrew Morton
On Mon, 22 Apr 2013 11:24:21 +0200 Geert Uytterhoeven ge...@linux-m68k.org wrote: On Mon, Apr 22, 2013 at 11:22 AM, Chanho Min chanho@lge.com wrote: +#define HTYPE const u8* + +#ifdef __BIG_ENDIAN +#define LZ4_NBCOMMONBYTES(val) (__builtin_clz(val) 3) +#else +#define

[PATCH 1/2] lib: Add lz4 compressor module

2013-03-14 Thread Chanho Min
This patch adds support for LZ4 compression in the Linux Kernel. LZ4 Compression APIs for kernel are based on LZ4 implementation by Yann Collet and changed with kernel coding style. LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html LZ4 source repository : http://code.google.com/p/lz4/