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 v4 02/16] powerpc/powernv/vas: Rename register/unregister functions
Date: Fri, 21 May 2021 02:29:44 -0700 [thread overview]
Message-ID: <186bc668e217a1bcf1e1521999662a2044567aa5.camel@linux.ibm.com> (raw)
In-Reply-To: <8d219c0816133a8643d650709066cf04c9c77322.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 5f5fe63a3d1c..2fc0fbc4a3d1 100644
--- a/arch/powerpc/platforms/powernv/vas-window.c
+++ b/arch/powerpc/platforms/powernv/vas-window.c
@@ -1441,3 +1441,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
next prev parent reply other threads:[~2021-05-21 9:31 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 9:25 [PATCH v4 00/16] Enable VAS and NX-GZIP support on powerVM Haren Myneni
2021-05-21 9:28 ` [PATCH v4 01/16] powerpc/vas: Move VAS API to book3s common platform Haren Myneni
2021-06-03 3:32 ` Nicholas Piggin
2021-06-03 20:23 ` Haren Myneni
2021-05-21 9:29 ` Haren Myneni [this message]
2021-05-21 9:30 ` [PATCH v4 03/16] powerpc/vas: Add platform specific user window operations Haren Myneni
2021-06-03 4:05 ` Nicholas Piggin
2021-06-03 20:25 ` Haren Myneni
2021-05-21 9:31 ` [PATCH v4 04/16] powerpc/vas: Create take/drop pid and mm references Haren Myneni
2021-06-03 4:21 ` Nicholas Piggin
2021-06-04 4:08 ` Haren Myneni
2021-06-05 0:31 ` Nicholas Piggin
2021-06-05 3:03 ` Nicholas Piggin
2021-05-21 9:32 ` [PATCH v4 05/16] powerpc/vas: Move update_csb/dump_crb to common book3s platform Haren Myneni
2021-06-03 4:26 ` Nicholas Piggin
2021-05-21 9:33 ` [PATCH v4 06/16] powerpc/vas: Define and use common vas_window struct Haren Myneni
2021-06-03 4:38 ` Nicholas Piggin
2021-06-04 4:35 ` Haren Myneni
2021-06-04 11:52 ` Michael Ellerman
2021-06-04 21:19 ` Haren Myneni
2021-05-21 9:34 ` [PATCH v4 07/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs Haren Myneni
2021-06-03 4:47 ` Nicholas Piggin
2021-06-04 1:30 ` Haren Myneni
2021-06-05 0:37 ` Nicholas Piggin
2021-05-21 9:34 ` [PATCH v4 08/16] powerpc/vas: Define QoS credit flag to allocate window Haren Myneni
2021-05-21 9:35 ` [PATCH v4 09/16] powerpc/pseries/vas: Add HCALL wrappers for VAS handling Haren Myneni
2021-06-04 11:52 ` Michael Ellerman
2021-06-04 21:53 ` Haren Myneni
2021-05-21 9:38 ` [PATCH v4 10/16] powerpc/pseries/vas: Implement getting capabilities from hypervisor Haren Myneni
2021-05-21 9:39 ` [PATCH v4 11/16] powerpc/pseries/vas: Integrate API with open/close windows Haren Myneni
2021-05-21 9:39 ` [PATCH v4 12/16] powerpc/pseries/vas: Setup IRQ and fault handling Haren Myneni
2021-06-03 5:48 ` Nicholas Piggin
2021-06-04 1:19 ` Haren Myneni
2021-06-05 0:43 ` Nicholas Piggin
2021-05-21 9:40 ` [PATCH v4 13/16] crypto/nx: Rename nx-842-pseries file name to nx-common-pseries Haren Myneni
2021-05-21 9:41 ` [PATCH v4 14/16] crypto/nx: Register and unregister VAS interface Haren Myneni
2021-06-03 4:59 ` Nicholas Piggin
2021-05-21 9:41 ` [PATCH v4 15/16] crypto/nx: Get NX capabilities for GZIP coprocessor type Haren Myneni
2021-05-21 9:42 ` [PATCH v4 16/16] crypto/nx: Add sysfs interface to export NX capabilities Haren Myneni
2021-06-03 4:57 ` Nicholas Piggin
2021-06-04 1:02 ` Haren Myneni
2021-06-04 11:52 ` Michael Ellerman
2021-06-04 17:23 ` Haren Myneni
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=186bc668e217a1bcf1e1521999662a2044567aa5.camel@linux.ibm.com \
--to=haren@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).