All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haren Myneni <haren@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org,
	mpe@ellerman.id.au, herbert@gondor.apana.org.au,
	npiggin@gmail.com
Cc: hbabu@us.ibm.com, haren@us.ibm.com
Subject: [PATCH v6 03/17] powerpc/powernv/vas: Rename register/unregister functions
Date: Thu, 17 Jun 2021 13:30:24 -0700	[thread overview]
Message-ID: <9db00d58dbdcb7cfc07a1df95f3d2a9e3e5d746a.camel@linux.ibm.com> (raw)
In-Reply-To: <827bf56dce09620ebecd8a00a5f97105187a6205.camel@linux.ibm.com>


powerNV and pseries drivers register / unregister to the corresponding
platform specific VAS separately. Then these VAS functions call the
common API with the specific window operations. So rename powerNV VAS
API register/unregister functions.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/include/asm/vas.h              |  3 +++
 arch/powerpc/platforms/book3s/vas-api.c     |  2 --
 arch/powerpc/platforms/powernv/vas-window.c | 18 ++++++++++++++++++
 drivers/crypto/nx/nx-common-powernv.c       |  6 +++---
 4 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/include/asm/vas.h b/arch/powerpc/include/asm/vas.h
index 3be76e813e2d..6076adf9ab4f 100644
--- a/arch/powerpc/include/asm/vas.h
+++ b/arch/powerpc/include/asm/vas.h
@@ -164,6 +164,9 @@ int vas_paste_crb(struct vas_window *win, int offset, bool re);
 
 void vas_win_paste_addr(struct vas_window *window, u64 *addr,
 			int *len);
+int vas_register_api_powernv(struct module *mod, enum vas_cop_type cop_type,
+			     const char *name);
+void vas_unregister_api_powernv(void);
 
 /*
  * Register / unregister coprocessor type to VAS API which will be exported
diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas-api.c
index cfc9d7dd65ab..72c126d87216 100644
--- a/arch/powerpc/platforms/book3s/vas-api.c
+++ b/arch/powerpc/platforms/book3s/vas-api.c
@@ -262,7 +262,6 @@ int vas_register_coproc_api(struct module *mod, enum vas_cop_type cop_type,
 	unregister_chrdev_region(coproc_device.devt, 1);
 	return rc;
 }
-EXPORT_SYMBOL_GPL(vas_register_coproc_api);
 
 void vas_unregister_coproc_api(void)
 {
@@ -275,4 +274,3 @@ void vas_unregister_coproc_api(void)
 	class_destroy(coproc_device.class);
 	unregister_chrdev_region(coproc_device.devt, 1);
 }
-EXPORT_SYMBOL_GPL(vas_unregister_coproc_api);
diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c
index 7ba0840fc3b5..41712b4b268e 100644
--- a/arch/powerpc/platforms/powernv/vas-window.c
+++ b/arch/powerpc/platforms/powernv/vas-window.c
@@ -1442,3 +1442,21 @@ struct vas_window *vas_pswid_to_window(struct vas_instance *vinst,
 
 	return window;
 }
+
+/*
+ * Supporting only nx-gzip coprocessor type now, but this API code
+ * extended to other coprocessor types later.
+ */
+int vas_register_api_powernv(struct module *mod, enum vas_cop_type cop_type,
+			     const char *name)
+{
+
+	return vas_register_coproc_api(mod, cop_type, name);
+}
+EXPORT_SYMBOL_GPL(vas_register_api_powernv);
+
+void vas_unregister_api_powernv(void)
+{
+	vas_unregister_coproc_api();
+}
+EXPORT_SYMBOL_GPL(vas_unregister_api_powernv);
diff --git a/drivers/crypto/nx/nx-common-powernv.c b/drivers/crypto/nx/nx-common-powernv.c
index 446f611726df..3b159f2fae17 100644
--- a/drivers/crypto/nx/nx-common-powernv.c
+++ b/drivers/crypto/nx/nx-common-powernv.c
@@ -1092,8 +1092,8 @@ static __init int nx_compress_powernv_init(void)
 		 * normal FIFO priority is assigned for userspace.
 		 * 842 compression is supported only in kernel.
 		 */
-		ret = vas_register_coproc_api(THIS_MODULE, VAS_COP_TYPE_GZIP,
-						"nx-gzip");
+		ret = vas_register_api_powernv(THIS_MODULE, VAS_COP_TYPE_GZIP,
+					       "nx-gzip");
 
 		/*
 		 * GZIP is not supported in kernel right now.
@@ -1129,7 +1129,7 @@ static void __exit nx_compress_powernv_exit(void)
 	 * use. So delete this API use for GZIP engine.
 	 */
 	if (!nx842_ct)
-		vas_unregister_coproc_api();
+		vas_unregister_api_powernv();
 
 	crypto_unregister_alg(&nx842_powernv_alg);
 
-- 
2.18.2



WARNING: multiple messages have this Message-ID (diff)
From: Haren Myneni <haren@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org,
	mpe@ellerman.id.au, herbert@gondor.apana.org.au,
	npiggin@gmail.com
