[PATCH v2 06/30] Add mips-specific parity functions

2016-04-06 Thread zengzhaoxiu
From: Zhaoxiu Zeng Lifted from arch_hweight.h Signed-off-by: Zhaoxiu Zeng --- arch/mips/include/asm/arch_parity.h | 43 + arch/mips/include/asm/bitops.h | 3 +++ 2 files changed, 46 insertions(+) create mode 100644 arch/mips/include/asm/arch_parity.h

[PATCH] mtd: nand: s3c2410: fix bug in s3c2410_nand_correct_data()

2016-04-12 Thread zengzhaoxiu
From: Zhaoxiu Zeng If there is only one bit difference in the ECC, the function should return 1. The result of "diff0 & ~(1< --- drivers/mtd/nand/s3c2410.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 9c9397b.

[patch V4 05/31] bitops: Add ia64-specific parity functions

2016-06-29 Thread zengzhaoxiu
From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- arch/ia64/include/asm/bitops.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h index 71e8145..041d1d6 100644 --- a/arch/ia64/include/asm/bitops

[patch V4 27/31] serial: use parity8 in max3100

2016-06-29 Thread zengzhaoxiu
From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng Acked-by: Greg Kroah-Hartman --- drivers/tty/serial/max3100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index 5c4c280..a0cc84a 100644 --- a/drivers/tty/serial/ma

[patch V4 09/31] bitops: Add x86-specific parity functions

2016-06-29 Thread zengzhaoxiu
From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- arch/x86/include/asm/arch_parity.h | 60 ++ arch/x86/include/asm/bitops.h | 4 ++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 arch/x86/include/asm/arch_parity.h diff --git a/a

[PATCH 1/2] lib: hexdump: use a look-up table to do hex_to_bin

2016-06-29 Thread zengzhaoxiu
From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- include/linux/kernel.h | 15 ++- lib/hexdump.c | 36 +++- 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 94aa10f..72a04

[PATCH 2/2] lib: kstrtox: _parse_integer: use hex_to_bin instead local conversion, and reduce branches

2016-06-29 Thread zengzhaoxiu
From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- lib/kstrtox.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/lib/kstrtox.c b/lib/kstrtox.c index d8a5cf6..70d3374 100644 --- a/lib/kstrtox.c +++ b/lib/kstrtox.c @@ -48,38 +48,26 @@ unsigned int _pars

[patch V4 30/31] crypto: use parity_long in sahara.c

2016-06-29 Thread zengzhaoxiu
From: Zhaoxiu Zeng Signed-off-by: Zhaoxiu Zeng --- drivers/crypto/sahara.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index c3f3d89..5c44a15 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -783,7 +7

[patch V4 27/31] serial: use parity8 in max3100

2016-06-29 Thread zengzhaoxiu
From: Zhaoxiu Zeng Use parity8(c) instead "hweight8(c) & 1" to improve readability, and improve performance on some CPUs that without popcount support. Signed-off-by: Zhaoxiu Zeng --- drivers/tty/serial/max3100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/s

[PATCH 1/3] lib: Introduce copy_from_back()

2020-11-09 Thread zengzhaoxiu
From: Zhaoxiu Zeng Copying the matched bytes from the back output buffer is the key code of the LZ decompression algorithm which used by zlib, lzo, etc. This patch introduce the optimized copy_from_back function. The function will be used by later patches in this series. Optimization for a spec

[PATCH 2/3] lib: zlib_inflate: improves decompression performance

2020-11-09 Thread zengzhaoxiu
From: Zhaoxiu Zeng This patch does: 1. Cleanup code and reduce branches 2. Use copy_from_back to copy the matched bytes from the back output buffer I tested on 5.8.18-300.fc33.x86_64. The performance of function zlib_inflate is improved by about 7%. If the CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS

[PATCH 3/3] lib: lzo: Improves decompression performance

2020-11-09 Thread zengzhaoxiu
From: Zhaoxiu Zeng This patch does: 1. Cleanup code 2. Use the copy_from_back to copy the matched bytes from the back output buffer I testd on 5.8.18-300.fc33.x86_64. The performance of the lzo1x_decompress_safe function is improved by about 5%. If no CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS featu

<    1   2