提交 0e16aafb 编写于 作者: S Seth Jennings 提交者: Herbert Xu

powerpc/crypto: add 842 hardware compression driver

This patch adds the driver for interacting with the 842
compression accelerator on IBM Power7+ systems.

The device is a child of the Platform Facilities Option (PFO)
and shows up as a child of the IBM VIO bus.

The compression/decompression API takes the same arguments
as existing compression methods like lzo and deflate.  The 842
hardware operates on 4K hardware pages and the driver breaks up
input on 4K boundaries to submit it to the hardware accelerator.
Signed-off-by: NRobert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: NSeth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 da29aa8f
...@@ -3415,6 +3415,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git ...@@ -3415,6 +3415,12 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
S: Maintained S: Maintained
F: arch/ia64/ F: arch/ia64/
IBM Power 842 compression accelerator
M: Robert Jennings <rcj@linux.vnet.ibm.com>
S: Supported
F: drivers/crypto/nx/nx-842.c
F: include/linux/nx842.h
IBM Power Linux RAID adapter IBM Power Linux RAID adapter
M: Brian King <brking@us.ibm.com> M: Brian King <brking@us.ibm.com>
S: Supported S: Supported
......
...@@ -15,3 +15,12 @@ config CRYPTO_DEV_NX_ENCRYPT ...@@ -15,3 +15,12 @@ config CRYPTO_DEV_NX_ENCRYPT
Support for Power7+ in-Nest encryption acceleration. This Support for Power7+ in-Nest encryption acceleration. This
module supports acceleration for AES and SHA2 algorithms. If you module supports acceleration for AES and SHA2 algorithms. If you
choose 'M' here, this module will be called nx_crypto. choose 'M' here, this module will be called nx_crypto.
config CRYPTO_DEV_NX_COMPRESS
tristate "Compression acceleration support"
depends on PPC64 && IBMVIO
default y
help
Support for Power7+ in-Nest compression acceleration. This
module supports acceleration for AES and SHA2 algorithms. If you
choose 'M' here, this module will be called nx_compress.
...@@ -9,3 +9,6 @@ nx-crypto-objs := nx.o \ ...@@ -9,3 +9,6 @@ nx-crypto-objs := nx.o \
nx-aes-xcbc.o \ nx-aes-xcbc.o \
nx-sha256.o \ nx-sha256.o \
nx-sha512.o nx-sha512.o
obj-$(CONFIG_CRYPTO_DEV_NX_COMPRESS) += nx-compress.o
nx-compress-objs := nx-842.o
此差异已折叠。
#ifndef __NX842_H__
#define __NX842_H__
int nx842_get_workmem_size(void);
int nx842_get_workmem_size_aligned(void);
int nx842_compress(const unsigned char *in, unsigned int in_len,
unsigned char *out, unsigned int *out_len, void *wrkmem);
int nx842_decompress(const unsigned char *in, unsigned int in_len,
unsigned char *out, unsigned int *out_len, void *wrkmem);
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册