Subject: [PATCH v6 03/17] powerpc/powernv/vas: Rename register/unregister functions
Date: Thu, 17 Jun 2021 13:30:24 -0700	[thread overview]
Message-ID: <9db00d58dbdcb7cfc07a1df95f3d2a9e3e5d746a.camel@linux.ibm.com> (raw)
In-Reply-To: <827bf56dce09620ebecd8a00a5f97105187a6205.camel@linux.ibm.com>


powerNV and pseries drivers register / unregister to the corresponding
platform specific VAS separately. Then these VAS functions call the
common API with the specific window operations. So rename powerNV VAS
API register/unregister functions.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/include/asm/vas.h              |  3 +++
 arch/powerpc/platforms/book3s/vas-api.c     |  2 --
 arch/powerpc/platforms/powernv/vas-window.c | 18 ++++++++++++++++++
 drivers/crypto/nx/nx-common-powernv.c       |  6 +++---
 4 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/include/asm/vas.h b/arch/powerpc/include/asm/vas.h
index 3be76e813e2d..6076adf9ab4f 100644
--- a/arch/powerpc/include/asm/vas.h
+++ b/arch/powerpc/include/asm/vas.h
@@ -164,6 +164,9 @@ int vas_paste_crb(struct vas_window *win, int offset, bool re);
 
 void vas_win_paste_addr(struct vas_window *window, u64 *addr,
 			int *len);
+int vas_register_api_powernv(struct module *mod, enum vas_cop_type cop_type,
+			     const char *name);
+void vas_unregister_api_powernv(void);
 
 /*
  * Register / unregister coprocessor type to VAS API which will be exported
diff --git a/arch/powerpc/platforms/book3s/vas-api.c b/arch/powerpc/platforms/book3s/vas-api.c
index cfc9d7dd65ab..72c126d87216 100644
--- a/arch/powerpc/platforms/book3s/vas-api.c
+++ b/arch/powerpc/platforms/book3s/vas-api.c
@@ -262,7 +262,6 @@ int vas_register_coproc_api(struct module *mod, enum vas_cop_type cop_type,
 	unregister_chrdev_region(coproc_device.devt, 1);
 	return rc;
 }
-EXPORT_SYMBOL_GPL(vas_register_coproc_api);
 
 void vas_unregister_coproc_api(void)
 {
@@ -275,4 +274,3 @@ void vas_unregister_coproc_api(void)
 	class_destroy(coproc_device.class);
 	unregister_chrdev_region(coproc_device.devt, 1);
 }
-EXPORT_SYMBOL_GPL(vas_unregister_coproc_api);
diff --git a/arch/powerpc/platforms/powernv/vas-window.c b/arch/powerpc/platforms/powernv/vas-window.c
index 7ba0840fc3b5..41712b4b268e 100644
--- a/arch/powerpc/platforms/powernv/vas-window.c
+++ b/arch/powerpc/platforms/powernv/vas-window.c
@@ -1442,3 +1442,21 @@ struct vas_window *vas_pswid_to_window(struct vas_instance *vinst,
 
 	return window;
 }
+
+/*
+ * Supporting only nx-gzip coprocessor type now, but this API code
+ * extended to other coprocessor types later.
+ */
+int vas_register_api_powernv(struct module *mod, enum vas_cop_type cop_type,
+			     const char *name)
+{
+
+	return vas_register_coproc_api(mod, cop_type, name);
+}
+EXPORT_SYMBOL_GPL(vas_register_api_powernv);
+
+void vas_unregister_api_powernv(void)
+{
+	vas_unregister_coproc_api();
+}
+EXPORT_SYMBOL_GPL(vas_unregister_api_powernv);
diff --git a/drivers/crypto/nx/nx-common-powernv.c b/drivers/crypto/nx/nx-common-powernv.c
index 446f611726df..3b159f2fae17 100644
--- a/drivers/crypto/nx/nx-common-powernv.c
+++ b/drivers/crypto/nx/nx-common-powernv.c
@@ -1092,8 +1092,8 @@ static __init int nx_compress_powernv_init(void)
 		 * normal FIFO priority is assigned for userspace.
 		 * 842 compression is supported only in kernel.
 		 */
-		ret = vas_register_coproc_api(THIS_MODULE, VAS_COP_TYPE_GZIP,
-						"nx-gzip");
+		ret = vas_register_api_powernv(THIS_MODULE, VAS_COP_TYPE_GZIP,
+					       "nx-gzip");
 
 		/*
 		 * GZIP is not supported in kernel right now.
@@ -1129,7 +1129,7 @@ static void __exit nx_compress_powernv_exit(void)
 	 * use. So delete this API use for GZIP engine.
 	 */
 	if (!nx842_ct)
-		vas_unregister_coproc_api();
+		vas_unregister_api_powernv();
 
 	crypto_unregister_alg(&nx842_powernv_alg);
 
