diff mbox series

[14/16] crypto/nx: Register and unregister VAS interface

Message ID 3b7f3ec660db031e84306e8d9c4917bc737a58d3.camel@linux.ibm.com (mailing list archive)
State Superseded
Headers show
Series Enable VAS and NX-GZIP support on powerVM | expand
Related show

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (d02429becbe77bc4d27a7357afaf28f9294945bb)
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 27 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Haren Myneni April 11, 2021, 12:43 a.m. UTC
Changes to create /dev/crypto/nx-gzip interface with VAS register
and to remove this interface with VAS unregister.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
---
 drivers/crypto/nx/nx-common-pseries.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

kernel test robot April 11, 2021, 7:48 a.m. UTC | #1
Hi Haren,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on cryptodev/master crypto/master v5.12-rc6 next-20210409]
[cannot apply to scottwood/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Haren-Myneni/Enable-VAS-and-NX-GZIP-support-on-powerVM/20210411-084631
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/8650d30be9c22ee8fdc59063b993bfbafe88a328
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Haren-Myneni/Enable-VAS-and-NX-GZIP-support-on-powerVM/20210411-084631
        git checkout 8650d30be9c22ee8fdc59063b993bfbafe88a328
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: ".vas_unregister_api_pseries" [drivers/crypto/nx/nx-compress-pseries.ko] undefined!
>> ERROR: modpost: ".vas_register_api_pseries" [drivers/crypto/nx/nx-compress-pseries.ko] undefined!

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c
index cc8dd3072b8b..9a40fca8a9e6 100644
--- a/drivers/crypto/nx/nx-common-pseries.c
+++ b/drivers/crypto/nx/nx-common-pseries.c
@@ -9,6 +9,7 @@ 
  */
 
 #include <asm/vio.h>
+#include <asm/vas.h>
 
 #include "nx-842.h"
 #include "nx_csbcpb.h" /* struct nx_csbcpb */
@@ -1101,6 +1102,12 @@  static int __init nx842_pseries_init(void)
 		return ret;
 	}
 
+	ret = vas_register_api_pseries(THIS_MODULE, VAS_COP_TYPE_GZIP,
+				       "nx-gzip");
+
+	if (ret)
+		pr_err("NX-GZIP is not supported. Returned=%d\n", ret);
+
 	return 0;
 }
 
@@ -1111,6 +1118,8 @@  static void __exit nx842_pseries_exit(void)
 	struct nx842_devdata *old_devdata;
 	unsigned long flags;
 
+	vas_unregister_api_pseries();
+
 	crypto_unregister_alg(&nx842_pseries_alg);
 
 	spin_lock_irqsave(&devdata_mutex, flags);