Re: [PATCH] treewide: remove duplicate includes

2017-12-04 Thread Darrick J. Wong
On Mon, Dec 04, 2017 at 03:19:39AM +0530, Pravin Shedge wrote: > These duplicate includes have been found with scripts/checkincludes.pl but > they have been removed manually to avoid removing false positives. > > Unit Testing: > > - build successful > - LTP testsuite passes. > - checkpatch.pl

Re: crypto: Work around deallocated stack frame reference gcc bug on sparc.

2017-06-02 Thread Darrick J. Wong
[add ext4 list to cc] On Fri, Jun 02, 2017 at 11:28:54AM -0400, David Miller wrote: > > On sparc, if we have an alloca() like situation, as is the case with > SHASH_DESC_ON_STACK(), we can end up referencing deallocated stack > memory. The result can be that the value is clobbered if a trap >

[PATCH 01/13] crc32: removed two instances of trailing whitespaces

2012-01-18 Thread Darrick J. Wong
- remove trailing whitespace from lib/crc32.c - remove trailing whitespace from lib/crc32defs.h From: Bob Pearson rpear...@systemfabricworks.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com

[PATCH 03/13] crc32: Simplify unit test code

2012-01-18 Thread Darrick J. Wong
-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig | 10 + lib/crc32.c | 798 ++- 2 files changed, 691 insertions(+), 117 deletions

[PATCH 04/13] crc32: Miscellaneous cleanups

