> instructions with vas_copy_crb() / vas_paste_crb() functions.
>
Reviewed-by: Ram Pai <linux...@us.ibm.com>
> Signed-off-by: Haren Myneni <ha...@us.ibm.com>
> ---
> drivers/crypto/nx/Kconfig | 1 +
> drivers/crypto/nx/nx-842-powernv.c | 375
> +++
crypto_tfm *tfm)
> {
> return nx842_crypto_init(tfm, _powernv_driver);
> @@ -676,13 +1019,27 @@ static __init int nx842_powernv_init(void)
> BUILD_BUG_ON(DDE_BUFFER_ALIGN % DDE_BUFFER_SIZE_MULT);
> BUILD_BUG_ON(DDE_BUFFER_SIZE_MULT % DDE_BUFFER_LAST_MULT);
>
> - for_each_compatible_node(dn, NULL, "ibm,power-nx")
> - nx842_powernv_probe(dn);
> + for_each_compatible_node(dn, NULL, "ibm,power9-nx") {
> + ret = nx842_powernv_probe_vas(dn);
> + if (ret) {
> + nx842_delete_coprocs();
> + return ret;
> + }
> + }
>
> - if (!nx842_ct)
> - return -ENODEV;
> + if (list_empty(_coprocs)) {
> + for_each_compatible_node(dn, NULL, "ibm,power-nx")
> + nx842_powernv_probe(dn);
> +
> + if (!nx842_ct)
> + return -ENODEV;
>
> - nx842_powernv_exec = nx842_exec_icswx;
> + nx842_powernv_exec = nx842_exec_icswx;
> + } else {
> + nx842_powernv_exec = nx842_exec_vas;
> + nx842_powernv_alg.cra_init = nx842_powernv_crypto_init_vas;
> + nx842_powernv_alg.cra_exit = nx842_powernv_crypto_exit_vas;
> + }
>
> ret = crypto_register_alg(_powernv_alg);
> if (ret) {
> diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c
> index d94e25df503b..da3cb8c35ec7 100644
> --- a/drivers/crypto/nx/nx-842.c
> +++ b/drivers/crypto/nx/nx-842.c
> @@ -116,7 +116,7 @@ int nx842_crypto_init(struct crypto_tfm *tfm, struct
> nx842_driver *driver)
>
> spin_lock_init(>lock);
> ctx->driver = driver;
> - ctx->wmem = kmalloc(driver->workmem_size, GFP_KERNEL);
> + ctx->wmem = kzalloc(driver->workmem_size, GFP_KERNEL);
> ctx->sbounce = (u8 *)__get_free_pages(GFP_KERNEL, BOUNCE_BUFFER_ORDER);
> ctx->dbounce = (u8 *)__get_free_pages(GFP_KERNEL, BOUNCE_BUFFER_ORDER);
> if (!ctx->wmem || !ctx->sbounce || !ctx->dbounce) {
> --
> 2.11.0
>
>
--
Ram Pai
On Tue, Nov 17, 2015 at 10:00:20PM +0800, Herbert Xu wrote:
> On Fri, Oct 30, 2015 at 03:43:01PM -0700, Ram Pai wrote:
> > icswx occasionally under heavy load sets bit 3 of condition register 0.
> > It has no software implication.
> >
> > Currently that bit i
On Sat, Oct 31, 2015 at 08:38:17AM -0400, Dan Streetman wrote:
> On Fri, Oct 30, 2015 at 6:45 PM, Ram Pai <linux...@us.ibm.com> wrote:
> > The nx-842 compressor overshoots the output buffer corrupting memory.
> > Verified
> > that the following patch fixes the issu
icswx occasionally under heavy load sets bit 3 of condition register 0.
It has no software implication.
Currently that bit is interpreted by the driver as a failure, when
it should have calmly ignored it.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
arch/powerpc/include/asm/icswx.h
The nx-842 compressor overshoots the output buffer corrupting memory. Verified
that the following patch fixes the issue on a little-endian system.
Signed-off-by: Ram Pai <linux...@us.ibm.com>
---
drivers/crypto/nx/nx-842-powernv.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)