-- 
2.18.2



  parent reply	other threads:[~2021-06-17 20:30 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 20:24 [PATCH v6 00/17] Enable VAS and NX-GZIP support on PowerVM Haren Myneni
2021-06-17 20:24 ` Haren Myneni
2021-06-17 20:29 ` [PATCH v6 01/17] powerpc/powernv/vas: Release reference to tgid during window close Haren Myneni
2021-06-17 20:29   ` Haren Myneni
2021-06-17 20:29 ` [PATCH v6 02/17] powerpc/vas: Move VAS API to book3s common platform Haren Myneni
2021-06-17 20:29   ` Haren Myneni
2021-06-17 20:30 ` Haren Myneni [this message]
2021-06-17 20:30   ` [PATCH v6 03/17] powerpc/powernv/vas: Rename register/unregister functions Haren Myneni
2021-06-17 20:31 ` [PATCH v6 04/17] powerpc/vas: Add platform specific user window operations Haren Myneni
2021-06-17 20:31   ` Haren Myneni
2021-06-17 23:27   ` Nicholas Piggin
2021-06-17 23:27     ` Nicholas Piggin
2021-06-17 20:31 ` [PATCH v6 05/17] powerpc/vas: Create take/drop pid and mm reference functions Haren Myneni
2021-06-17 20:31   ` Haren Myneni
2021-06-17 20:32 ` [PATCH v6 06/17] powerpc/vas: Move update_csb/dump_crb to common book3s platform Haren Myneni
2021-06-17 20:32   ` Haren Myneni
2021-06-17 23:10   ` Nicholas Piggin
2021-06-17 23:10     ` Nicholas Piggin
2021-06-17 20:33 ` [PATCH v6 07/17] powerpc/vas: Define and use common vas_window struct Haren Myneni
2021-06-17 20:33   ` Haren Myneni
2021-06-17 20:34 ` [PATCH v6 08/17] powerpc/pseries/vas: Define VAS/NXGZIP hcalls and structs Haren Myneni
2021-06-17 20:34   ` Haren Myneni
2021-06-17 20:34 ` [PATCH v6 09/17] powerpc/vas: Define QoS credit flag to allocate window Haren Myneni
2021-06-17 20:34   ` Haren Myneni
2021-06-17 20:35 ` [PATCH v6 10/17] powerpc/pseries/vas: Add hcall wrappers for VAS handling Haren Myneni
2021-06-17 20:35   ` Haren Myneni
2021-06-17 20:35 ` [PATCH v6 11/17] powerpc/pseries/vas: Implement getting capabilities from hypervisor Haren Myneni
2021-06-17 20:35   ` Haren Myneni
2021-06-17 23:24   ` Nicholas Piggin
2021-06-17 23:24     ` Nicholas Piggin
2021-06-17 20:36 ` [PATCH v6 12/17] powerpc/pseries/vas: Integrate API with open/close windows Haren Myneni
2021-06-17 20:36   ` Haren Myneni
2021-06-17 23:22   ` Nicholas Piggin
2021-06-17 23:22     ` Nicholas Piggin
2021-06-18  7:49     ` Haren Myneni
2021-06-18  7:49       ` Haren Myneni
2021-06-19  3:22       ` Nicholas Piggin
2021-06-19  3:22         ` Nicholas Piggin
2021-06-17 20:37 ` [PATCH v6 13/17] powerpc/pseries/vas: Setup IRQ and fault handling Haren Myneni
2021-06-17 20:37   ` Haren Myneni
2021-06-17 23:34   ` Nicholas Piggin
2021-06-17 23:34     ` Nicholas Piggin
2021-06-18  2:09     ` Haren Myneni
2021-06-18  2:09       ` Haren Myneni
2021-06-19  3:22       ` Nicholas Piggin
2021-06-19  3:22         ` Nicholas Piggin
2021-06-17 20:37 ` [PATCH v6 14/17] crypto/nx: Rename nx-842-pseries file name to nx-common-pseries Haren Myneni
2021-06-17 20:37   ` Haren Myneni
2021-06-17 20:38 ` [PATCH v6 15/17] crypto/nx: Get NX capabilities for GZIP coprocessor type Haren Myneni
2021-06-17 20:38   ` Haren Myneni
2021-06-17 23:35   ` Nicholas Piggin
2021-06-17 23:35     ` Nicholas Piggin
2021-06-17 20:39 ` [PATCH v6 16/17] crypto/nx: Add sysfs interface to export NX capabilities Haren Myneni
2021-06-17 20:39   ` Haren Myneni
2021-06-17 23:41   ` Nicholas Piggin
2021-06-17 23:41     ` Nicholas Piggin
2021-06-17 20:39 ` [PATCH v6 17/17] crypto/nx: Register and unregister VAS interface on PowerVM Haren Myneni
2021-06-17 20:39   ` Haren Myneni
2021-06-24 14:03 ` [PATCH v6 00/17] Enable VAS and NX-GZIP support " Michael Ellerman
2021-06-24 14:03   ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9db00d58dbdcb7cfc07a1df95f3d2a9e3e5d746a.camel@linux.ibm.com \
    --to=haren@linux.ibm.com \
    --cc=haren@us.ibm.com \
    --cc=hbabu@us.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.