2012-01-18 Thread Darrick J. Wong
[djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 104 +- lib/gen_crc32table.c |6 +-- 2 files changed, 39 insertions(+), 71 deletions(-) diff --git a/lib/crc32.c b/lib

[PATCH 06/13] crc32: Make CRC_*_BITS definition correspond to actual bit counts

2012-01-18 Thread Darrick J. Wong
-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 17 ++--- lib/crc32defs.h | 18 ++ lib/gen_crc32table.c | 11 ++- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 7394288..5971f2a

[PATCH 07/13] crc32: Add slice-by-8 algorithm to existing code

2012-01-18 Thread Darrick J. Wong
-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 38 +++--- lib/crc32defs.h | 29 + lib/gen_crc32table.c | 43

[PATCH 09/13] crc32: Add note about this patchset to crc32.c

2012-01-18 Thread Darrick J. Wong
Some final changes - added a comment at the top of crc32.c From: Bob Pearson rpear...@systemfabricworks.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c |4

[PATCH v5.4 00/13] crc32c: Add faster algorithm and self-test code

2012-01-18 Thread Darrick J. Wong
Hi all, This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. It removes the crc32c implementation in crypto/ in favor of using the stamped-out one in lib/. There is also a change to Kconfig so that the kernel builder can pick an

[PATCH 05/13] crc32: Fix mixing of endian-specific types

2012-01-18 Thread Darrick J. Wong
...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index bf03922..7394288 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -28,13 +28,13

[PATCH 13/13] crc32: Select an algorithm via kconfig

2012-01-18 Thread Darrick J. Wong
Allow the kernel builder to choose a crc32* algorithm for the kernel. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig | 43 +++ lib/crc32defs.h | 18 ++ 2 files changed, 61 insertions(+), 0 deletions(-) diff --git

[PATCH 11/13] crypto: crc32c should use library implementation

2012-01-18 Thread Darrick J. Wong
Since lib/crc32.c now provides crc32c, remove the software implementation here and call the library function instead. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/Kconfig |1 + crypto/crc32c.c | 94 ++- 2 files changed, 4

[PATCH 12/13] crc32: Add self-test code for crc32c

2012-01-18 Thread Darrick J. Wong
Add self-test code for crc32c. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 363 ++- 1 files changed, 261 insertions(+), 102 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 22e3643..ebc5911 100644

[PATCH 10/13] crc32: Bolt on crc32c

2012-01-18 Thread Darrick J. Wong
Reuse the existing crc32 code to stamp out a crc32c implementation. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- include/linux/crc32.h |2 ++ lib/Kconfig |8 +++--- lib/crc32.c | 62 +++-- lib/crc32defs.h

[PATCH 02/13] crc32: Move long comment about crc32 fundamentals to Documentation/

2012-01-18 Thread Darrick J. Wong
...@horizon.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- Documentation/00-INDEX |2 + Documentation/crc32.txt | 183 +++ lib/crc32.c

[PATCH v5.3 00/14] crc32c: Add faster algorithm and self-test code

2012-01-06 Thread Darrick J. Wong
Hi all, This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. It removes the crc32c implementation in crypto/ in favor of using the stamped-out one in lib/. There is also a change to Kconfig so that the kernel builder can pick an

[PATCH 02/14] crc32: Move long comment about crc32 fundamentals to Documentation/

2012-01-06 Thread Darrick J. Wong
...@horizon.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- Documentation/00-INDEX |2 + Documentation/crc32.txt | 183 +++ lib/crc32.c

[PATCH 10/14] crc32: Add note about this patchset to crc32.c

2012-01-06 Thread Darrick J. Wong
Some final changes - added a comment at the top of crc32.c From: Bob Pearson rpear...@systemfabricworks.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c |4

[PATCH 09/14] crc32: Optimize loop counter for x86

2012-01-06 Thread Darrick J. Wong
get worse. From: Bob Pearson rpear...@systemfabricworks.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 13 + 1 files changed, 13 insertions(+), 0 deletions

[PATCH 14/14] crc32: Select an algorithm via kconfig

2012-01-06 Thread Darrick J. Wong
Allow the kernel builder to choose a crc32* algorithm for the kernel. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig | 43 +++ lib/crc32defs.h | 18 ++ 2 files changed, 61 insertions(+), 0 deletions(-) diff --git

[PATCH 13/14] crc32: Add self-test code for crc32c

2012-01-06 Thread Darrick J. Wong
Add self-test code for crc32c. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 363 ++- 1 files changed, 261 insertions(+), 102 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 8df9561..382fa76 100644

[PATCH 07/14] crc32: Make CRC_*_BITS definition correspond to actual bit counts

2012-01-06 Thread Darrick J. Wong
-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 17 ++--- lib/crc32defs.h | 18 ++ lib/gen_crc32table.c | 11 ++- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index ff6bb9a..157b35f

[PATCH 03/14] crc32: Simplify unit test code

2012-01-06 Thread Darrick J. Wong
-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig | 10 + lib/crc32.c | 798 ++- 2 files changed, 691 insertions(+), 117 deletions

[PATCH 04/14] crc32: Speed up memory table access on powerpc

2012-01-06 Thread Darrick J. Wong
-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 7a0e5a9..c93c9ae 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -53,20 +53,21 @@ static inline u32 crc32_body(u32 crc

[PATCH 05/14] crc32: Miscellaneous cleanups

2012-01-06 Thread Darrick J. Wong
[djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 104 +- lib/gen_crc32table.c |6 +-- 2 files changed, 39 insertions(+), 71 deletions(-) diff --git a/lib/crc32.c b/lib

[PATCH 06/14] crc32: Fix mixing of endian-specific types

2012-01-06 Thread Darrick J. Wong
...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 2a87ea2..ff6bb9a 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -28,13 +28,13

[PATCH 01/14] crc32: removed two instances of trailing whitespaces

2012-01-06 Thread Darrick J. Wong
- remove trailing whitespace from lib/crc32.c - remove trailing whitespace from lib/crc32defs.h From: Bob Pearson rpear...@systemfabricworks.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: changelog tweaks] Signed-off-by: Darrick J. Wong djw

[PATCH 11/14] crc32: Bolt on crc32c

2012-01-06 Thread Darrick J. Wong
Reuse the existing crc32 code to stamp out a crc32c implementation. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- include/linux/crc32.h |2 ++ lib/Kconfig |8 +++--- lib/crc32.c | 62 +++-- lib/crc32defs.h

[PATCH 12/14] crypto: crc32c should use library implementation

2012-01-06 Thread Darrick J. Wong
Since lib/crc32.c now provides crc32c, remove the software implementation here and call the library function instead. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/Kconfig |1 + crypto/crc32c.c | 94 ++- 2 files changed, 4

[PATCH 08/14] crc32: Add slice-by-8 algorithm to existing code

2012-01-06 Thread Darrick J. Wong
-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 40 lib/crc32defs.h | 29 + lib/gen_crc32table.c | 43

Re: [PATCH 14/14] crc32: Select an algorithm via kconfig

2011-12-13 Thread Darrick J. Wong
On Tue, Dec 13, 2011 at 09:27:10AM +0100, Joakim Tjernlund wrote: Darrick J. Wong djw...@us.ibm.com wrote on 2011/12/13 07:32:28: On Mon, Dec 12, 2011 at 05:10:45PM -0600, Bob Pearson wrote: That choice was for Joakim who measured better performance on his 32 bit PPC platform

Re: [PATCH 14/14] crc32: Select an algorithm via kconfig

2011-12-12 Thread Darrick J. Wong
On Fri, Dec 02, 2011 at 06:36:46PM -0800, Darrick J. Wong wrote: On Fri, Dec 02, 2011 at 08:25:05AM +0800, Herbert Xu wrote: On Thu, Dec 01, 2011 at 12:15:17PM -0800, Darrick J. Wong wrote: Allow the kernel builder to choose a crc32* algorithm for the kernel. Signed-off-by: Darrick J

Re: [PATCH v5.2 00/14] crc32c: Add faster algorithm and self-test code

2011-12-02 Thread Darrick J. Wong
On Fri, Dec 02, 2011 at 08:23:58AM +0800, Herbert Xu wrote: On Thu, Dec 01, 2011 at 12:31:22PM -0800, Darrick J. Wong wrote: . They seem to call crc32c(), which is in crypto/crc32c. If you're interested in Nope, the crypto API layer will use the SSE implementation where available

Re: [PATCH 14/14] crc32: Select an algorithm via kconfig

2011-12-02 Thread Darrick J. Wong
On Fri, Dec 02, 2011 at 08:25:05AM +0800, Herbert Xu wrote: On Thu, Dec 01, 2011 at 12:15:17PM -0800, Darrick J. Wong wrote: Allow the kernel builder to choose a crc32* algorithm for the kernel. Signed-off-by: Darrick J. Wong djw...@us.ibm.com I don't like this at all. How do you

Re: [PATCH v5.1 00/14] crc32c: Add faster algorithm and self-test code

2011-12-01 Thread Darrick J. Wong
On Wed, Nov 30, 2011 at 02:29:11PM -0800, Andrew Morton wrote: On Mon, 28 Nov 2011 14:36:59 -0800 Darrick J. Wong djw...@us.ibm.com wrote: This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. I think the attributions here are all

[PATCH 07/14] crc32: Make CRC_*_BITS definition correspond to actual bit counts

2011-12-01 Thread Darrick J. Wong
-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 17 ++--- lib/crc32defs.h | 18 ++ lib/gen_crc32table.c | 11 ++- 3 files changed, 34 insertions(+), 12 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index ff6bb9a..157b35f

[PATCH 10/14] crc32: Add note about this patchset to crc32.c

2011-12-01 Thread Darrick J. Wong
Some final changes - added a comment at the top of crc32.c From: Bob Pearson rpear...@systemfabricworks.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c |4

[PATCH 13/14] crc32: Add self-test code for crc32c

2011-12-01 Thread Darrick J. Wong
Add self-test code for crc32c. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 363 ++- 1 files changed, 261 insertions(+), 102 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 8df9561..382fa76 100644

[PATCH 14/14] crc32: Select an algorithm via kconfig

2011-12-01 Thread Darrick J. Wong
Allow the kernel builder to choose a crc32* algorithm for the kernel. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig | 36 lib/crc32defs.h | 18 ++ 2 files changed, 54 insertions(+), 0 deletions(-) diff --git a/lib

[PATCH 11/14] crc32: Bolt on crc32c

2011-12-01 Thread Darrick J. Wong
Reuse the existing crc32 code to stamp out a crc32c implementation. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- include/linux/crc32.h |2 ++ lib/Kconfig |8 +++--- lib/crc32.c | 62 +++-- lib/crc32defs.h

[PATCH 02/14] crc32: Move long comment about crc32 fundamentals to Documentation/

2011-12-01 Thread Darrick J. Wong
...@horizon.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- Documentation/00-INDEX |2 + Documentation/crc32.txt | 183 +++ lib/crc32.c

[PATCH 04/14] crc32: Speed up memory table access on powerpc

2011-12-01 Thread Darrick J. Wong
-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 7a0e5a9..c93c9ae 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -53,20 +53,21 @@ static inline u32 crc32_body(u32 crc

[PATCH v5.2 00/14] crc32c: Add faster algorithm and self-test code

2011-12-01 Thread Darrick J. Wong
Hi all, This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. It removes the crc32c implementation in crypto/ in favor of using the stamped-out one in lib/. There is also a change to Kconfig so that the kernel builder can pick an

[PATCH 08/14] crc32: Add slice-by-8 algorithm to existing code

2011-12-01 Thread Darrick J. Wong
-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 40 lib/crc32defs.h | 29 + lib/gen_crc32table.c | 43

[PATCH 06/14] crc32: Fix mixing of endian-specific types

2011-12-01 Thread Darrick J. Wong
...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 2a87ea2..ff6bb9a 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -28,13 +28,13

[PATCH 05/14] crc32: Miscellaneous cleanups

2011-12-01 Thread Darrick J. Wong
[djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 104 +- lib/gen_crc32table.c |6 +-- 2 files changed, 39 insertions(+), 71 deletions(-) diff --git a/lib/crc32.c b/lib

[PATCH 03/14] crc32: Simplify unit test code

2011-12-01 Thread Darrick J. Wong
-by: Bob Pearson rpear...@systemfabricworks.com [djw...@us.ibm.com: Minor changelog tweaks] Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig | 10 + lib/crc32.c | 798 ++- 2 files changed, 691 insertions(+), 117 deletions

Re: [PATCH v5.2 00/14] crc32c: Add faster algorithm and self-test code

2011-12-01 Thread Darrick J. Wong
On Thu, Dec 01, 2011 at 12:20:53PM -0800, Joel Becker wrote: On Thu, Dec 01, 2011 at 12:13:41PM -0800, Darrick J. Wong wrote: Hi all, This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. It removes the crc32c implementation

[PATCH 02/14] Moved a long comment from lib/crc32.c to Documentation/crc32.txt

2011-11-28 Thread Darrick J. Wong
where it will more likely get read. - Edited the resulting document to add an explanation of the slicing-by-n algorithm. Signed-off-by: George Spelvin li...@horizon.com Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- Documentation/00-INDEX |2 +

[PATCH 05/14] Misc cleanup of lib/crc32.c and related files

2011-11-28 Thread Darrick J. Wong
- removed unnecessary header files. - straightened out some convoluted ifdef's - rewrote some references to 2 dimensional arrays as 1 dimensional arrays to make them correct. I.e. replaced tab[i] with tab[0][i]. - a few trivial whitespace changes -

[PATCH 03/14] Replaced the unit test provided in crc32.c, which doesn't have a

2011-11-28 Thread Darrick J. Wong
makefile and doesn't compile with current headers, with a simpler self test routine that also gives a measure of performance and runs at module init time. The self test option can be enabled through a configuration option CONFIG_CRC32_SELFTEST. The test stresses the pre and post loops and is thus

[PATCH 10/14] Some final changes

2011-11-28 Thread Darrick J. Wong
- added a comment at the top of crc32.c Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 2c8e8c0..d56516d 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@

[PATCH 13/14] crc32: Add self-test code for crc32c

2011-11-28 Thread Darrick J. Wong
Add self-test code for crc32c. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 363 ++- 1 files changed, 261 insertions(+), 102 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 8df9561..382fa76 100644

[PATCH 06/14] crc32.c in its original version freely mixed u32, __le32 and __be32 types

2011-11-28 Thread Darrick J. Wong
which caused warnings from sparse with __CHECK_ENDIAN__. This patch fixes these by forcing the types to u32. Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c

[PATCH 12/14] crypto: crc32c should use library implementation

2011-11-28 Thread Darrick J. Wong
Since lib/crc32.c now provides crc32c, remove the software implementation here and call the library function instead. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/Kconfig |1 + crypto/crc32c.c | 94 ++- 2 files changed, 4

[PATCH 11/14] crc32: Bolt on crc32c

2011-11-28 Thread Darrick J. Wong
Reuse the existing crc32 code to stamp out a crc32c implementation. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- include/linux/crc32.h |2 ++ lib/Kconfig |8 +++--- lib/crc32.c | 62 +++-- lib/crc32defs.h

[PATCH 08/14] add slicing-by-8 algorithm to the existing

2011-11-28 Thread Darrick J. Wong
slicing-by-4 algorithm. This consists of: - extend largest BITS size from 32 to 64 - extend tables from tab[4][256] to up to tab[8][256] - Add code for inner loop. Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c | 40

[PATCH 09/14] Add two changes that improve the performance of x86 systems

2011-11-28 Thread Darrick J. Wong
1. replace main loop with incrementing counter this change improves the performance of the selftest by about 5-6% on Nehalem CPUs. The apparent reason is that the compiler can use the loop index to perform an indexed memory access. This is

[PATCH v5.1 00/14] crc32c: Add faster algorithm and self-test code

2011-11-28 Thread Darrick J. Wong
Hi all, This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. It removes the crc32c implementation in crypto/ in favor of using the stamped-out one in lib/. There is also a change to Kconfig so that the kernel builder can pick an

[PATCH 01/14] removed two instances of trailing whitespaces

2011-11-28 Thread Darrick J. Wong
- remove trailing whitespace from lib/crc32.c - remove trailing whitespace from lib/crc32defs.h Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c |2 +- lib/crc32defs.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 07/14] crc32.c provides a choice of one of several algorithms for

2011-11-28 Thread Darrick J. Wong
computing the LSB and LSB versions of the CRC32 checksum based on the parameters CRC_LE_BITS and CRC_BE_BITS. In the original version the values 1, 2, 4 and 8 respectively selected versions of the alrogithm that computed the crc 1, 2, 4 and 32 bits as a time. This patch series adds a new version

[PATCH 04/14] Replace 2D array references by pointer references in loops.

2011-11-28 Thread Darrick J. Wong
This change has no effect on X86 code but improves PPC performance. Signed-off-by: Bob Pearson rpear...@systemfabricworks.com --- lib/crc32.c | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 7a0e5a9..c93c9ae 100644

Re: [PATCH 1/4] crc32: Bolt on crc32c

2011-11-15 Thread Darrick J. Wong
On Fri, Oct 21, 2011 at 09:15:14PM +0200, Herbert Xu wrote: On Fri, Oct 21, 2011 at 09:57:03AM -0700, Darrick J. Wong wrote: My patchset builds upon Bob Pearson's crc32 patchset from early September. Do my patches fail to apply after applying his patchset? Or, to speed things

Re: [PATCH 1/4] crc32: Bolt on crc32c

2011-10-26 Thread Darrick J. Wong
On Fri, Oct 21, 2011 at 09:15:14PM +0200, Herbert Xu wrote: On Fri, Oct 21, 2011 at 09:57:03AM -0700, Darrick J. Wong wrote: My patchset builds upon Bob Pearson's crc32 patchset from early September. Do my patches fail to apply after applying his patchset? Or, to speed things

Re: [PATCH 1/4] crc32: Bolt on crc32c

2011-10-21 Thread Darrick J. Wong
On Fri, Oct 21, 2011 at 02:28:03PM +0200, Herbert Xu wrote: On Tue, Oct 04, 2011 at 04:54:03PM -0700, Darrick J. Wong wrote: Reuse the existing crc32 code to stamp out a crc32c implementation. Signed-off-by: Darrick J. Wong djw...@us.ibm.com Did you want this to go through my tree

[PATCH v5.1 4/4] crc32: Select an algorithm via kconfig

2011-10-08 Thread Darrick J. Wong
Oops, the description of CRC32_SLICEBY4 is a bit screwy. Let's try that again. --- Allow the kernel builder to choose a crc32* algorithm for the kernel. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig | 36 lib/crc32defs.h | 18

Re: [PATCH v5 0/4] crc32c: Add faster algorithm and self-test code

2011-10-06 Thread Darrick J. Wong
On Tue, Oct 04, 2011 at 04:53:57PM -0700, Darrick J. Wong wrote: Hi all, This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. It requires that all ten of his patches (at least the ones dated 31 Aug 2011) be applied. It removes the crc32c

[PATCH v5 0/4] crc32c: Add faster algorithm and self-test code

2011-10-04 Thread Darrick J. Wong
Hi all, This patchset (re)uses Bob Pearson's crc32 slice-by-8 code to stamp out a software crc32c implementation. It requires that all ten of his patches (at least the ones dated 31 Aug 2011) be applied. It removes the crc32c implementation in crypto/ in favor of using the stamped-out one in

[PATCH 1/4] crc32: Bolt on crc32c

2011-10-04 Thread Darrick J. Wong
Reuse the existing crc32 code to stamp out a crc32c implementation. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- include/linux/crc32.h |2 ++ lib/Kconfig |8 +++--- lib/crc32.c | 62 +++-- lib/crc32defs.h

[PATCH 2/4] crypto: crc32c should use library implementation

2011-10-04 Thread Darrick J. Wong
Since lib/crc32.c now provides crc32c, remove the software implementation here and call the library function instead. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/Kconfig |1 + crypto/crc32c.c | 94 ++- 2 files changed, 4

[PATCH 3/4] crc32: Add self-test code for crc32c

2011-10-04 Thread Darrick J. Wong
Add self-test code for crc32c. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/crc32.c | 363 ++- 1 files changed, 261 insertions(+), 102 deletions(-) diff --git a/lib/crc32.c b/lib/crc32.c index 8df9561..382fa76 100644

[PATCH 4/4] crc32: Select an algorithm via kconfig

2011-10-04 Thread Darrick J. Wong
Allow the kernel builder to choose a crc32* algorithm for the kernel. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig | 35 +++ lib/crc32defs.h | 18 ++ 2 files changed, 53 insertions(+), 0 deletions(-) diff --git a/lib

Re: [PATCH v4] crc32c: Implement CRC32c with slicing-by-8 algorithm

2011-10-04 Thread Darrick J. Wong
On Tue, Oct 04, 2011 at 07:59:53AM +0100, Herbert Xu wrote: On Mon, Oct 03, 2011 at 05:55:10PM -0700, Darrick J. Wong wrote: So what I think I'm hearing is... 1. Apply Bob's slice-by-8 algorithm patch to regular crc32. 2. Adapt crc32's build code to generate crc32c as well. 3. Remove

Re: [PATCH v3] crc32c: Implement CRC32c with slicing-by-8 algorithm

2011-10-03 Thread Darrick J. Wong
On Sat, Oct 01, 2011 at 03:52:00PM +0200, Joakim Tjernlund wrote: Darrick J. Wong djw...@us.ibm.com wrote on 2011/09/30 18:12:23: [putting mailing lists on cc] On Fri, Sep 30, 2011 at 08:01:36AM +0200, Joakim Tjernlund wrote: (Just happen to see this patch in the archives

Re: [PATCH v4] crc32c: Implement CRC32c with slicing-by-8 algorithm

2011-10-03 Thread Darrick J. Wong
On Sat, Oct 01, 2011 at 04:02:10PM +0200, Joakim Tjernlund wrote: Darrick J. Wong djw...@us.ibm.com wrote on 2011/09/30 21:29:56: The existing CRC32c implementation uses Sarwate's algorithm to calculate the code one byte at a time. Using a slicing-by-8 algorithm adapted from Bob

Re: [PATCH v4] crc32c: Implement CRC32c with slicing-by-8 algorithm

2011-10-03 Thread Darrick J. Wong
On Mon, Oct 03, 2011 at 09:35:13PM +0100, Herbert Xu wrote: On Mon, Oct 03, 2011 at 10:27:03PM +0200, Joakim Tjernlund wrote: Start from Bobs latest patches and add crc32c to lib/crc32.c If I did that, how should I handle patching in the hardware accelerated version on Intel

Re: [PATCH v3] crc32c: Implement CRC32c with slicing-by-8 algorithm

2011-09-30 Thread Darrick J. Wong
[putting mailing lists on cc] On Fri, Sep 30, 2011 at 08:01:36AM +0200, Joakim Tjernlund wrote: (Just happen to see this patch in the archives) - This is basically an copy of Bobs crc32 work and duplicates code, this code needs to move into /lib/crc32.c and use the existing framework.

Re: [PATCH 2/3] libcrc32c: Expose big-endian version of crc32c

2011-09-28 Thread Darrick J. Wong
On Wed, Sep 28, 2011 at 01:53:59PM +1000, Herbert Xu wrote: On Tue, Sep 27, 2011 at 03:12:53PM -0700, Darrick J. Wong wrote: Provide a big-endian version of crc32c for modules that want it. Who is going to use this? Well, I was using it for jbd2 ... but since you ask, it seems to work just

Re: [PATCH 2/3] libcrc32c: Expose big-endian version of crc32c

2011-09-28 Thread Darrick J. Wong
On Wed, Sep 28, 2011 at 09:51:45AM -0700, Darrick J. Wong wrote: On Wed, Sep 28, 2011 at 01:53:59PM +1000, Herbert Xu wrote: On Tue, Sep 27, 2011 at 03:12:53PM -0700, Darrick J. Wong wrote: Provide a big-endian version of crc32c for modules that want it. Who is going to use

[PATCH v3] crc32c: Implement CRC32c with slicing-by-8 algorithm

2011-09-28 Thread Darrick J. Wong
no users. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/Makefile | 11 ++ crypto/crc32c.c | 305 ++ crypto/crc32c_defs.h | 26 crypto/gen_crc32ctable.c | 79 4 files changed, 340 insertions

[PATCH 1/3] crc32c: Implement CRC32c with slicing-by-8 algorithm

2011-09-27 Thread Darrick J. Wong
The existing CRC32c implementation uses Sarwate's algorithm to calculate the code one byte at a time. Using slicing-by-8, we can process buffers 8 bytes at a time, for a substantial increase in performance. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/Makefile | 11

[PATCH 3/3] crc32c: Implement a self-test for CRC32c

2011-09-27 Thread Darrick J. Wong
This is a self-test for the CRC32c code. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/tcrypt.c |6 ++ crypto/testmgr.c | 36 +-- crypto/testmgr.h | 177 +- 3 files changed, 211 insertions(+), 8 deletions(-) diff

[PATCH 2/3] libcrc32c: Expose big-endian version of crc32c

2011-09-27 Thread Darrick J. Wong
Provide a big-endian version of crc32c for modules that want it. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- include/linux/crc32c.h |5 +++-- lib/libcrc32c.c| 43 ++- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git

Re: [PATCH v2 0/3] crc32c: Add faster algorithm and self-test code

2011-09-27 Thread Darrick J. Wong
On Tue, Sep 27, 2011 at 03:12:39PM -0700, Darrick J. Wong wrote: Hi all, This patchset replaces the current crc32c software implementation, which uses a slow per-byte lookup table algorithm, with a faster implementation that uses an adaptation of the slice-by-8 algorithm that Bob Pearson

[PATCH 2/3] libcrc32c: Expose big-endian version of crc32c

2011-08-31 Thread Darrick J. Wong
Provide a big-endian version of crc32c for modules that want it. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- include/linux/crc32c.h |5 +++-- lib/libcrc32c.c| 43 ++- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git

[PATCH 1/3] crc32c: Implement CRC32c with slicing-by-8 algorithm

2011-08-31 Thread Darrick J. Wong
The existing CRC32c implementation uses Sarwate's algorithm to calculate the code one byte at a time. Using slicing-by-8, we can process buffers 8 bytes at a time, for a substantial increase in performance. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- crypto/Makefile | 11

[PATCH 3/3] crc32c: Implement a self-test for CRC32c

2011-08-31 Thread Darrick J. Wong
This is a loadable module that will self-test the CRC32c code. Signed-off-by: Darrick J. Wong djw...@us.ibm.com --- lib/Kconfig |7 + lib/Makefile |1 lib/libcrc32c_test.c | 694 ++ 3 files changed, 702 insertions(+), 0