linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] crypto: crct10dif assembly cleanup and optimizations
@ 2019-01-31  4:42 Eric Biggers
  2019-01-31  4:42 ` [PATCH v4 1/3] crypto: x86/crct10dif-pcl - " Eric Biggers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eric Biggers @ 2019-01-31  4:42 UTC (permalink / raw)
  To: linux-crypto, Herbert Xu; +Cc: Ard Biesheuvel, Tim Chen, linux-arm-kernel

The x86, arm, and arm64 asm implementations of crct10dif are very
difficult to understand partly because many of the comments, labels, and
macros are named incorrectly: the lengths mentioned are usually off by a
factor of two from the actual code.  Many other things are unnecessarily
convoluted as well, e.g. there are many more fold constants than
actually needed and some aren't fully reduced.

This series therefore cleans up all these implementations to be much
more maintainable.  I also made some small optimizations where I saw
opportunities, resulting in slightly better performance.

This is based on top of the pending patches from Ard Biesheuvel.

These all pass the new extra self-tests.

Changed since v3:
- Added '.arch armv7-a' to arm32 assembly file to fix a build error.
- Removed support for len < 16 from the x86 assembly.

Changed since v2:
- Removed the unnecessary '__LINUX_ARM_ARCH__ < 7' case.
- Added Ard's Acked-by.

Changed since v1:
- Moved constants in arm implementation to .rodata.
- Eliminated a few instructions from the x86 implementation.
- Tweaked a few comments.

Eric Biggers (3):
  crypto: x86/crct10dif-pcl - cleanup and optimizations
  crypto: arm/crct10dif-ce - cleanup and optimizations
  crypto: arm64/crct10dif-ce - cleanup and optimizations

 arch/arm/crypto/crct10dif-ce-core.S     | 553 ++++++++---------
 arch/arm/crypto/crct10dif-ce-glue.c     |   2 +-
 arch/arm64/crypto/crct10dif-ce-core.S   | 496 +++++++--------
 arch/arm64/crypto/crct10dif-ce-glue.c   |   4 +-
 arch/x86/crypto/crct10dif-pcl-asm_64.S  | 782 +++++++-----------------
 arch/x86/crypto/crct10dif-pclmul_glue.c |  12 +-
 6 files changed, 729 insertions(+), 1120 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-08  7:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31  4:42 [PATCH v4 0/3] crypto: crct10dif assembly cleanup and optimizations Eric Biggers
2019-01-31  4:42 ` [PATCH v4 1/3] crypto: x86/crct10dif-pcl - " Eric Biggers
2019-01-31  4:42 ` [PATCH v4 2/3] crypto: arm/crct10dif-ce " Eric Biggers
2019-01-31  4:42 ` [PATCH v4 3/3] crypto: arm64/crct10dif-ce " Eric Biggers
2019-02-08  7:46 ` [PATCH v4 0/3] crypto: crct10dif assembly " Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).