crypto: powerpc - Add POWER8 optimised crc32c
authorAnton Blanchard <anton@samba.org>
Thu, 30 Jun 2016 22:19:45 +0000 (08:19 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 5 Jul 2016 15:05:19 +0000 (23:05 +0800)
commit6dd7a82cc54ebd2936763befd3dcd4beb727a704
tree4077ad30a801a6e7dcc0b915612e2c815239fd9b
parent151f25112ff7befc134ed3fc58b0ff8792b3169e
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 <anton@samba.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/powerpc/crypto/Makefile
arch/powerpc/crypto/crc32c-vpmsum_asm.S [new file with mode: 0644]
arch/powerpc/crypto/crc32c-vpmsum_glue.c [new file with mode: 0644]
arch/powerpc/include/asm/ppc-opcode.h
crypto/Kconfig