Add config for supporting arch specific include

Arch specific include is located at include/asm. include/asm is generated
during configure time. It first copy every *.h from include/asm-generic, and
then copy every *.h from include/$TARGET_ASM_DIR over them.

Thus, when introducing new arch specific include file foo.h, you only need to
add a generic version in include/asm-generic. Later on, each architecture can
add its own version of foo.h in its respective directory.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Refactor sha256 in preparation for asm optimization

The asm optimization for sha256 we'll be using transforms multiple blocks in a
single function call. Thus, we refactor the existing generic code in
preparation for the upcoming change.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Add a framework to support arch specific sha256

The function pointer sha256_transform decides which arch specific optimization
to use. It defaults to sha256_transform_generic().

To override it, you need to:
1. Override funtion prototype for arch_sha256_init in
   include/asm-xxx/sha256.h
2. Implement arch_sha256_init() to assign sha256_transform properly and put it
   in module/zfs/asm-xxxx/

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Add x86_64 ssse3, avx, avx2 optimized sha256

The sha256-{ssse3,avx,avx2}-asm.S files are copied from linux-3.14.

Currently, we only support optimization in kernel space. User programs will
use generic code.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Add a simple unit test for sha256

Run some simple tests on predefined strings when ZFS_DEBUG is on.

Signed-off-by: Chunwei Chen <tuxoko@gmail.com>