Skip to content

Commit 6dd7a82

Browse files
antonblanchardherbertx
authored andcommitted
crypto: powerpc - Add POWER8 optimised crc32c
Use the vector polynomial multiply-sum instructions in POWER8 to speed up crc32c. This is just over 41x faster than the slice-by-8 method that it replaces. Measurements on a 4.1 GHz POWER8 show it sustaining 52 GiB/sec. A simple btrfs write performance test: dd if=/dev/zero of=/mnt/tmpfile bs=1M count=4096 sync is over 3.7x faster. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 151f251 commit 6dd7a82

File tree

5 files changed

+1745
-0
lines changed

5 files changed

+1745
-0
lines changed

arch/powerpc/crypto/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ obj-$(CONFIG_CRYPTO_MD5_PPC) += md5-ppc.o
99
obj-$(CONFIG_CRYPTO_SHA1_PPC) += sha1-powerpc.o
1010
obj-$(CONFIG_CRYPTO_SHA1_PPC_SPE) += sha1-ppc-spe.o
1111
obj-$(CONFIG_CRYPTO_SHA256_PPC_SPE) += sha256-ppc-spe.o
12+
obj-$(CONFIG_CRYPT_CRC32C_VPMSUM) += crc32c-vpmsum.o
1213

1314
aes-ppc-spe-y := aes-spe-core.o aes-spe-keys.o aes-tab-4k.o aes-spe-modes.o aes-spe-glue.o
1415
md5-ppc-y := md5-asm.o md5-glue.o
1516
sha1-powerpc-y := sha1-powerpc-asm.o sha1.o
1617
sha1-ppc-spe-y := sha1-spe-asm.o sha1-spe-glue.o
1718
sha256-ppc-spe-y := sha256-spe-asm.o sha256-spe-glue.o
19+
crc32c-vpmsum-y := crc32c-vpmsum_asm.o crc32c-vpmsum_glue.o

0 commit comments

Comments
 (0)