Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto/nx: Register and unregister VAS interface on PowerVM

The user space uses /dev/crypto/nx-gzip interface to setup VAS
windows, create paste mapping and close windows. This patch adds
changes to create/remove this interface with VAS register/unregister
functions on PowerVM platform.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/121ea1f4eb3004f3b8f4fe8abefaecc88b292efd.camel@linux.ibm.com

authored by

Haren Myneni and committed by
Michael Ellerman
99cd49bb 8c099490

+9
+1
drivers/crypto/nx/Kconfig
··· 29 29 config CRYPTO_DEV_NX_COMPRESS_PSERIES 30 30 tristate "Compression acceleration support on pSeries platform" 31 31 depends on PPC_PSERIES && IBMVIO 32 + depends on PPC_VAS 32 33 default y 33 34 help 34 35 Support for PowerPC Nest (NX) compression acceleration. This
+8
drivers/crypto/nx/nx-common-pseries.c
··· 1231 1231 return ret; 1232 1232 } 1233 1233 1234 + ret = vas_register_api_pseries(THIS_MODULE, VAS_COP_TYPE_GZIP, 1235 + "nx-gzip"); 1236 + 1237 + if (ret) 1238 + pr_err("NX-GZIP is not supported. Returned=%d\n", ret); 1239 + 1234 1240 return 0; 1235 1241 } 1236 1242 ··· 1246 1240 { 1247 1241 struct nx842_devdata *old_devdata; 1248 1242 unsigned long flags; 1243 + 1244 + vas_unregister_api_pseries(); 1249 1245 1250 1246 crypto_unregister_alg(&nx842_pseries_alg); 1251 1247