crypto: vmx - Enabling VMX module for PPC64
authorLeonidas S. Barbosa <leosilva@linux.vnet.ibm.com>
Fri, 6 Feb 2015 16:59:48 +0000 (14:59 -0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 28 Feb 2015 10:13:46 +0000 (23:13 +1300)
This patch enables VMX module in PPC64.

Signed-off-by: Leonidas S. Barbosa <leosilva@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/Kconfig
drivers/crypto/Makefile
drivers/crypto/vmx/Kconfig [new file with mode: 0644]
drivers/crypto/vmx/Makefile [new file with mode: 0644]

index 7e94413da6e36a6bf2b15844002f6054aa59778c..9dd34bc3f541f86b041526319b0c0131399166d9 100644 (file)
@@ -436,4 +436,13 @@ config CRYPTO_DEV_QCE
          hardware. To compile this driver as a module, choose M here. The
          module will be called qcrypto.
 
+config CRYPTO_DEV_VMX
+       bool "Support for VMX cryptographic acceleration instructions"
+       depends on PPC64
+       default n
+       help
+         Support for VMX cryptographic acceleration instructions.
+
+source "drivers/crypto/vmx/Kconfig"
+
 endif # CRYPTO_HW
index 3924f93d5774283a828be3c3de171f5411affa31..20a71273369a13a874a81c0b85400ea2f9f4374b 100644 (file)
@@ -25,3 +25,4 @@ obj-$(CONFIG_CRYPTO_DEV_TALITOS) += talitos.o
 obj-$(CONFIG_CRYPTO_DEV_UX500) += ux500/
 obj-$(CONFIG_CRYPTO_DEV_QAT) += qat/
 obj-$(CONFIG_CRYPTO_DEV_QCE) += qce/
+obj-$(CONFIG_CRYPTO_DEV_VMX) += vmx/
diff --git a/drivers/crypto/vmx/Kconfig b/drivers/crypto/vmx/Kconfig
new file mode 100644 (file)
index 0000000..771babf
--- /dev/null
@@ -0,0 +1,8 @@
+config CRYPTO_DEV_VMX_ENCRYPT
+       tristate "Encryption acceleration support on P8 CPU"
+       depends on PPC64 && CRYPTO_DEV_VMX
+       default y
+       help
+         Support for VMX cryptographic acceleration instructions on Power8 CPU.
+         This module supports acceleration for AES and GHASH in hardware. If you
+         choose 'M' here, this module will be called vmx-crypto.
diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile
new file mode 100644 (file)
index 0000000..c699c6e
--- /dev/null
@@ -0,0 +1,19 @@
+obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o
+vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o ghash.o
+
+ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
+TARGET := linux-ppc64le
+else
+TARGET := linux-pcc64
+endif
+
+quiet_cmd_perl = PERL $@
+      cmd_perl = $(PERL) $(<) $(TARGET) > $(@)
+
+$(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl
+       $(call cmd,perl)
+  
+$(src)/ghashp8-ppc.S: $(src)/ghashp8-ppc.pl
+       $(call cmd,perl)
+
+.PRECIOUS: $(obj)/aesp8-ppc.S $(obj)/ghashp8-ppc.S
This page took 0.031892 seconds and 5 git commands to generate.