From patchwork Thu Jan 7 12:26:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8080C433E0 for ; Thu, 7 Jan 2021 12:27:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 72375225AC for ; Thu, 7 Jan 2021 12:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727983AbhAGM16 (ORCPT ); Thu, 7 Jan 2021 07:27:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbhAGM15 (ORCPT ); Thu, 7 Jan 2021 07:27:57 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AC84C0612F5; Thu, 7 Jan 2021 04:27:17 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id c12so3750995pfo.10; Thu, 07 Jan 2021 04:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qu9jTq4Mhds1PLReGFI6BuQWWjoITkJw1sqRT7XAn7M=; b=QC08WxFbW+qIztVxBinWE5vs7IHHEhE3+M6tuDRvQi69LJbJ6fap5aP6NxviDUZ0Fv NOYboVzE5XO/yPpV1qHjKJMTd0JsECGmnj14cr6L3G39uy9Pjq5P19dNdg8wMtr8i3pt dUkrZB/iH0b2l84GCJyEKnaAJrykR6bRNhJEKV/3MOo1JRovquSz4KiMtuW5pzQT7iSg /EDg45nLnuGsvTelzscW1WfpG1eXUsifA/ZD0Hto17AEq4yMv3rQsg1JoSsLiTDLLv2o 3JEncImGFvwY3tXhhD1XSHIdxY6+ltkiQ/C/B4njyP41JG5Fk6SINZ5gJTQl88Zi171p bwOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qu9jTq4Mhds1PLReGFI6BuQWWjoITkJw1sqRT7XAn7M=; b=uRp7syZABtuL/M2TY0n+cAIPopxMhxiJTFToT/yEDe3ALAKuve+cuN/isMWBp8J/zI k4RpbdDwt8pcrEGpMOZR4rGjhz8v+fvGApK40sIx98GYP805qvX7TqVE5vb6Lna0SOyo tis+xJfSVy7udQcJVPtblLHP1mjqmtcnpZMPcXwrSGALA5iv0BXmklcu4MBLgQZDvgrT v7oeq1MDW04zqw+bcV6MX1reET37Jb5+tAu6Z1scKq9WlbgOQrXc9VGNTdyg7ug+K5FO dCkLYLBOWbHphJxOzuLhU3ZvBamy0xmY1zObhz4ewjY5XckNTur2pV8udiuOowowayRF FhKw== X-Gm-Message-State: AOAM532o3goJbxMaLqN1LrxX/mvqpttkZ26Z26qIl0O+DxaSYOG2bwfj hgB3Wjq5O4f3ZRf6j2VPBbM= X-Google-Smtp-Source: ABdhPJzmtC0ZYYtJdJncyLo9jUcCmBc8rPOUk0rIqkXUz5Z6T+Z47y0DxRXaN43On1iH8mzHPPPjJg== X-Received: by 2002:a63:2ccf:: with SMTP id s198mr1638747pgs.30.1610022436883; Thu, 07 Jan 2021 04:27:16 -0800 (PST) Received: from localhost.localdomain ([49.207.207.140]) by smtp.gmail.com with ESMTPSA id x28sm5860403pff.182.2021.01.07.04.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:27:16 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 01/19] crypto: amcc: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:56:28 +0530 Message-Id: <20210107122646.16055-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122646.16055-1-allen.lkml@gmail.com> References: <20210107122646.16055-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/amcc/crypto4xx_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 8d1b918a0533..0e13430a5b9b 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -1072,9 +1072,9 @@ static void crypto4xx_unregister_alg(struct crypto4xx_device *sec_dev) } } -static void crypto4xx_bh_tasklet_cb(unsigned long data) +static void crypto4xx_bh_tasklet_cb(struct tasklet_struct *t) { - struct device *dev = (struct device *)data; + struct device *dev = from_tasklet(dev, t, tasklet); struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev); struct pd_uinfo *pd_uinfo; struct ce_pd *pd; @@ -1452,8 +1452,7 @@ static int crypto4xx_probe(struct platform_device *ofdev) goto err_build_sdr; /* Init tasklet for bottom half processing */ - tasklet_init(&core_dev->tasklet, crypto4xx_bh_tasklet_cb, - (unsigned long) dev); + tasklet_setup(&core_dev->tasklet, crypto4xx_bh_tasklet_cb); core_dev->dev->ce_base = of_iomap(ofdev->dev.of_node, 0); if (!core_dev->dev->ce_base) { From patchwork Thu Jan 7 12:26:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359175 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 085F3C433E6 for ; Thu, 7 Jan 2021 12:28:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C576522D75 for ; Thu, 7 Jan 2021 12:28:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728134AbhAGM2I (ORCPT ); Thu, 7 Jan 2021 07:28:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728130AbhAGM2H (ORCPT ); Thu, 7 Jan 2021 07:28:07 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26328C0612F6; Thu, 7 Jan 2021 04:27:27 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id w1so3998098pjc.0; Thu, 07 Jan 2021 04:27:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ChEdTs09dQ0RBgzbeZxLNBVFnUFhvXMwpM6L2ZZDSyQ=; b=kAoid7v3FFbiH7oBR3uCo/5IkT/s0C/4bktioTxr1/loZe/W5KibwOVR52gcw1e5/A 4/d+YGm05IwecPjuh5EMd/RqRZXfjbDWSUqSueab0WaimcV8GlM4wtvcBvEVL0F628e4 LvScvGROPJr/WtqXrJFmpUHlu14ZAhR6MyynIKgr6qftmzU1VDZeUbfLP/4rMglys9RZ 9raw70l7X0PJlt4hvT05S50I6+k3GfUJOiNttjxs8G0NEPHfoMj9h/2V2EHBkBBmA6BM IxD9gPR6n63Bt/Fs3LYBjjdBLKExxxPHQjMkCfFIK95n3kg5oR+wcut7W24c22/FAPbX mW8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ChEdTs09dQ0RBgzbeZxLNBVFnUFhvXMwpM6L2ZZDSyQ=; b=JV675MYcN2M5ZBnT45/F6i4IV3ZQB+RS+tAZqEfCwuCQC47DBU2kraUrTVLW4K+z91 YtklWmlwWm722sz7vvA89f6xD3FMxI6A8VT4Upp2pFBQMDeSE/plqQEAA73tS1UPkrcD 89Ju3h1ZPEF4a5ittMoGnWh39+JX2rQKwHe7NXl9qn8Ps+Ph9G7d8lV4TU7BmSOopWZH BKZ8OVd8GYzKfKk91vx1xOhd0AjLLJcD/HkIqEBBXz3LAPIGZZYPoielgkZKHU9oWSBd nrLDY7GV8Vg7lAKnx8m79lcCNLOVqKwqD+jAFveSn9u9D33q7nvUTZT3zJ+xxFihspuP fcMA== X-Gm-Message-State: AOAM532jHOiqPxmZ3vdp5P2dcXyy6jh+gr+QU4WmDi07pQaGW4dckXd/ SXS+G7PcnkevjInaWRPoPtY= X-Google-Smtp-Source: ABdhPJydfhet9xlKM8LSiwmiP9ivKiEWjw5v+sep8vL8Nxz74x1JQp9iAk5faH/2yMMCOKbW/KMHWg== X-Received: by 2002:a17:90a:7087:: with SMTP id g7mr9055469pjk.200.1610022446738; Thu, 07 Jan 2021 04:27:26 -0800 (PST) Received: from localhost.localdomain ([49.207.207.140]) by smtp.gmail.com with ESMTPSA id x28sm5860403pff.182.2021.01.07.04.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:27:26 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 02/19] crypto: atmel: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:56:29 +0530 Message-Id: <20210107122646.16055-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122646.16055-1-allen.lkml@gmail.com> References: <20210107122646.16055-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/atmel-aes.c | 14 ++++++-------- drivers/crypto/atmel-sha.c | 14 ++++++-------- drivers/crypto/atmel-tdes.c | 14 ++++++-------- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index b1d286004295..804e6a5a39d4 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2300,16 +2300,16 @@ static void atmel_aes_dma_cleanup(struct atmel_aes_dev *dd) dma_release_channel(dd->src.chan); } -static void atmel_aes_queue_task(unsigned long data) +static void atmel_aes_queue_task(struct tasklet_struct *t) { - struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data; + struct atmel_aes_dev *dd = from_tasklet(dd, t, queue_task); atmel_aes_handle_queue(dd, NULL); } -static void atmel_aes_done_task(unsigned long data) +static void atmel_aes_done_task(struct tasklet_struct *t) { - struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data; + struct atmel_aes_dev *dd = from_tasklet(dd, t, done_task); dd->is_async = true; (void)dd->resume(dd); @@ -2499,10 +2499,8 @@ static int atmel_aes_probe(struct platform_device *pdev) INIT_LIST_HEAD(&aes_dd->list); spin_lock_init(&aes_dd->lock); - tasklet_init(&aes_dd->done_task, atmel_aes_done_task, - (unsigned long)aes_dd); - tasklet_init(&aes_dd->queue_task, atmel_aes_queue_task, - (unsigned long)aes_dd); + tasklet_setup(&aes_dd->done_task, atmel_aes_done_task); + tasklet_setup(&aes_dd->queue_task, atmel_aes_queue_task); crypto_init_queue(&aes_dd->queue, ATMEL_AES_QUEUE_LENGTH); diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 352d80cb5ae9..8ec8a32606e8 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -1314,9 +1314,9 @@ static struct ahash_alg sha_384_512_algs[] = { }, }; -static void atmel_sha_queue_task(unsigned long data) +static void atmel_sha_queue_task(struct tasklet_struct *t) { - struct atmel_sha_dev *dd = (struct atmel_sha_dev *)data; + struct atmel_sha_dev *dd = from_tasklet(dd, t, queue_task); atmel_sha_handle_queue(dd, NULL); } @@ -1353,9 +1353,9 @@ static int atmel_sha_done(struct atmel_sha_dev *dd) return err; } -static void atmel_sha_done_task(unsigned long data) +static void atmel_sha_done_task(struct tasklet_struct *t) { - struct atmel_sha_dev *dd = (struct atmel_sha_dev *)data; + struct atmel_sha_dev *dd = from_tasklet(dd, t, done_task); dd->is_async = true; (void)dd->resume(dd); @@ -2570,10 +2570,8 @@ static int atmel_sha_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sha_dd->list); spin_lock_init(&sha_dd->lock); - tasklet_init(&sha_dd->done_task, atmel_sha_done_task, - (unsigned long)sha_dd); - tasklet_init(&sha_dd->queue_task, atmel_sha_queue_task, - (unsigned long)sha_dd); + tasklet_setup(&sha_dd->done_task, atmel_sha_done_task); + tasklet_setup(&sha_dd->queue_task, atmel_sha_queue_task); crypto_init_queue(&sha_dd->queue, ATMEL_SHA_QUEUE_LENGTH); diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c index 4d63cb13a54f..b7a734f666ae 100644 --- a/drivers/crypto/atmel-tdes.c +++ b/drivers/crypto/atmel-tdes.c @@ -1049,16 +1049,16 @@ static struct skcipher_alg tdes_algs[] = { }, }; -static void atmel_tdes_queue_task(unsigned long data) +static void atmel_tdes_queue_task(struct tasklet_struct *t) { - struct atmel_tdes_dev *dd = (struct atmel_tdes_dev *)data; + struct atmel_tdes_dev *dd = from_tasklet(dd, t, queue_task); atmel_tdes_handle_queue(dd, NULL); } -static void atmel_tdes_done_task(unsigned long data) +static void atmel_tdes_done_task(struct tasklet_struct *t) { - struct atmel_tdes_dev *dd = (struct atmel_tdes_dev *) data; + struct atmel_tdes_dev *dd = from_tasklet(dd, t, done_task); int err; if (!(dd->flags & TDES_FLAGS_DMA)) @@ -1177,10 +1177,8 @@ static int atmel_tdes_probe(struct platform_device *pdev) INIT_LIST_HEAD(&tdes_dd->list); spin_lock_init(&tdes_dd->lock); - tasklet_init(&tdes_dd->done_task, atmel_tdes_done_task, - (unsigned long)tdes_dd); - tasklet_init(&tdes_dd->queue_task, atmel_tdes_queue_task, - (unsigned long)tdes_dd); + tasklet_setup(&tdes_dd->done_task, atmel_tdes_done_task); + tasklet_setup(&tdes_dd->queue_task, atmel_tdes_queue_task); crypto_init_queue(&tdes_dd->queue, ATMEL_TDES_QUEUE_LENGTH); From patchwork Thu Jan 7 12:26:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3919BC433E0 for ; Thu, 7 Jan 2021 12:28:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0151422D75 for ; Thu, 7 Jan 2021 12:28:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728137AbhAGM2R (ORCPT ); Thu, 7 Jan 2021 07:28:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726768AbhAGM2R (ORCPT ); Thu, 7 Jan 2021 07:28:17 -0500 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89E7BC0612F8; Thu, 7 Jan 2021 04:27:36 -0800 (PST) Received: by mail-pf1-x42e.google.com with SMTP id w6so3775338pfu.1; Thu, 07 Jan 2021 04:27:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Pt3Ra9o7wlpdpNYx3JDjTYF1o1dX6A0SMQwis6c4Pyw=; b=LaJaOgUfS2mksDAvNuGS50zbrWlySONgVy1PzslszujiHDkOF+lvqfdh5d1kSYzWhu rVoVlpXMXQcDthXshz1ubbVcG7MrUqceN2dfemCxKLN3vXZX5EqLEpYkG3ZUlYMbHuMk 9dTop92UA2q+KPmSduf/kIZea88rjWwp3SrJL6qyLoQKObqH9+e3OBJ1iz4ghvK8ceF9 4po09vE/Y6xSYMFrm7gnjZfXAM/JWRn3WXuMXfxIQWAKPospD3EJDoejfDNifc+9M7Js AlKJ774etDCWZEenSrfCi/HcrxhYb79Uq0GMaaAYiiQeBB0ywMPZ+OPE+hSUjWzT3Fau Mi8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pt3Ra9o7wlpdpNYx3JDjTYF1o1dX6A0SMQwis6c4Pyw=; b=Pbk5KOEDFBDieY0ygADd2fT06HqJtGItfaay0W7tFIrF2dzutSGwSfuuDPr2/IEuSx 8TyZGJJJ3pyiZ+d8mY7SXIXVZw1QylEx8xy4ymyXQ6oXRnjo2mwL/aimyKzzB/3k/YDi TpmxNvP0eJ6J9dWA4hsEBbQ0pf58omZrhSyNEFCdqvQotCVR3ZPbIQy+UXvBP1TJ0Vrk NKsWHzin3dy5LKffL2YuopxwbFBjTYFV5JuutcnPd7VV0O1qKh2OaoaajNlyzpL/CI54 oUYmpMoMBTp/p02S0VY0UMQ5zcJp31R8+dwY4sAWtP3gPfjQKxdN8olHID3lapGvOK3P rTBA== X-Gm-Message-State: AOAM5321HJZMWY/cr4x/b8ZYZWLjRIwPU/IeGPlhjhmH7313d9HO47Kl YwSDMVTv3UTJzPAk8g2lFVE= X-Google-Smtp-Source: ABdhPJwkwRG30UkJgDKao5YgmvhJZh+Poyk8jdZdvUk5stX2bNOUPSkdSosxtH//b/GHsNL9xBR4/A== X-Received: by 2002:a63:9811:: with SMTP id q17mr1651620pgd.238.1610022456221; Thu, 07 Jan 2021 04:27:36 -0800 (PST) Received: from localhost.localdomain ([49.207.207.140]) by smtp.gmail.com with ESMTPSA id x28sm5860403pff.182.2021.01.07.04.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:27:35 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 03/19] crypto: axis: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:56:30 +0530 Message-Id: <20210107122646.16055-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122646.16055-1-allen.lkml@gmail.com> References: <20210107122646.16055-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/axis/artpec6_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c index 9ad188cffd0d..52e0c7fdbfa8 100644 --- a/drivers/crypto/axis/artpec6_crypto.c +++ b/drivers/crypto/axis/artpec6_crypto.c @@ -2075,9 +2075,9 @@ static void artpec6_crypto_timeout(struct timer_list *t) tasklet_schedule(&ac->task); } -static void artpec6_crypto_task(unsigned long data) +static void artpec6_crypto_task(struct tasklet_struct *t) { - struct artpec6_crypto *ac = (struct artpec6_crypto *)data; + struct artpec6_crypto *ac = from_tasklet(ac, t, task); struct artpec6_crypto_req_common *req; struct artpec6_crypto_req_common *n; struct list_head complete_done; @@ -2900,8 +2900,7 @@ static int artpec6_crypto_probe(struct platform_device *pdev) artpec6_crypto_init_debugfs(); #endif - tasklet_init(&ac->task, artpec6_crypto_task, - (unsigned long)ac); + tasklet_setup(&ac->task, artpec6_crypto_task); ac->pad_buffer = devm_kzalloc(&pdev->dev, 2 * ARTPEC_CACHE_LINE_MAX, GFP_KERNEL); From patchwork Thu Jan 7 12:29:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4FE8C4332D for ; Thu, 7 Jan 2021 12:30:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A5B1E2335A for ; Thu, 7 Jan 2021 12:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728168AbhAGMal (ORCPT ); Thu, 7 Jan 2021 07:30:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728161AbhAGMal (ORCPT ); Thu, 7 Jan 2021 07:30:41 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3898C0612F4; Thu, 7 Jan 2021 04:30:00 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id c132so4738321pga.3; Thu, 07 Jan 2021 04:30:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=H0SYn3zavUKS6x6UDhKNxQX8cw552XrJ/WIv8yRpRIM6sDKARzTk8yEKqCCKzEL7OZ Sqe2lyc88QLHWM7CCr2M//0J4DNWNtxS28SXcCB7UJ5dID9OCzEAcIv4JaHnq5lHgmgQ sgET4LPtv3JAqIE7o70L0OCCFn0KXXowlcTA1xUCm5ChdAd+757F4S2iJZS47qD5F7PY KAX+L9qLahgIkAr9XaXavaw81lYV9AEJ6o19/MZNYDN3ZwqsLEf4hiVKa70pM0eoIFko HItgzMuy7Wn4PFEnRymGiIjeu9ZTGEgiVO4ENgrgRMU4GygY5uxOiSCYhri8kBt+F246 74Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=ESDMF6HjxBbs7dGCE/z0hsLxKJ/5DxVDrx3EuU19hADEn4HOjw0cfJtE8ieOLJe8hq /wWUrG6yj/SXrCp3lxLNaaLrUG9J6s+cfh0LL0l8PmHLb9C1QxLxXnCkgSkTXdQjoUs5 bzoEB6FmkGbNytHjQM2gY/vLHVOzRzZh5ekl4zPGunqR2RNjhsBqM2wLcAMEXKVrGvDx x150b0XZmmWvpD1679Mkzj9cXGbQ4SjVd2VA9PuKP/H9biUjTe4eVokWRvph7ahy0CbW ZFjfBqpScohK9ted4dVIpujja43uvyRmxIlE28M1h0p0NfCV1zkClzyNvt0+i96ug5mB /LOw== X-Gm-Message-State: AOAM533h2XCeEPhuEU9MgQuN5Z4u5St3Zv+kNmWftyWDQJd2Xc6Tgc+S FtBPZ+u+dRo3M74DYDo+58M= X-Google-Smtp-Source: ABdhPJzT/YJktNDHrk/I8qZ8dAithbSQ7i/79m4+vWBw3oHcFA3VosHZj44pM2C/wLC4imXef32UQA== X-Received: by 2002:aa7:8811:0:b029:1ab:9e4f:b8ea with SMTP id c17-20020aa788110000b02901ab9e4fb8eamr8543725pfo.78.1610022600501; Thu, 07 Jan 2021 04:30:00 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:29:59 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:29 +0530 Message-Id: <20210107122944.16363-1-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Reviewed-by: Horia Geantă Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/caam/jr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index 7f2b1101f567..2903e1af0a56 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -9,6 +9,7 @@ #include #include +#include #include "compat.h" #include "ctrl.h" @@ -201,11 +202,11 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void caam_jr_dequeue(unsigned long devarg) +static void caam_jr_dequeue(struct tasklet_struct *t) { int hw_idx, sw_idx, i, head, tail; - struct device *dev = (struct device *)devarg; - struct caam_drv_private_jr *jrp = dev_get_drvdata(dev); + struct caam_drv_private_jr *jrp = from_tasklet(jrp, t, irqtask); + struct device *dev = jrp->dev; void (*usercall)(struct device *dev, u32 *desc, u32 status, void *arg); u32 *userdesc, userstatus; void *userarg; @@ -483,7 +484,7 @@ static int caam_jr_init(struct device *dev) (JOBR_INTC_COUNT_THLD << JRCFG_ICDCT_SHIFT) | (JOBR_INTC_TIME_THLD << JRCFG_ICTT_SHIFT)); - tasklet_init(&jrp->irqtask, caam_jr_dequeue, (unsigned long)dev); + tasklet_setup(&jrp->irqtask, caam_jr_dequeue); /* Connect job ring interrupt handler. */ error = devm_request_irq(dev, jrp->irq, caam_jr_interrupt, IRQF_SHARED, From patchwork Thu Jan 7 12:29:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FA4AC4332E for ; Thu, 7 Jan 2021 12:30:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E125823359 for ; Thu, 7 Jan 2021 12:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728186AbhAGMau (ORCPT ); Thu, 7 Jan 2021 07:30:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725835AbhAGMau (ORCPT ); Thu, 7 Jan 2021 07:30:50 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22219C0612F5; Thu, 7 Jan 2021 04:30:10 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id c132so4738615pga.3; Thu, 07 Jan 2021 04:30:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qp9LBDTmnPZcn3zbp0ts8Zh1JyTpVMJr9nqNyHr6PFs=; b=Advhv+JeBcayRbTWxjyllWoh9FTaCJUijNK3TW42haYbC7+lx4Rry1R5mFggpSCAHE 7OmyTRUB/jFL81HiOz05CyKqCKoF9uR1UZwrO9HO6wuHXkbFxwABNc1Bi2Ew8Fb89RYf w4ntdE9kvcAn+UrY+TElJUuY2HVNAZ68lPCZcEPjWnLrdYs9mmeTZfLq+DrAeS335ZNO +0zamgoVYhQxZf8J8aqQKD49X8b7udRn3aDOxEOmhy+BRB6RNaETqXBjyvLc6tzR+pd0 a1Q1oKsIE1VKhqGV1B2Gp6ESQS0gXnRwu3vibKbKAHzwzEGCshe1YvZ9hfg+bGTafen5 Z6EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qp9LBDTmnPZcn3zbp0ts8Zh1JyTpVMJr9nqNyHr6PFs=; b=hHSwJHnWKJ8yC24SJJU6WYQtjJK7bVvmv2W791ueyTWeK7iGQ6kL0mEQGqKgSvzYBX B6RaF/BIfwKC1JiFDN8w6bt+AuQJEUcd+7YovPkHl4lJw6EOorHcNLB6lWb8oNOkvrrd GLY0DmW6DldTI7s2mbONdgbB0TjbL0mzySbR2SkOqL90HmO+am5chXM9YCt3UapaBKUo MIvw15sst7UuI06f+hF3ejcyVPzO7XVp7lAyCO/Lk/kvnBCf/wYyvLZ+pH/X5kV3c8Ek gEIuzV95r3Bjj6VWylZdtH4Ch6U4yyu7I6nkQ7Dofpt0MH9jgfqHV42pH1gpwYF4gJGx 2LjA== X-Gm-Message-State: AOAM532xtySFcGqnT/6lc6mrx75+Z0sMrRg2FrPSQnK/994iz5XuJxgG 4u6H+hQM8jqQqn1OTIonRJc= X-Google-Smtp-Source: ABdhPJxz9NQmwgNlNPmzAveDr3euMsyXIEzMiBFYqFDRARr1rosMSOElf8iqzEjXbuqqgaIwvnVVEA== X-Received: by 2002:aa7:8583:0:b029:1a9:39bc:ed3b with SMTP id w3-20020aa785830000b02901a939bced3bmr8817010pfn.48.1610022609738; Thu, 07 Jan 2021 04:30:09 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:09 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 05/19] crypto: cavium: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:30 +0530 Message-Id: <20210107122944.16363-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/cavium/cpt/cptvf_main.c | 9 ++++----- drivers/crypto/cavium/nitrox/nitrox_common.h | 2 +- drivers/crypto/cavium/nitrox/nitrox_isr.c | 13 +++++-------- drivers/crypto/cavium/nitrox/nitrox_reqmgr.c | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/cavium/cpt/cptvf_main.c b/drivers/crypto/cavium/cpt/cptvf_main.c index f016448e43bb..6424bcc74139 100644 --- a/drivers/crypto/cavium/cpt/cptvf_main.c +++ b/drivers/crypto/cavium/cpt/cptvf_main.c @@ -21,10 +21,10 @@ struct cptvf_wqe_info { struct cptvf_wqe vq_wqe[CPT_NUM_QS_PER_VF]; }; -static void vq_work_handler(unsigned long data) +static void vq_work_handler(struct tasklet_struct *t) { - struct cptvf_wqe_info *cwqe_info = (struct cptvf_wqe_info *)data; - struct cptvf_wqe *cwqe = &cwqe_info->vq_wqe[0]; + struct cptvf_wqe *cwqe = from_tasklet(cwqe, t, twork); + struct cptvf_wqe_info *cwqe_info = container_of(cwqe, typeof(*cwqe_info), vq_wqe[0]); vq_post_process(cwqe->cptvf, cwqe->qno); } @@ -45,8 +45,7 @@ static int init_worker_threads(struct cpt_vf *cptvf) } for (i = 0; i < cptvf->nr_queues; i++) { - tasklet_init(&cwqe_info->vq_wqe[i].twork, vq_work_handler, - (u64)cwqe_info); + tasklet_setup(&cwqe_info->vq_wqe[i].twork, vq_work_handler); cwqe_info->vq_wqe[i].qno = i; cwqe_info->vq_wqe[i].cptvf = cptvf; } diff --git a/drivers/crypto/cavium/nitrox/nitrox_common.h b/drivers/crypto/cavium/nitrox/nitrox_common.h index e4be69d7e6e5..f73ae8735272 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_common.h +++ b/drivers/crypto/cavium/nitrox/nitrox_common.h @@ -19,7 +19,7 @@ void nitrox_put_device(struct nitrox_device *ndev); int nitrox_common_sw_init(struct nitrox_device *ndev); void nitrox_common_sw_cleanup(struct nitrox_device *ndev); -void pkt_slc_resp_tasklet(unsigned long data); +void pkt_slc_resp_tasklet(struct tasklet_struct *t); int nitrox_process_se_request(struct nitrox_device *ndev, struct se_crypto_request *req, completion_t cb, diff --git a/drivers/crypto/cavium/nitrox/nitrox_isr.c b/drivers/crypto/cavium/nitrox/nitrox_isr.c index 99b053094f5a..c6fb8b3263e1 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_isr.c +++ b/drivers/crypto/cavium/nitrox/nitrox_isr.c @@ -201,9 +201,9 @@ static void clear_bmi_err_intr(struct nitrox_device *ndev) dev_err_ratelimited(DEV(ndev), "BMI_INT 0x%016llx\n", value); } -static void nps_core_int_tasklet(unsigned long data) +static void nps_core_int_tasklet(struct tasklet_struct *t) { - struct nitrox_q_vector *qvec = (void *)(uintptr_t)(data); + struct nitrox_q_vector *qvec = from_tasklet(qvec, t, resp_tasklet); struct nitrox_device *ndev = qvec->ndev; /* if pf mode do queue recovery */ @@ -343,8 +343,7 @@ int nitrox_register_interrupts(struct nitrox_device *ndev) cpu = qvec->ring % num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, pkt_slc_resp_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, pkt_slc_resp_tasklet); qvec->valid = true; } @@ -364,8 +363,7 @@ int nitrox_register_interrupts(struct nitrox_device *ndev) cpu = num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, nps_core_int_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, nps_core_int_tasklet); qvec->valid = true; return 0; @@ -442,8 +440,7 @@ int nitrox_sriov_register_interupts(struct nitrox_device *ndev) cpu = num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, nps_core_int_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, nps_core_int_tasklet); qvec->valid = true; return 0; diff --git a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c index 53ef06792133..676f3d00bf61 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c +++ b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c @@ -580,9 +580,9 @@ static void process_response_list(struct nitrox_cmdq *cmdq) /** * pkt_slc_resp_tasklet - post processing of SE responses */ -void pkt_slc_resp_tasklet(unsigned long data) +void pkt_slc_resp_tasklet(struct tasklet_struct *t) { - struct nitrox_q_vector *qvec = (void *)(uintptr_t)(data); + struct nitrox_q_vector *qvec = from_tasklet(qvec, t, resp_tasklet); struct nitrox_cmdq *cmdq = qvec->cmdq; union nps_pkt_slc_cnts slc_cnts; From patchwork Thu Jan 7 12:29:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2244C4332D for ; Thu, 7 Jan 2021 12:31:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96E7A23356 for ; Thu, 7 Jan 2021 12:31:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728253AbhAGMbD (ORCPT ); Thu, 7 Jan 2021 07:31:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbhAGMa7 (ORCPT ); Thu, 7 Jan 2021 07:30:59 -0500 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FE7CC0612F6; Thu, 7 Jan 2021 04:30:19 -0800 (PST) Received: by mail-pg1-x530.google.com with SMTP id n25so4753298pgb.0; Thu, 07 Jan 2021 04:30:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X8fsop2xmYxltHA5D/rZSLD1hZ0w/2RK5zEw7HljbjI=; b=q/oJK60fsB9omlgtoRNmAEcUxj0VpRPDimQSIcRCBHJ3UmvI0OcDnEqpOVeJs+4OaE kOkrObU8cuRzSnOnAnbcsWIso9d39wTUqujdIcEE4KnBeWmuFGsGY8mEEda934nNZgqW JonzQFItVIhIsle/CvukTD5c96i/XIaTMpm6qzmDDm0vf9nZ044IKqADIs8D18MwucqB ucQUAeyAKKsPkrtn1g6nMcyiOJy6XRwn+wlQ1AjoeZ5wYRJ7a9JDvNYFEh+rJQGMJU0p JDUBMj3ngsjKtKVYBtEbDqRShGXKxiFoaG1igTb5Kx6Egsw7gbybiLbZK7R6soGZEwr4 Wt0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X8fsop2xmYxltHA5D/rZSLD1hZ0w/2RK5zEw7HljbjI=; b=jMx7gtUoKqo8H+THxZuKEXmSG7SoEd+c6h7wnsk6BhEyF9g2eCG/wBUsG2tzMn0mo9 uL0jCuS7GhYTo4bsLLZ8aqKsCcdu1uE9vSVhmg+DnmD/UHCNRSXdTsZvWZELM+ygtaan Xirzt2DL2nwznNOWRQ72Tmzr/Z15Ctdql60YqzshtWvmimvExggtaGeSo/reS1OFMGKf ogOsA3vuuDNO2dh3pKg4obDqloPVwu6PoEo/fKEG7NNgmE2fSSL939O9B4aPe68c//yh qxunaeOfNPbz8JZXeNpiNI2vdVl3PKZcCeo1v5BYtd7z75JLNIf/QqnKinz6jC/jBlJ4 TNow== X-Gm-Message-State: AOAM5320q06aA4+lCYucX0p6T1OVyEmDv+1y91ukfj8RMO1A8rvQ9q7d qG2YZjABvduHEh3VTyniwhY= X-Google-Smtp-Source: ABdhPJy7F0kr2j2dPf/ONfSPxUmvYH6sY7gdQ9MPl4cRBGd+zmHYEphBj57UcUKZwoM3uxpWr2fEQQ== X-Received: by 2002:a63:6344:: with SMTP id x65mr1637166pgb.172.1610022618866; Thu, 07 Jan 2021 04:30:18 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:18 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 06/19] crypto: ccp: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:31 +0530 Message-Id: <20210107122944.16363-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ccp/ccp-dev-v3.c | 9 ++++----- drivers/crypto/ccp/ccp-dev-v5.c | 9 ++++----- drivers/crypto/ccp/ccp-dmaengine.c | 7 +++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c index 0d5576f6ad21..858566867fa3 100644 --- a/drivers/crypto/ccp/ccp-dev-v3.c +++ b/drivers/crypto/ccp/ccp-dev-v3.c @@ -321,9 +321,9 @@ static void ccp_enable_queue_interrupts(struct ccp_device *ccp) iowrite32(ccp->qim, ccp->io_regs + IRQ_MASK_REG); } -static void ccp_irq_bh(unsigned long data) +static void ccp_irq_bh(struct tasklet_struct *t) { - struct ccp_device *ccp = (struct ccp_device *)data; + struct ccp_device *ccp = from_tasklet(ccp, t, irq_tasklet); struct ccp_cmd_queue *cmd_q; u32 q_int, status; unsigned int i; @@ -361,7 +361,7 @@ static irqreturn_t ccp_irq_handler(int irq, void *data) if (ccp->use_tasklet) tasklet_schedule(&ccp->irq_tasklet); else - ccp_irq_bh((unsigned long)ccp); + ccp_irq_bh(&ccp->irq_tasklet); return IRQ_HANDLED; } @@ -457,8 +457,7 @@ static int ccp_init(struct ccp_device *ccp) /* Initialize the ISR tasklet? */ if (ccp->use_tasklet) - tasklet_init(&ccp->irq_tasklet, ccp_irq_bh, - (unsigned long)ccp); + tasklet_setup(&ccp->irq_tasklet, ccp_irq_bh); dev_dbg(dev, "Starting threads...\n"); /* Create a kthread for each queue */ diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 7838f63bab32..e68b05a3169b 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -733,9 +733,9 @@ static void ccp5_enable_queue_interrupts(struct ccp_device *ccp) iowrite32(SUPPORTED_INTERRUPTS, ccp->cmd_q[i].reg_int_enable); } -static void ccp5_irq_bh(unsigned long data) +static void ccp5_irq_bh(struct tasklet_struct *t) { - struct ccp_device *ccp = (struct ccp_device *)data; + struct ccp_device *ccp = from_tasklet(ccp, t, irq_tasklet); u32 status; unsigned int i; @@ -772,7 +772,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data) if (ccp->use_tasklet) tasklet_schedule(&ccp->irq_tasklet); else - ccp5_irq_bh((unsigned long)ccp); + ccp5_irq_bh(&ccp->irq_tasklet); return IRQ_HANDLED; } @@ -894,8 +894,7 @@ static int ccp5_init(struct ccp_device *ccp) } /* Initialize the ISR tasklet */ if (ccp->use_tasklet) - tasklet_init(&ccp->irq_tasklet, ccp5_irq_bh, - (unsigned long)ccp); + tasklet_setup(&ccp->irq_tasklet, ccp5_irq_bh); dev_dbg(dev, "Loading LSB map...\n"); /* Copy the private LSB mask to the public registers */ diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c index 0770a83bf1a5..a85690866b05 100644 --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c @@ -121,9 +121,9 @@ static void ccp_cleanup_desc_resources(struct ccp_device *ccp, } } -static void ccp_do_cleanup(unsigned long data) +static void ccp_do_cleanup(struct tasklet_struct *t) { - struct ccp_dma_chan *chan = (struct ccp_dma_chan *)data; + struct ccp_dma_chan *chan = from_tasklet(chan, t, cleanup_tasklet); unsigned long flags; dev_dbg(chan->ccp->dev, "%s - chan=%s\n", __func__, @@ -712,8 +712,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp) INIT_LIST_HEAD(&chan->active); INIT_LIST_HEAD(&chan->complete); - tasklet_init(&chan->cleanup_tasklet, ccp_do_cleanup, - (unsigned long)chan); + tasklet_setup(&chan->cleanup_tasklet, ccp_do_cleanup); dma_chan->device = dma_dev; dma_cookie_init(dma_chan); From patchwork Thu Jan 7 12:29:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CC28C43333 for ; Thu, 7 Jan 2021 12:31:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1111623359 for ; Thu, 7 Jan 2021 12:31:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726338AbhAGMbK (ORCPT ); Thu, 7 Jan 2021 07:31:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbhAGMbI (ORCPT ); Thu, 7 Jan 2021 07:31:08 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F521C0612F8; Thu, 7 Jan 2021 04:30:28 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id b8so3426564plx.0; Thu, 07 Jan 2021 04:30:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uwo40ct7uzVjK8NcMtTbNQmNhWXoxMbACC3WJlaa3jg=; b=ufEmWbyZUa+dQQvAYhIkE8p0pOHhu50F7qe/0f12DD/tRcDNzhDQ9/wCoyhw5VjPzQ dnd0JxxBwzKuMIZz87eJM0611NaeBvh0JKQhwpyuBZAZSvrunvM2Krth7aa6VMlqwa2j TofjP1deDG8A8Y/9MQ8q8w7i79bNBdRz5RX7iPHWy43hjJU1BlJErRE1Wd9mpJxGBv6g WFoD+YH25Z/8jOGBVw1SCHZFUUWJFja/AyJIVQvV20LvPFD4ErlwVgkg/yOWNd6g/Lgw pLHjomwwpODFFA76JDMXo5Bt4X1WycGxzqLZywA3GcxmORVXwmK11odoUNIP8LH+OA6K N7zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uwo40ct7uzVjK8NcMtTbNQmNhWXoxMbACC3WJlaa3jg=; b=hjGXID6MQylMDZDQ506g1Zuu1Hdti9EuYse0Y5EGRqdst+oxBtihoJ8Ie7hx50jICl omVzGbHsEcTyEiei25bPYBs1m58qgrbtPdHOMaHXfja1kW+sonI5ztnXCLwKX6m8Ideb pi3UIAO8AreJ/7CmBEEve5BHBVYET0frbYo94B8xNJ+bnbrMA/JwJ7fR6Lkqrj1ujFbT Q3xvphSfrQrTlWcnKfJDgcLbAtHT8lpuQfsifWSev8AsjtisVJC7qKoR3flWiNjK0zvm 2skyqOcEnaUqTDsSx1OVpWBopyr8gnwLpJRWjOgLfvh2/XUrYU+DJL/kwMS0BoH4sTEC 3jKQ== X-Gm-Message-State: AOAM533p5XUHrTIF/mmDAIj543hQRtjfyOATRaulLV8a2eIQd/swXpDE j6Jr3IfjEoUnpt4joiNh1Fw= X-Google-Smtp-Source: ABdhPJywWT2KX2/NpHZqqBSNZJnlsUYYQZ/FulwF+aZ9Tt2BgrZXxoPU8LPfCPWHRve1aUtV0yOF+Q== X-Received: by 2002:a17:902:76c8:b029:dc:183d:60cf with SMTP id j8-20020a17090276c8b02900dc183d60cfmr1981987plt.15.1610022627661; Thu, 07 Jan 2021 04:30:27 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:27 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 07/19] crypto: ccree: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:32 +0530 Message-Id: <20210107122944.16363-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ccree/cc_fips.c | 8 ++++---- drivers/crypto/ccree/cc_request_mgr.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/ccree/cc_fips.c b/drivers/crypto/ccree/cc_fips.c index 702aefc21447..c1d03d99e3c3 100644 --- a/drivers/crypto/ccree/cc_fips.c +++ b/drivers/crypto/ccree/cc_fips.c @@ -8,7 +8,7 @@ #include "cc_driver.h" #include "cc_fips.h" -static void fips_dsr(unsigned long devarg); +static void fips_dsr(struct tasklet_struct *tsk); struct cc_fips_handle { struct tasklet_struct tasklet; @@ -109,9 +109,9 @@ void cc_tee_handle_fips_error(struct cc_drvdata *p_drvdata) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void fips_dsr(unsigned long devarg) +static void fips_dsr(struct tasklet_struct *tsk) { - struct cc_drvdata *drvdata = (struct cc_drvdata *)devarg; + struct cc_drvdata *drvdata = from_tasklet(drvdata, tsk, tasklet); u32 irq, val; irq = (drvdata->irq & (CC_GPR0_IRQ_MASK)); @@ -143,7 +143,7 @@ int cc_fips_init(struct cc_drvdata *p_drvdata) p_drvdata->fips_handle = fips_h; dev_dbg(dev, "Initializing fips tasklet\n"); - tasklet_init(&fips_h->tasklet, fips_dsr, (unsigned long)p_drvdata); + tasklet_setup(&fips_h->tasklet, fips_dsr); fips_h->drvdata = p_drvdata; fips_h->nb.notifier_call = cc_ree_fips_failure; atomic_notifier_chain_register(&fips_fail_notif_chain, &fips_h->nb); diff --git a/drivers/crypto/ccree/cc_request_mgr.c b/drivers/crypto/ccree/cc_request_mgr.c index 33fb27745d52..ec0f3bf00d33 100644 --- a/drivers/crypto/ccree/cc_request_mgr.c +++ b/drivers/crypto/ccree/cc_request_mgr.c @@ -70,7 +70,7 @@ static const u32 cc_cpp_int_masks[CC_CPP_NUM_ALGS][CC_CPP_NUM_SLOTS] = { BIT(CC_HOST_IRR_REE_OP_ABORTED_SM_7_INT_BIT_SHIFT) } }; -static void comp_handler(unsigned long devarg); +static void comp_handler(struct tasklet_struct *t); #ifdef COMP_IN_WQ static void comp_work_handler(struct work_struct *work); #endif @@ -140,8 +140,7 @@ int cc_req_mgr_init(struct cc_drvdata *drvdata) INIT_DELAYED_WORK(&req_mgr_h->compwork, comp_work_handler); #else dev_dbg(dev, "Initializing completion tasklet\n"); - tasklet_init(&req_mgr_h->comptask, comp_handler, - (unsigned long)drvdata); + tasklet_setup(&req_mgr_h->comptask, comp_handler); #endif req_mgr_h->hw_queue_size = cc_ioread(drvdata, CC_REG(DSCRPTR_QUEUE_SRAM_SIZE)); @@ -611,11 +610,12 @@ static inline u32 cc_axi_comp_count(struct cc_drvdata *drvdata) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void comp_handler(unsigned long devarg) +static void comp_handler(struct tasklet_struct *t) { - struct cc_drvdata *drvdata = (struct cc_drvdata *)devarg; struct cc_req_mgr_handle *request_mgr_handle = - drvdata->request_mgr_handle; + from_tasklet(request_mgr_handle, t, comptask); + struct cc_drvdata *drvdata = container_of((void *)request_mgr_handle, + typeof(*drvdata), request_mgr_handle); struct device *dev = drvdata_to_dev(drvdata); u32 irq; From patchwork Thu Jan 7 12:29:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358376 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11A23C433E6 for ; Thu, 7 Jan 2021 12:31:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CED9923356 for ; Thu, 7 Jan 2021 12:31:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728097AbhAGMbS (ORCPT ); Thu, 7 Jan 2021 07:31:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbhAGMbR (ORCPT ); Thu, 7 Jan 2021 07:31:17 -0500 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48AE7C0612F9; Thu, 7 Jan 2021 04:30:37 -0800 (PST) Received: by mail-pg1-x52a.google.com with SMTP id n7so4749512pgg.2; Thu, 07 Jan 2021 04:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IcYiMBsXjgXqsCUOACpj4n3qnT1OSjGqlWhB/zIbApI=; b=q1b14DkzpJRGPgQ2ngw61EBHyRojXOhmeARI7hubXPHWZuJ3ZbCQfQzA+Vg00Ji7oN eglKJajT/phzHNQdYRWyowE60icmapabNDIYHLcMsSGODXVR4fpdciDdCrO9q5WR2NbU Q9p/jU8+M97ZgPsiDx95fcTwUWO7Aj8NfhkPCmfEjaAehVV0TfU+lG8hYT0bH6zWhp0v e7EmYHPq+Pm8eCmjsyO8DmmO+Mp3YYK+9dT08gsLBSU8uvzy2wozGxVK4R+1O5tmkmvN VZSAcN/R5jx/0FmSw+VwcZ3O8gih4wxKUiKLLMVFbDRo19UMdcyq/Mc6JLZ8zr2v9UtP BmLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IcYiMBsXjgXqsCUOACpj4n3qnT1OSjGqlWhB/zIbApI=; b=rlgrEL9WfMwLyZi6mb4mXhkxRdsAnNeOU8SsANUiEZg5zRbKuLlXBvO3XRs5uJ+rxs DVnHd0Ka1xFM/mOgiXeTt9N5uvR9R1ysVjigAMVi9jd8W6oc6s+cbPgWLd8Pfpp8tDQR bKFxYjHC46jtZT8vmnUKWuGJujBhwqSnxRAP3MJkZ+Aous7R8i07ZvDR9NLIKuY0+WHT eUxEN6nXMzRYa9wte9/rJjCkSd2qruCVCu2nYF9CsBQbeCeOhdCsbEAQD5D6rs2KuHbm 2Af8HjDFVR79n7q4EBpfP0DCrlnUduI00gM596QFLZR4aoa9fxsObWE1VqYrYSEDp7gq G9Lw== X-Gm-Message-State: AOAM531TPE3tVOWCDwOhOlZKTfYvxs5bEdFSf3jEMTYPvf5Q/YN1hF2n 1x2XwvGsS6tnmOsIcaVAxvM= X-Google-Smtp-Source: ABdhPJwRdfOyuDoYxkXBo3Lx4+KPzBzDxEcsdT+IBiU4+pw8wU/dgoW9f8IkVaCL9kQ9AK1QuLGQMg== X-Received: by 2002:a63:605:: with SMTP id 5mr1620892pgg.144.1610022636869; Thu, 07 Jan 2021 04:30:36 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:36 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 08/19] crypto: hifn_795x: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:33 +0530 Message-Id: <20210107122944.16363-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/hifn_795x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 7e7a8f01ea6b..47f7bb43477e 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -2445,9 +2445,9 @@ static int hifn_register_alg(struct hifn_device *dev) return err; } -static void hifn_tasklet_callback(unsigned long data) +static void hifn_tasklet_callback(struct tasklet_struct *t) { - struct hifn_device *dev = (struct hifn_device *)data; + struct hifn_device *dev = from_tasklet(dev, t, tasklet); /* * This is ok to call this without lock being held, @@ -2533,7 +2533,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) pci_set_drvdata(pdev, dev); - tasklet_init(&dev->tasklet, hifn_tasklet_callback, (unsigned long)dev); + tasklet_setup(&dev->tasklet, hifn_tasklet_callback); crypto_init_queue(&dev->queue, 1); From patchwork Thu Jan 7 12:29:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E0BDC43381 for ; Thu, 7 Jan 2021 12:31:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E0AD23356 for ; Thu, 7 Jan 2021 12:31:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728102AbhAGMb0 (ORCPT ); Thu, 7 Jan 2021 07:31:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbhAGMb0 (ORCPT ); Thu, 7 Jan 2021 07:31:26 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1B82C0612F4; Thu, 7 Jan 2021 04:30:45 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id q20so484531pfu.8; Thu, 07 Jan 2021 04:30:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=r/Samj46HFOW22YwxxLKb7kXMfMJZkv+fNvz018vr4h6HXcjxcSKw5uY/aUxVaNcbo KH5B6prk28ejw3y5Ryfrz5Km9447Lb354jWKYqAmIXuoiCXbzseR9s1/hc3Pbu5madIw 59WJV5JdKd1D4B2VAz5IGa35TZtVnrMQxgNLe8wD/s24o3Ejm29SxHAcxFG+Ca8yfayr h8FI+MQ4no59/kwrzdc6usou78p/m/y4ubf8AfkQjlVGHlk2s6QUG3oeuyzU/5xbvqNE 7UJCTmQ2GQvzKNskROlUCWNiGtQyjcl4p1atnUflE1tNsKbjAVTJ2X+FzPOGqWR6xn5K Cktw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=dc3HPosJWvreaMbYB4p1kkX2JNzG/9a91rycu3Nw+0YQrPAVU6mLw8tUX6bgOZSrFm 95ZXI5ss+2cIoaJ63Y+U23bPKcmx1ZxwqmfTOyhAxkD+ofthpQxmJscJnBB8Yn4lq034 zRPoL/RL9GdiqGIhEB6pDuuJELW7gqv0AWlH9+siYQbKFyLRdNnqQKx7YTVwBzqLm2+6 wfNe5SEO4RUYI7CCd2MOlAZ+sLH1qpBe2Nr2jjcqzUX3lZk2+/dw3AbmXRoIsIp5OLQi MjsPh5EarHHyg2RNwIQAj4BPNT5YHYPvl10WbtCPl0XJutqebg5idCpawJQ/7Et7EuT1 O5nQ== X-Gm-Message-State: AOAM533BwyDBLJmGkb8o2xNJF/FqcaG1ww+FHhdGcxbWARQxHXLRRRt4 kHCL9/PqNn87+iRYDCrXPUA= X-Google-Smtp-Source: ABdhPJwyAj4F5Fhuw4gMLL7mw2TuD871TGVzFmlexoKSH7il+8JqllUpDbrl6cfZ8d+zKs+UvJn9zw== X-Received: by 2002:a63:3549:: with SMTP id c70mr1607262pga.361.1610022645408; Thu, 07 Jan 2021 04:30:45 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:44 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:34 +0530 Message-Id: <20210107122944.16363-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/img-hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index e813115d5432..72b65cdff856 100644 --- a/drivers/crypto/img-hash.c +++ b/drivers/crypto/img-hash.c @@ -355,9 +355,9 @@ static int img_hash_dma_init(struct img_hash_dev *hdev) return 0; } -static void img_hash_dma_task(unsigned long d) +static void img_hash_dma_task(struct tasklet_struct *t) { - struct img_hash_dev *hdev = (struct img_hash_dev *)d; + struct img_hash_dev *hdev = from_tasklet(hdev, t, dma_task); struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req); u8 *addr; size_t nbytes, bleft, wsend, len, tbc; @@ -887,9 +887,9 @@ static int img_unregister_algs(struct img_hash_dev *hdev) return 0; } -static void img_hash_done_task(unsigned long data) +static void img_hash_done_task(struct tasklet_struct *t) { - struct img_hash_dev *hdev = (struct img_hash_dev *)data; + struct img_hash_dev *hdev = from_tasklet(hdev, t, done_task); int err = 0; if (hdev->err == -EINVAL) { @@ -954,8 +954,8 @@ static int img_hash_probe(struct platform_device *pdev) INIT_LIST_HEAD(&hdev->list); - tasklet_init(&hdev->done_task, img_hash_done_task, (unsigned long)hdev); - tasklet_init(&hdev->dma_task, img_hash_dma_task, (unsigned long)hdev); + tasklet_setup(&hdev->done_task, img_hash_done_task); + tasklet_setup(&hdev->dma_task, img_hash_dma_task); crypto_init_queue(&hdev->queue, IMG_HASH_QUEUE_LENGTH); From patchwork Thu Jan 7 12:29:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4552CC433E0 for ; Thu, 7 Jan 2021 12:31:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 196C023358 for ; Thu, 7 Jan 2021 12:31:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728111AbhAGMbg (ORCPT ); Thu, 7 Jan 2021 07:31:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728118AbhAGMbg (ORCPT ); Thu, 7 Jan 2021 07:31:36 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10C66C0612F5; Thu, 7 Jan 2021 04:30:55 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id j1so3414792pld.3; Thu, 07 Jan 2021 04:30:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1e1njK4JCLyF4BWRntmeMNLMXKX/535/WykRDF+9nqU=; b=hbZxd8GMbWMwunv97wfH2Jf1oJf/8UcNY6xBKZcNSEUqzpSUI65LKuKQrxS91lf3JW Bupw/mebNEqeQTlLLVwWk16hsX081CmCeM3mCGPFqAIt6Y15WaGH/KwDFlvfhr1Hgg9Z XmJtwwBRs5RusKIVtDfejCw5hq1vLWEe1lHia/3otyEyWTKYI3bUsoZQF2D5pI0ztNQy 0/6+Z3Om5i4sHkVm60WuZFrh8e9eyF3U8Mo1nCSfMgurTh2MkeWCP5UWfGjtMH2pbNlQ Pt9JtbYllg2QWQaoR9nfEhdPC6MM/gw25S4hDUm222XYCSreZw2frFc8N124MrS997zA oqyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1e1njK4JCLyF4BWRntmeMNLMXKX/535/WykRDF+9nqU=; b=nJsZgXJl58kihtvuLq5vsuKhOYDQ+cHnVAwhtkjA7/sC4WNGeEJbiC7sZPmbkqDpys pmv2V0mH9Yx0VA+A21ysLorPCQajQVkSyPnPjowt3sHy9rsRgXwdyeI2XzWoRXZnag7N prmTy2+lb0YTkZZNxgOLUAJ+D/TWFx7raa8lf72dM9FIynOv5oZYJYVZkMJssaRaqkak N0CEhmNECXD/pvIEnVGoetMWNlNNYhF0d2rP9hiAA3TIOmfD4U8zOvn73DeRCKLfRQ4n 96UPuhubt3oO5gh/2NS/Ks/oPmy9K5HH8UIFxriOJmajZ1nACNVIib9QM6Bnbyd3dSdC NODg== X-Gm-Message-State: AOAM53298L2bnAGQlxPdTGqCn2rMnapMqyLcykw4j2epBvhW+59VautZ JtEHjK2WZZ6yBL9ftjHGgFRNwOw8AoY= X-Google-Smtp-Source: ABdhPJxNswk3UqAPRQFOECWMZZXKETLsDLgMohWjq2tJwnnMR19IXzXOUsAVBJnz8yZ5/DQIIMxoDA== X-Received: by 2002:a17:90a:b90c:: with SMTP id p12mr8705424pjr.135.1610022654721; Thu, 07 Jan 2021 04:30:54 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:54 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 10/19] crypto: ixp4xx: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:35 +0530 Message-Id: <20210107122944.16363-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ixp4xx_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 8b0f17fc09fb..b783ab58d718 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -414,7 +414,7 @@ static void irqhandler(void *_unused) tasklet_schedule(&crypto_done_tasklet); } -static void crypto_done_action(unsigned long arg) +static void crypto_done_action(struct tasklet_struct *unused) { int i; @@ -497,7 +497,7 @@ static int init_ixp_crypto(struct device *dev) goto err; } qmgr_set_irq(RECV_QID, QUEUE_IRQ_SRC_NOT_EMPTY, irqhandler, NULL); - tasklet_init(&crypto_done_tasklet, crypto_done_action, 0); + tasklet_setup(&crypto_done_tasklet, crypto_done_action); qmgr_enable_irq(RECV_QID); return 0; From patchwork Thu Jan 7 12:29:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358375 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91584C433E6 for ; Thu, 7 Jan 2021 12:31:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58F862335A for ; Thu, 7 Jan 2021 12:31:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728233AbhAGMbo (ORCPT ); Thu, 7 Jan 2021 07:31:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728120AbhAGMbo (ORCPT ); Thu, 7 Jan 2021 07:31:44 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 034A4C0612F6; Thu, 7 Jan 2021 04:31:04 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id be12so3410232plb.4; Thu, 07 Jan 2021 04:31:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gZKtlD6nuAorTKG2PqNJjMaym8CBQGfY80Jr0aK5tbM=; b=ihmAn+zhB1dzY9ajMP9IqgYOfjz+RGnTRZG3ZHOZ7FR3EX0CffunXSTZFlwhb/jg74 0einqhCTxWXZj162rkBnw8DvPuXXz3qvhmtmL792PQcZo5zNZmobateQCGnaHzE3jgfl 0h186ObJTgRQwFLdyIBnVCChDjxYQ1bwKRDumLKF8R2sKu6Mq2Fkxla28spaFNoADkzA DUHOgK4ljuMEEEq7OUZH1Di001wUApJUP2A/LomsTXsIrtHP7ihBn/2Ey9uljy9W1vIv kPO5n28M+SeevCEJoq0/c4ZoAlq3JTnzBRPo7vdB83VGqKgWNFq8sLk9qCKQpFesCYvk mxhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gZKtlD6nuAorTKG2PqNJjMaym8CBQGfY80Jr0aK5tbM=; b=U1y/TgZu03bYvCfCnT4yWjxascvzMOVru6wDRIAme0R9q0egYUgfvBt/eCTdVVsxmv vlhS3keheWEUyO+/5qJe50Ncgb8i2CMVGCoVm8gcf8qAMuAsMqMFsf64LLEGpciXOPop 0zeex/C50zsN+qU8B6dw03MVL5rbLogpBY1/3dtHXyfXkeTf7nbdvr+rZKMtD7JhBZhq b3bXtHN8mKy2AwqUur2Ig2aPD5wvl2iNPCjO2DTngg/wuQscstOIdoX+B2d/7Fhxi+oX NSmwG22FBiiB88UJMF9JNAmHruKmiRqptt3yV2PFairxj9YPs/WVOIe0d8pRF6N1Z8gH OfJg== X-Gm-Message-State: AOAM531pOX5BZw1hsTem675qCkuoPzwFOhG+/Cr9DQEVW5KV4rSe0+yI rqDwejfT+Ca0wgkGE9bPSx0= X-Google-Smtp-Source: ABdhPJwNTDU7LUvvKiGzSLC1OK86iDlb1JeAhrXE/2gnq2C7Hehi2vNtCbMVLadxVc8HcEVvoIRCkw== X-Received: by 2002:a17:902:44e:b029:da:b944:b798 with SMTP id 72-20020a170902044eb02900dab944b798mr9099679ple.6.1610022663537; Thu, 07 Jan 2021 04:31:03 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:02 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 11/19] crypto: mediatek: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:36 +0530 Message-Id: <20210107122944.16363-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/mediatek/mtk-aes.c | 14 ++++++-------- drivers/crypto/mediatek/mtk-sha.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/mediatek/mtk-aes.c b/drivers/crypto/mediatek/mtk-aes.c index 7323066724c3..fa49bb5b043b 100644 --- a/drivers/crypto/mediatek/mtk-aes.c +++ b/drivers/crypto/mediatek/mtk-aes.c @@ -1080,16 +1080,16 @@ static struct aead_alg aes_gcm_alg = { }, }; -static void mtk_aes_queue_task(unsigned long data) +static void mtk_aes_queue_task(struct tasklet_struct *t) { - struct mtk_aes_rec *aes = (struct mtk_aes_rec *)data; + struct mtk_aes_rec *aes = from_tasklet(aes, t, queue_task); mtk_aes_handle_queue(aes->cryp, aes->id, NULL); } -static void mtk_aes_done_task(unsigned long data) +static void mtk_aes_done_task(struct tasklet_struct *t) { - struct mtk_aes_rec *aes = (struct mtk_aes_rec *)data; + struct mtk_aes_rec *aes = from_tasklet(aes, t, done_task); struct mtk_cryp *cryp = aes->cryp; mtk_aes_unmap(cryp, aes); @@ -1142,10 +1142,8 @@ static int mtk_aes_record_init(struct mtk_cryp *cryp) spin_lock_init(&aes[i]->lock); crypto_init_queue(&aes[i]->queue, AES_QUEUE_SIZE); - tasklet_init(&aes[i]->queue_task, mtk_aes_queue_task, - (unsigned long)aes[i]); - tasklet_init(&aes[i]->done_task, mtk_aes_done_task, - (unsigned long)aes[i]); + tasklet_setup(&aes[i]->queue_task, mtk_aes_queue_task); + tasklet_setup(&aes[i]->done_task, mtk_aes_done_task); } /* Link to ring0 and ring1 respectively */ diff --git a/drivers/crypto/mediatek/mtk-sha.c b/drivers/crypto/mediatek/mtk-sha.c index f55aacdafbef..c241762aa23b 100644 --- a/drivers/crypto/mediatek/mtk-sha.c +++ b/drivers/crypto/mediatek/mtk-sha.c @@ -1164,16 +1164,16 @@ static struct ahash_alg algs_sha384_sha512[] = { }, }; -static void mtk_sha_queue_task(unsigned long data) +static void mtk_sha_queue_task(struct tasklet_struct *t) { - struct mtk_sha_rec *sha = (struct mtk_sha_rec *)data; + struct mtk_sha_rec *sha = from_tasklet(sha, t, queue_task); mtk_sha_handle_queue(sha->cryp, sha->id - MTK_RING2, NULL); } -static void mtk_sha_done_task(unsigned long data) +static void mtk_sha_done_task(struct tasklet_struct *t) { - struct mtk_sha_rec *sha = (struct mtk_sha_rec *)data; + struct mtk_sha_rec *sha = from_tasklet(sha, t, done_task); struct mtk_cryp *cryp = sha->cryp; mtk_sha_unmap(cryp, sha); @@ -1219,10 +1219,8 @@ static int mtk_sha_record_init(struct mtk_cryp *cryp) spin_lock_init(&sha[i]->lock); crypto_init_queue(&sha[i]->queue, SHA_QUEUE_SIZE); - tasklet_init(&sha[i]->queue_task, mtk_sha_queue_task, - (unsigned long)sha[i]); - tasklet_init(&sha[i]->done_task, mtk_sha_done_task, - (unsigned long)sha[i]); + tasklet_setup(&sha[i]->queue_task, mtk_sha_queue_task); + tasklet_setup(&sha[i]->done_task, mtk_sha_done_task); } /* Link to ring2 and ring3 respectively */ From patchwork Thu Jan 7 12:29:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65B55C433E0 for ; Thu, 7 Jan 2021 12:31:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3364A2335A for ; Thu, 7 Jan 2021 12:31:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728120AbhAGMby (ORCPT ); Thu, 7 Jan 2021 07:31:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728118AbhAGMbx (ORCPT ); Thu, 7 Jan 2021 07:31:53 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A92F2C0612F8; Thu, 7 Jan 2021 04:31:13 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id x126so3767236pfc.7; Thu, 07 Jan 2021 04:31:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+2LJpncxdzSbb/JP/0XuErEHxZj6Pmh4iBBisr0kOG4=; b=RlLJQVTb/kJ2X/lk0UVDdHmWxXHFiudcMeEXcsJX48HfFWnkK2hHHDH4jbREnvdpq8 A7IDy/033Eb3hTMMjGOFVHTSHBtQff01avXlNN1c7j0Fk6uknAbCwzIFtI/kiXZpf7tl vRVWRmhkyL/7onpnKGQYZWqiuHfbIyphWsW1qxzs0PdJfPvymDEmOVAoo5UXPmkQYvse pr0smwosREu0XdbylCI8QYiZxCP759e3aDdrrA2z+uBjD3A0Hm8TORviR7q09Cq9s2dw oxQIwJCLr3+OCa7cOP6Cb8TuqoPkvQb8G+Z1C65Me9HV0JKrSCPR/Ew8IriwvGvpDc/r jbog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+2LJpncxdzSbb/JP/0XuErEHxZj6Pmh4iBBisr0kOG4=; b=DljNHKBleXV4I8/pvQHJDZVw/MX7pkHie0YicbED6sKIr6mCQN/pYUygVfQz+oFWtA oBLN8be7VZIcF5/Yo03oPaKIPWgVEURbRwUBbyUzbWGLe3Nr/sZJBeHsjRR81mGVRME8 CdVNKoZddW22rZkkujCgm49j/BLozC5jTDtaUEGPygGuXlxkpxLL8z18z4a1w10nOGd6 w6RUF5G+wWMIGqgN9ffoMfUVxvPMNzAeLrMEPeZEDzgIl6iMk3YE4Hn9Ad3vqUVz32+M t3KD3P/djjarx7IW00gxAlqAP1kXsjZNnVwFZ+17V8eleTVkhXmNv1SIbAIGNYvyfvaI dh+w== X-Gm-Message-State: AOAM532fRgIDtM24ahH3EuoVwWf9B5GOkTgZ2KsWCfi+Y7HDPyY/8iM/ tAKNqTnxg5W+SIcLDOrxtpw= X-Google-Smtp-Source: ABdhPJxuLJz16UeeguipMy8mp+65DdLPSfon9Rh/9LTN6jawH7dFlJSH+Q4qIn8TgHF6oV/ygT09nw== X-Received: by 2002:a63:d141:: with SMTP id c1mr1618625pgj.75.1610022673261; Thu, 07 Jan 2021 04:31:13 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:12 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 12/19] crypto: omap: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:37 +0530 Message-Id: <20210107122944.16363-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/omap-aes.c | 6 +++--- drivers/crypto/omap-des.c | 6 +++--- drivers/crypto/omap-sham.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index a45bdcf3026d..7e4223716620 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -503,9 +503,9 @@ static void omap_aes_copy_ivout(struct omap_aes_dev *dd, u8 *ivbuf) ((u32 *)ivbuf)[i] = omap_aes_read(dd, AES_REG_IV(dd, i)); } -static void omap_aes_done_task(unsigned long data) +static void omap_aes_done_task(struct tasklet_struct *t) { - struct omap_aes_dev *dd = (struct omap_aes_dev *)data; + struct omap_aes_dev *dd = from_tasklet(dd, t, done_task); pr_debug("enter done_task\n"); @@ -1151,7 +1151,7 @@ static int omap_aes_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_aes_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_aes_done_task); err = omap_aes_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index c9d38bcfd1c7..fddcfc3ba57b 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -594,9 +594,9 @@ static int omap_des_crypt_req(struct crypto_engine *engine, return omap_des_crypt_dma_start(dd); } -static void omap_des_done_task(unsigned long data) +static void omap_des_done_task(struct tasklet_struct *t) { - struct omap_des_dev *dd = (struct omap_des_dev *)data; + struct omap_des_dev *dd = from_tasklet(dd, t, done_task); int i; pr_debug("enter done_task\n"); @@ -1011,7 +1011,7 @@ static int omap_des_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_des_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_des_done_task); err = omap_des_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index ae0d320d3c60..5dc7e23879a5 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1725,9 +1725,9 @@ static struct ahash_alg algs_sha384_sha512[] = { }, }; -static void omap_sham_done_task(unsigned long data) +static void omap_sham_done_task(struct tasklet_struct *t) { - struct omap_sham_dev *dd = (struct omap_sham_dev *)data; + struct omap_sham_dev *dd = from_tasklet(dd, t, done_task); int err = 0; dev_dbg(dd->dev, "%s: flags=%lx\n", __func__, dd->flags); @@ -2084,7 +2084,7 @@ static int omap_sham_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dd); INIT_LIST_HEAD(&dd->list); - tasklet_init(&dd->done_task, omap_sham_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_sham_done_task); crypto_init_queue(&dd->queue, OMAP_SHAM_QUEUE_LENGTH); err = (dev->of_node) ? omap_sham_get_res_of(dd, dev, &res) : From patchwork Thu Jan 7 12:29:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358374 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A001C433E0 for ; Thu, 7 Jan 2021 12:32:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D004F2335A for ; Thu, 7 Jan 2021 12:32:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728118AbhAGMcD (ORCPT ); Thu, 7 Jan 2021 07:32:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728108AbhAGMcC (ORCPT ); Thu, 7 Jan 2021 07:32:02 -0500 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87BE8C0612F9; Thu, 7 Jan 2021 04:31:22 -0800 (PST) Received: by mail-pj1-x102d.google.com with SMTP id j13so3595458pjz.3; Thu, 07 Jan 2021 04:31:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u19NxDApfMXx+Y8pGP/iF30yq+dZf2FG4hiZfFrFBcE=; b=V1vfZ4x5Wfxkd5zVPqFj8CmcX2UJQPnL4eVh0PHLtBP/O+bnLI8npKqfe0WWNSSjtp jVxjrpT9ITx0wMYv5LWSNWZS3ShZSAfyxkkqN24COtQArayItJ6AlxcqJCy+ovUEPBUm UuCmlzpkQ9XvyBl5Xmaf5dx1rxyduiiXh76svNgHpxKfPWF2l+KPWbirwAsIO6vB+NC9 K7mzRzbHYU4rIdO8dK7KhWZE5raGjBY0ImjknQ0UlJsw1JelcWm+BkAaVDsd9YEK7A/d R9xWE7pg8dyRY6eSOAX9g3uHebqMlbowmSLLwePMyuXP/C8SOj69hIypk8SXS7IW/M1k g/NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u19NxDApfMXx+Y8pGP/iF30yq+dZf2FG4hiZfFrFBcE=; b=YRdDd1g7YCMRosnWL7+nUOODwrnY9ol55K/vtVGTevA8oMZqCANWIfP4XuNYhIre63 C7Vkq1ArlGI/1qexXNZAi8VkjhLwtO2Ohxo6aW+jJmX9scHQmyBmx+Xrk6jlIT/Kz9lZ LLSAkuaA8DsI5AP22ULJ117wVmRfLhHntQek1Dr+62bRvj3iOcePfsW8QqqGcOIEOAXp LR0EkzfawcjWfK3zBNiyC10qdNIsunOayKVX7i3Ha+d+8MRj8RvnbDEWp/vDLbCEzwDP 0JTBqs/zkIcTlVXHNlzuzqBzW++XHbKzLTOTiDm3ytBdB9nyQzHBlJPTvVNTBEqHaat7 Nrpg== X-Gm-Message-State: AOAM533PLFlo1oW0QT8bBlx8B/mSqXlY19IAMY2DAYB/d8M8nzSxISbt MZAfkZNALW0KX73Fx6aqG/0= X-Google-Smtp-Source: ABdhPJxoWvVixLhb4AqWe/Ovm28z3v0vAZuqSGnKpO54YLN6o9l6jNS4i24bVdxlg+M1aNnBhG8Cfg== X-Received: by 2002:a17:90a:aa85:: with SMTP id l5mr8154475pjq.230.1610022682199; Thu, 07 Jan 2021 04:31:22 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:21 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 13/19] crypto: picoxcell: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:38 +0530 Message-Id: <20210107122944.16363-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/picoxcell_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index 84f9c16d984c..e64fa3e22521 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c @@ -1137,9 +1137,9 @@ static int spacc_req_submit(struct spacc_req *req) return spacc_ablk_submit(req); } -static void spacc_spacc_complete(unsigned long data) +static void spacc_spacc_complete(struct tasklet_struct *t) { - struct spacc_engine *engine = (struct spacc_engine *)data; + struct spacc_engine *engine = from_tasklet(engine, t, complete); struct spacc_req *req, *tmp; unsigned long flags; LIST_HEAD(completed); @@ -1649,8 +1649,7 @@ static int spacc_probe(struct platform_device *pdev) return -ENXIO; } - tasklet_init(&engine->complete, spacc_spacc_complete, - (unsigned long)engine); + tasklet_setup(&engine->complete, spacc_spacc_complete); ret = devm_add_action(&pdev->dev, spacc_tasklet_kill, &engine->complete); From patchwork Thu Jan 7 12:29:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 487A6C433E6 for ; Thu, 7 Jan 2021 12:32:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0AFFE2335A for ; Thu, 7 Jan 2021 12:32:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728108AbhAGMcM (ORCPT ); Thu, 7 Jan 2021 07:32:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728103AbhAGMcL (ORCPT ); Thu, 7 Jan 2021 07:32:11 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B491C0612F4; Thu, 7 Jan 2021 04:31:31 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id w6so3781172pfu.1; Thu, 07 Jan 2021 04:31:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OtP2Q83ql8pOj4Inc9JGr9jKNcuTQBZobhx5BHnHH/g=; b=AkfzBEI+UUoMh9Ko+yd3VvH5E3bzqEZ2e0iKWIz8ydxDQb2KcdrVyzFf/SnFuoM40B /BxU8yejC7FVGA/xoJy8SGY8xibYBMKUvufTewNI+jI1xY72bEzIlms+naGSt4PDDskE 9IYlm8Pvh0cybTCTXNmJ3F1nw6w5k4vgoAp1hSsxvOGskwItPxDji0rj4nci9aqKIGk3 bjLqEALX/8HTXLMunS1zH+VicqiE7hJX9yl6K/PnxaQeZTCQgWAV4qDEJSpfxVnBE6IB 44vEV4/WUgTYK7uV7GIhIw4XfjkPOQfMyTL7s7WmXv7zVapcY8WjEqV8/X4zR3JTRopE PHjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OtP2Q83ql8pOj4Inc9JGr9jKNcuTQBZobhx5BHnHH/g=; b=N53FDLJAh2R5vy08sPqiaPSz2HRAnOAGnx/s/4Vg112Sa4Avll0FBNmu0EnKPMOd2c /AGPF4E/aQOaToOkx5SI4LYLCqB9jVxkuT+Q6tJrkELMbS1g53m+H5M/lhVSA9ozCMeU rYh6118hseaJCMEsCUjpKGxbZcGJwW4uKe6+bkSfQ6/lU4DXnADX3zh2zp5eqHZM366T M6ekeJ+WjgjbsjSUlvAae7ZvpGGz2fNXfnwF47pQhW+T5OIdAictc1Mup/RxHZKuYZmG /bwPCZy3RqzLsmfktrASU7yQFM2rBUezH/5SR4exrzj6XJgeTvm9pD/eQxYzmSg1sBJz hp7w== X-Gm-Message-State: AOAM531Ar58EBkoE5bxkYyv6hTdsTAH+UeaqWGm/SJ9ShGFRB2uuSThM oBm/YSz5f+CwevOesUmQOuQ= X-Google-Smtp-Source: ABdhPJz2YO0tbVqsWC+LMReB1B53opOdDT4noQnSd0XMYLIq3t0pRPywkvmF8DRHn/bzgAR09QGlXA== X-Received: by 2002:aa7:85d8:0:b029:19e:610e:1974 with SMTP id z24-20020aa785d80000b029019e610e1974mr8620522pfn.21.1610022691084; Thu, 07 Jan 2021 04:31:31 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:30 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 14/19] crypto: qat: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:39 +0530 Message-Id: <20210107122944.16363-11-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/qat/qat_common/adf_isr.c | 5 ++--- drivers/crypto/qat/qat_common/adf_sriov.c | 10 +++++----- drivers/crypto/qat/qat_common/adf_transport.c | 4 ++-- .../crypto/qat/qat_common/adf_transport_internal.h | 2 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 11 +++++------ 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_isr.c b/drivers/crypto/qat/qat_common/adf_isr.c index c45853463530..bb5251d587eb 100644 --- a/drivers/crypto/qat/qat_common/adf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_isr.c @@ -244,9 +244,8 @@ static int adf_setup_bh(struct adf_accel_dev *accel_dev) int i; for (i = 0; i < hw_data->num_banks; i++) - tasklet_init(&priv_data->banks[i].resp_handler, - adf_response_handler, - (unsigned long)&priv_data->banks[i]); + tasklet_setup(&priv_data->banks[i].resp_handler, + adf_response_handler); return 0; } diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c index 8c822c2861c2..591537399edb 100644 --- a/drivers/crypto/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/qat/qat_common/adf_sriov.c @@ -24,9 +24,10 @@ static void adf_iov_send_resp(struct work_struct *work) kfree(pf2vf_resp); } -static void adf_vf2pf_bh_handler(void *data) +static void adf_vf2pf_bh_handler(struct tasklet_struct *t) { - struct adf_accel_vf_info *vf_info = (struct adf_accel_vf_info *)data; + struct adf_accel_vf_info *vf_info = + from_tasklet(vf_info, t, vf2pf_bh_tasklet); struct adf_pf2vf_resp *pf2vf_resp; pf2vf_resp = kzalloc(sizeof(*pf2vf_resp), GFP_ATOMIC); @@ -52,9 +53,8 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev) vf_info->accel_dev = accel_dev; vf_info->vf_nr = i; - tasklet_init(&vf_info->vf2pf_bh_tasklet, - (void *)adf_vf2pf_bh_handler, - (unsigned long)vf_info); + tasklet_setup(&vf_info->vf2pf_bh_tasklet, + adf_vf2pf_bh_handler); mutex_init(&vf_info->pf2vf_lock); ratelimit_state_init(&vf_info->vf2pf_ratelimit, DEFAULT_RATELIMIT_INTERVAL, diff --git a/drivers/crypto/qat/qat_common/adf_transport.c b/drivers/crypto/qat/qat_common/adf_transport.c index 5a7030acdc33..03dcbeac25d7 100644 --- a/drivers/crypto/qat/qat_common/adf_transport.c +++ b/drivers/crypto/qat/qat_common/adf_transport.c @@ -324,9 +324,9 @@ static void adf_ring_response_handler(struct adf_etr_bank_data *bank) adf_handle_response(&bank->rings[i]); } -void adf_response_handler(uintptr_t bank_addr) +void adf_response_handler(struct tasklet_struct *t) { - struct adf_etr_bank_data *bank = (void *)bank_addr; + struct adf_etr_bank_data *bank = from_tasklet(bank, t, resp_handler); struct adf_hw_csr_ops *csr_ops = GET_CSR_OPS(bank->accel_dev); /* Handle all the responses and reenable IRQs */ diff --git a/drivers/crypto/qat/qat_common/adf_transport_internal.h b/drivers/crypto/qat/qat_common/adf_transport_internal.h index 501bcf0f1809..aaec7b2bc220 100644 --- a/drivers/crypto/qat/qat_common/adf_transport_internal.h +++ b/drivers/crypto/qat/qat_common/adf_transport_internal.h @@ -46,7 +46,7 @@ struct adf_etr_data { struct dentry *debug; }; -void adf_response_handler(uintptr_t bank_addr); +void adf_response_handler(struct tasklet_struct *t); #ifdef CONFIG_DEBUG_FS #include int adf_bank_debugfs_add(struct adf_etr_bank_data *bank); diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c index 38d316a42ba6..1d0ff58fd9b5 100644 --- a/drivers/crypto/qat/qat_common/adf_vf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c @@ -68,9 +68,10 @@ static void adf_dev_stop_async(struct work_struct *work) kfree(stop_data); } -static void adf_pf2vf_bh_handler(void *data) +static void adf_pf2vf_bh_handler(struct tasklet_struct *t) { - struct adf_accel_dev *accel_dev = data; + struct adf_accel_dev *accel_dev = from_tasklet(accel_dev, t, + vf.pf2vf_bh_tasklet); struct adf_hw_device_data *hw_data = accel_dev->hw_device; struct adf_bar *pmisc = &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)]; @@ -138,8 +139,7 @@ static void adf_pf2vf_bh_handler(void *data) static int adf_setup_pf2vf_bh(struct adf_accel_dev *accel_dev) { - tasklet_init(&accel_dev->vf.pf2vf_bh_tasklet, - (void *)adf_pf2vf_bh_handler, (unsigned long)accel_dev); + tasklet_setup(&accel_dev->vf.pf2vf_bh_tasklet, adf_pf2vf_bh_handler); mutex_init(&accel_dev->vf.vf2pf_lock); return 0; @@ -216,8 +216,7 @@ static int adf_setup_bh(struct adf_accel_dev *accel_dev) { struct adf_etr_data *priv_data = accel_dev->transport; - tasklet_init(&priv_data->banks[0].resp_handler, adf_response_handler, - (unsigned long)priv_data->banks); + tasklet_setup(&priv_data->banks[0].resp_handler, adf_response_handler); return 0; } From patchwork Thu Jan 7 12:29:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CA27C433DB for ; Thu, 7 Jan 2021 12:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B4C823359 for ; Thu, 7 Jan 2021 12:32:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728103AbhAGMcU (ORCPT ); Thu, 7 Jan 2021 07:32:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726294AbhAGMcU (ORCPT ); Thu, 7 Jan 2021 07:32:20 -0500 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2015FC0612F5; Thu, 7 Jan 2021 04:31:40 -0800 (PST) Received: by mail-pg1-x52d.google.com with SMTP id n25so4755469pgb.0; Thu, 07 Jan 2021 04:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gQh2IwNxftbR34HfI9l3nT7vPGQ8lmvW4dX0b9EAc7Y=; b=dGL5mWBcvHj+vnm8AjPqTntimPrEpTab2oHNsQsqlAP4yzhRCgol10ddlQIvkn9d82 MLJ0MLh7mDWgvRyIEPRVqdGXqg7s9ab3x42Fsln6gs+5WzcEecWA6SVU8egl/Fb2FKtK sZgzq5Dvj7PqobU9umm8h3OyP0xgxLanlAv4AbOpuarLKRGZshQtqEJWHWPQKNeQF/o6 w7D2oDO2FZrhKFjEgJP/vrw/Rtvr3F0Tpd0nty03wEGe9bmOK3jWo5pFcuiWAlMDsRco vmlzTBAnx4s/Krb3Di3bXmQ+yBl+I7KYs9ytlPK4k0aGmu3GCSerCTNwmgEFjr9h8Woz 66Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gQh2IwNxftbR34HfI9l3nT7vPGQ8lmvW4dX0b9EAc7Y=; b=bO/cGlfw7ol8qBteGshaNt+W64EfnjVIguGExs0qy2MDThjk8bW50Xs08RkZW1W4Sh aHWEu2JQwZyO7mhPt2KKj7zAkcS98KfewlRtdIT0CmgPRL/ZkOgD1gDL065KJ2e6MP1G RjYi3Z8tB+8d5ftKmHdzxqW7txR6lMAaGhdgovZ59SolsjDzf7gXdddOK6aioXtIYogY jm0CQLtWfuYd+SBdvCGLfagsHPPR3P8i/me56UUFKCPDJUoPOJV0dno35xzqttkDDvWC DOEhVfXvI3ayZ4C5y8GpGIEyNtyefmoeISSIVTYgIKEDFvtgWaZH3/Cy95b5A92xaSay EyqQ== X-Gm-Message-State: AOAM530I1961IKae+Ze2/4Zu6YJ+c+TCKtWxyrXNfR9HM330+E8J2102 H+wRTn4BUhldq8zE/Ul7nNhLPrS24N0= X-Google-Smtp-Source: ABdhPJz2CQX6v8/ZMQe6yTXb9e0CjOlBzYMMgjcHw7ulFh1JTqqcMFPoU5EF0ZbAkB/+YlsC8YdOFA== X-Received: by 2002:a62:874a:0:b029:19e:6e03:cfc3 with SMTP id i71-20020a62874a0000b029019e6e03cfc3mr8250704pfe.67.1610022699768; Thu, 07 Jan 2021 04:31:39 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:39 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 15/19] crypto: qce: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:40 +0530 Message-Id: <20210107122944.16363-12-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/qce/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 80b75085c265..374281e9d6b9 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -116,9 +116,9 @@ static int qce_handle_queue(struct qce_device *qce, return ret; } -static void qce_tasklet_req_done(unsigned long data) +static void qce_tasklet_req_done(struct tasklet_struct *t) { - struct qce_device *qce = (struct qce_device *)data; + struct qce_device *qce = from_tasklet(qce, t, done_tasklet); struct crypto_async_request *req; unsigned long flags; @@ -235,8 +235,7 @@ static int qce_crypto_probe(struct platform_device *pdev) goto err_clks; spin_lock_init(&qce->lock); - tasklet_init(&qce->done_tasklet, qce_tasklet_req_done, - (unsigned long)qce); + tasklet_setup(&qce->done_tasklet, qce_tasklet_req_done); crypto_init_queue(&qce->queue, QCE_QUEUE_LENGTH); qce->async_req_enqueue = qce_async_request_enqueue; From patchwork Thu Jan 7 12:29:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359168 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECB8AC433E9 for ; Thu, 7 Jan 2021 12:32:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A35CF23356 for ; Thu, 7 Jan 2021 12:32:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726768AbhAGMca (ORCPT ); Thu, 7 Jan 2021 07:32:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726294AbhAGMc3 (ORCPT ); Thu, 7 Jan 2021 07:32:29 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AA19C0612F6; Thu, 7 Jan 2021 04:31:49 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id x126so3768063pfc.7; Thu, 07 Jan 2021 04:31:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JRk8t1M4XXjPEk7oyhWaY6rs5Sl9RScV/nWFL0Tu+/w=; b=kYC9dTtWAXY4xKQ/GQ4YLzK0W3XwA/v9tBfEw1XfRdYS2voXTYlj42FmwN8IFu5Bfv JMQMpaQ36VXpv66DlJg3QqoQ4lJ+w6o9RUwX+2gf4WQEnAXnLa9yv0AeaaGapgFX2Wzu 42oR762tRp1x4BgfjO0MazixRgcE8XcydZMOucaAGjhtcrfEgRHl4cZBdtKpVxddNwhf 180qtNIApokfroeh0cNuMVn2VZs98TX8E2dpqj2a/osygcmHAKUg+WWTqLpmffGLDfJG TBBo2IvbLVQVcBx23WQBH5JTqhtWgYwZBLt55qL3vLmVL+PDq7Su3mMWiJhIjVlfCTLN zLDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JRk8t1M4XXjPEk7oyhWaY6rs5Sl9RScV/nWFL0Tu+/w=; b=MGMDPB+Itcq5Cy8pID5+Q73j8Gl12PrQzHhJAMaoQY/vRXRZ9juAniDutjtpr9iwv3 bso4qz4DTelblEqXcximcVTCfpqnQlsSDyApbK8ImXmafm4eo7JhIlzmi0CihKcBgrue fyDmIzw3WqlxKM3xhw0O0xbnhHUtxBWCQrkT1S0o+dXjHFT5JfJuyIh3cQ6wsn7vbCcA 5g5+l0Gk2RdwHVjz40jrxA6qbJaR8+0j12kpFmijdOgyHTTCRZNcrA1IdX8vTxlziOh7 0sHmqQi8n7UZFXh85zjqBsIuKp7NE7e04aVe1o5li5fc1CdMD4Vd7LFl/CKVXGpRNbdB 06iQ== X-Gm-Message-State: AOAM5313K9Eb4a2AVnZgVXTFhj6XRPRySA18CgYYYqeYKBWTvMVhzH3v jMuaBx7lzAmAKtsvmU704qA= X-Google-Smtp-Source: ABdhPJyu3WtVMoxBM4D25J3ONFDYaaGBZCccHMGw5dFAMa5AazfuQ4DJ1h3Q7vYBYDehN21EQTwdfw== X-Received: by 2002:a65:6152:: with SMTP id o18mr1641272pgv.392.1610022709048; Thu, 07 Jan 2021 04:31:49 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:48 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 16/19] crypto: rockchip: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:41 +0530 Message-Id: <20210107122944.16363-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/rockchip/rk3288_crypto.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c index 35d73061d156..af6ad9f49009 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -201,9 +201,9 @@ static int rk_crypto_enqueue(struct rk_crypto_info *dev, return ret; } -static void rk_crypto_queue_task_cb(unsigned long data) +static void rk_crypto_queue_task_cb(struct tasklet_struct *T) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, queue_task); struct crypto_async_request *async_req, *backlog; unsigned long flags; int err = 0; @@ -231,9 +231,9 @@ static void rk_crypto_queue_task_cb(unsigned long data) dev->complete(dev->async_req, err); } -static void rk_crypto_done_task_cb(unsigned long data) +static void rk_crypto_done_task_cb(struct tasklet_struct *t) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, done_task); if (dev->err) { dev->complete(dev->async_req, dev->err); @@ -389,10 +389,8 @@ static int rk_crypto_probe(struct platform_device *pdev) crypto_info->dev = &pdev->dev; platform_set_drvdata(pdev, crypto_info); - tasklet_init(&crypto_info->queue_task, - rk_crypto_queue_task_cb, (unsigned long)crypto_info); - tasklet_init(&crypto_info->done_task, - rk_crypto_done_task_cb, (unsigned long)crypto_info); + tasklet_setup(&crypto_info->queue_task, rk_crypto_queue_task_cb); + tasklet_setup(&crypto_info->done_task, rk_crypto_done_task_cb); crypto_init_queue(&crypto_info->queue, 50); crypto_info->enable_clk = rk_crypto_enable_clk; From patchwork Thu Jan 7 12:29:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 032C8C433DB for ; Thu, 7 Jan 2021 12:32:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4A1E23359 for ; Thu, 7 Jan 2021 12:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727749AbhAGMck (ORCPT ); Thu, 7 Jan 2021 07:32:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726294AbhAGMcj (ORCPT ); Thu, 7 Jan 2021 07:32:39 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CBAEC0612F8; Thu, 7 Jan 2021 04:31:58 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id e2so3392567plt.12; Thu, 07 Jan 2021 04:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hdFxs07OBJ0o+UoENy6opg4NHXCcbJpiwkpmIdQiwws=; b=dQn+QrXHQpOycT6rbO+tf/VR/2QMy4WJQF4X1T/636no6mAkXVAUjrvWMo2nT3dhFS MRRo62EKaGJGptO13DIwa9Vfw1/KvufSuLeEwv0p+z6zizrGznfJEWjEMmUYfoKXa5av vaNh0FRL0qWbKfl2tWLS12tIf0FIF9NcCzWZmVgwNXTNPnU+q7TYDy8xjYu6yqUln3Xu consEYNhfD0raTk6uE5r5k4ZmRqPEPFhYDR3tmSOElpVw4P6ZDKVtdlw8DoACyY0M+dK D++6FYanSQwP8nPSDOjL1iy35Zd3R1kjHN7FknwJFVRwqmtIFwRRYb5R8MOuyUqhU4O2 2GbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hdFxs07OBJ0o+UoENy6opg4NHXCcbJpiwkpmIdQiwws=; b=CJdZ7BRoDRn89B5tc6iFlfvzcs23nzJKKJB72N4kz1X/1LpJlvZytkLFqc1wu5SlEA Zi2/5p7EBdMnHI4VcvT4E8q86yNMHZ4ZRkzXA1OGllXRI7qQWwRKFyWX85qljFeq1a5r Vhi3facp0FLg/ymaxLFeP6sRUyyiQw8QXY5qh+aZW0OK9aqR23RDpkRjMvc4hRWO7KB6 GYp1hxOBQT/Gh75UhltkLzXeZjUEKV4YWTlb7IM4GJlK/grG9PiNOCHvzIX8hB8hL0dw NQNHTVmfFM+1i8VOEzyTvLh5fNzP7J9k4zChDk/QkxvVkGdvTnKf4A2hSqnIDpU5j/gf gI4Q== X-Gm-Message-State: AOAM531bnhA/o4dPWnQH5i70E4Yle4L9rMEOxQibzjHOXaFxFkHL/KFf f+oMXhOeyiTPkBs4kWaynds= X-Google-Smtp-Source: ABdhPJzM7buCkj+xCGO+fl9i/Vq0V/mCKApgwiynjVFCmVMVTl6IZTP5hTcXLXfj7QsK6v7+eTgE8g== X-Received: by 2002:a17:902:c195:b029:db:c725:2522 with SMTP id d21-20020a170902c195b02900dbc7252522mr8855200pld.83.1610022718182; Thu, 07 Jan 2021 04:31:58 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:57 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 17/19] crypto: s5p: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:42 +0530 Message-Id: <20210107122944.16363-14-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Acked-by: Krzysztof Kozlowski Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/s5p-sss.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 682c8a450a57..128512a365e1 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -1445,9 +1445,9 @@ static int s5p_hash_handle_queue(struct s5p_aes_dev *dd, * s5p_hash_tasklet_cb() - hash tasklet * @data: ptr to s5p_aes_dev */ -static void s5p_hash_tasklet_cb(unsigned long data) +static void s5p_hash_tasklet_cb(struct tasklet_struct *t) { - struct s5p_aes_dev *dd = (struct s5p_aes_dev *)data; + struct s5p_aes_dev *dd = from_tasklet(dd, t, hash_tasklet); if (!test_bit(HASH_FLAGS_BUSY, &dd->hash_flags)) { s5p_hash_handle_queue(dd, NULL); @@ -1975,9 +1975,9 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode) s5p_aes_complete(req, err); } -static void s5p_tasklet_cb(unsigned long data) +static void s5p_tasklet_cb(struct tasklet_struct *t) { - struct s5p_aes_dev *dev = (struct s5p_aes_dev *)data; + struct s5p_aes_dev *dev = from_tasklet(dev, t, tasklet); struct crypto_async_request *async_req, *backlog; struct s5p_aes_reqctx *reqctx; unsigned long flags; @@ -2258,7 +2258,7 @@ static int s5p_aes_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pdata); s5p_dev = pdata; - tasklet_init(&pdata->tasklet, s5p_tasklet_cb, (unsigned long)pdata); + tasklet_setup(&pdata->tasklet, s5p_tasklet_cb); crypto_init_queue(&pdata->queue, CRYPTO_QUEUE_LEN); for (i = 0; i < ARRAY_SIZE(algs); i++) { @@ -2268,8 +2268,7 @@ static int s5p_aes_probe(struct platform_device *pdev) } if (pdata->use_hash) { - tasklet_init(&pdata->hash_tasklet, s5p_hash_tasklet_cb, - (unsigned long)pdata); + tasklet_setup(&pdata->hash_tasklet, s5p_hash_tasklet_cb); crypto_init_queue(&pdata->hash_queue, SSS_HASH_QUEUE_LENGTH); for (hash_i = 0; hash_i < ARRAY_SIZE(algs_sha1_md5_sha256); From patchwork Thu Jan 7 12:29:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 359167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B2A6C433DB for ; Thu, 7 Jan 2021 12:32:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F96B23370 for ; Thu, 7 Jan 2021 12:32:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728296AbhAGMcs (ORCPT ); Thu, 7 Jan 2021 07:32:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728293AbhAGMcs (ORCPT ); Thu, 7 Jan 2021 07:32:48 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C2CFC0612F9; Thu, 7 Jan 2021 04:32:08 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id n7so4752073pgg.2; Thu, 07 Jan 2021 04:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FGU6XdrM5ip9qPogsEZz38Pcqw7Ofqtd00r2eJGcshk=; b=lYk3ZavHMJgM8Ipk8OB7Ok0ZGlnIVM/LIbC6sQ27jQ08uw235EsHYU3NCmQQh64oic LZapX+bK6uFsiDAhbqGoeYXVQj0mpyRmaSCFyzvFBZPJn8dpl6ox5aYut2p10n6K3RZf z83CbGkfr2xLxUXj+o4nXiEWQGyqqkkEEBxIsQweg4H2SHQuimMbEg4t0m8qNoXqB18Z FOYQfY4pZdrCQc5jrwNEe7+q0FUmtkhA5IeSfK2WeQWAHPiCZQ6X+8uDfdI2QMZcN2e4 7Ae7rB46jMewbimo9JzWtX4Wc6fCsZm0gRoo/+K0pXvr48PuIasJpcErYSjrGpNmGv/o g00g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FGU6XdrM5ip9qPogsEZz38Pcqw7Ofqtd00r2eJGcshk=; b=OYuMJUy89DB5t9SDBQc11VV31BJ4Hdecx4iMM4uqJanPnM34dPF8AH13lCWUN7G6Cs Aw4PET1rvd3MXK01HEZWlbsvcVKTjLJGOKC+2bOaDnXkv5celwI16jCvM0zv9op22TGU OZUv7ZmAypTGRa1hvvOX+XNOd8gBjP9bBDT1tHHltrvGu0qbvHpeCt4iVy4zmYJLEPsG PR3qSf8rvOhQot5mNdQDMHn3qtj1A1n9sYD9ALmz8IZUoI4yofhqz3igsBp2cX1GJqY8 z3Mwq3XKjpI5zSOweJ6YWfK7AAQZZ5dZixjHT/Lvy1zCJ5QnBJPvPKjF43px5SMrN2IJ SonA== X-Gm-Message-State: AOAM533syn++mqIIUSYcxg/NtGFGVCdPnY6WImT2JHqKM/8e3EpV2V4H Y7v1OiDGzTbXkE9PlUqVbOE= X-Google-Smtp-Source: ABdhPJylju+uMXysoljSokY20FN0SxpzIZsNXLjSsMk0NvlXPGCGvW2caIXxbPVqNspfC8frkKm4nw== X-Received: by 2002:a63:f044:: with SMTP id s4mr1585524pgj.355.1610022727745; Thu, 07 Jan 2021 04:32:07 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:32:07 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais , Romain Perier Subject: [PATCH v2 18/19] crypto: talitos: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:43 +0530 Message-Id: <20210107122944.16363-15-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/talitos.c | 42 ++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 4fd85f31630a..be4f7dd810fd 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -403,10 +403,11 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch) * process completed requests for channels that have done status */ #define DEF_TALITOS1_DONE(name, ch_done_mask) \ -static void talitos1_done_##name(unsigned long data) \ +static void talitos1_done_##name(struct tasklet_struct *t) \ { \ - struct device *dev = (struct device *)data; \ - struct talitos_private *priv = dev_get_drvdata(dev); \ + struct talitos_private *priv = from_tasklet(priv, t, \ + done_task[0]); \ + struct device *dev = priv->dev; \ unsigned long flags; \ \ if (ch_done_mask & 0x10000000) \ @@ -429,11 +430,12 @@ static void talitos1_done_##name(unsigned long data) \ DEF_TALITOS1_DONE(4ch, TALITOS1_ISR_4CHDONE) DEF_TALITOS1_DONE(ch0, TALITOS1_ISR_CH_0_DONE) -#define DEF_TALITOS2_DONE(name, ch_done_mask) \ -static void talitos2_done_##name(unsigned long data) \ +#define DEF_TALITOS2_DONE(name, ch_done_mask, tasklet_idx) \ +static void talitos2_done_##name(struct tasklet_struct *t) \ { \ - struct device *dev = (struct device *)data; \ - struct talitos_private *priv = dev_get_drvdata(dev); \ + struct talitos_private *priv = from_tasklet(priv, t, \ + done_task[tasklet_idx]); \ + struct device *dev = priv->dev; \ unsigned long flags; \ \ if (ch_done_mask & 1) \ @@ -453,10 +455,10 @@ static void talitos2_done_##name(unsigned long data) \ spin_unlock_irqrestore(&priv->reg_lock, flags); \ } -DEF_TALITOS2_DONE(4ch, TALITOS2_ISR_4CHDONE) -DEF_TALITOS2_DONE(ch0, TALITOS2_ISR_CH_0_DONE) -DEF_TALITOS2_DONE(ch0_2, TALITOS2_ISR_CH_0_2_DONE) -DEF_TALITOS2_DONE(ch1_3, TALITOS2_ISR_CH_1_3_DONE) +DEF_TALITOS2_DONE(4ch, TALITOS2_ISR_4CHDONE, 0) +DEF_TALITOS2_DONE(ch0, TALITOS2_ISR_CH_0_DONE, 0) +DEF_TALITOS2_DONE(ch0_2, TALITOS2_ISR_CH_0_2_DONE, 0) +DEF_TALITOS2_DONE(ch1_3, TALITOS2_ISR_CH_1_3_DONE, 1) /* * locate current (offending) descriptor @@ -3386,23 +3388,17 @@ static int talitos_probe(struct platform_device *ofdev) if (has_ftr_sec1(priv)) { if (priv->num_channels == 1) - tasklet_init(&priv->done_task[0], talitos1_done_ch0, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos1_done_ch0); else - tasklet_init(&priv->done_task[0], talitos1_done_4ch, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos1_done_4ch); } else { if (priv->irq[1]) { - tasklet_init(&priv->done_task[0], talitos2_done_ch0_2, - (unsigned long)dev); - tasklet_init(&priv->done_task[1], talitos2_done_ch1_3, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_ch0_2); + tasklet_setup(&priv->done_task[1], talitos2_done_ch1_3); } else if (priv->num_channels == 1) { - tasklet_init(&priv->done_task[0], talitos2_done_ch0, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_ch0); } else { - tasklet_init(&priv->done_task[0], talitos2_done_4ch, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_4ch); } } From patchwork Thu Jan 7 12:29:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 358371 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EAF7C433E6 for ; Thu, 7 Jan 2021 12:32:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6ABD723359 for ; Thu, 7 Jan 2021 12:32:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728092AbhAGMc6 (ORCPT ); Thu, 7 Jan 2021 07:32:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727773AbhAGMc6 (ORCPT ); Thu, 7 Jan 2021 07:32:58 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F41B5C0612F4; Thu, 7 Jan 2021 04:32:17 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id y8so3403367plp.8; Thu, 07 Jan 2021 04:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nmGD8HgPe/79+tkqFpZtuKTtNUxMt+0Wii+rdB2TPJ0=; b=S4LNIh9R6yyfuQUC+97w6+ddLUmLZts28spXG4s3H2FtN63hu9uKU4xyqyNAaURVtl MrEoseabVLnbPwm4szc+NBo3o6mQ6oNDvq79kNnzMzf+eSGD3U53lSioAf2cU0sTVx6d f3DTuXE5WYhBTPbycCxa6p3Em5hFNd/hzmb8ZOvDpGBmqzWZNyCnHDqqjt72U4HtEQ2h 9lkZqR+IabZBTkSqHXDQqAaLkI0A/EPMfO0SUQutv1gLXBlPX5KENzoKX5gxKHYGxuvY Rs0TWa9WbyQmSdqmJsJ5qlA9aTFN+w2bppat+Roha+o29T2fcaL0dmRWmf/sBmG9IbnS TGmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nmGD8HgPe/79+tkqFpZtuKTtNUxMt+0Wii+rdB2TPJ0=; b=EReAc5J3ISNB8QTOgjRnDuMer83PeSFTlSPXhkInpE0c7ou2VGV2TvxYeOVBmf9uXc 0dhhvWnWFPxKXKUWW/LMW29msdhKr6xuzGEozw5jSMsmtp3vGRryAqUV56t+At54RRud YJAlzuOou2n6WlAqmxNetD8t4Z3bY8BaQMO/KQey6ElPSGv6E6y7seL1fKlGeg/1K2uZ 3KtHP9TY3Gx7VHqSnYLLPzJGppeBf7c7zfGPtmpH3SOjl0O9BJE82hDR0v0881lxON3/ WnO2i7yKyZjwjal35zEyG/ReYuK6gcpU2p7GIWfEAbuXOlnclNftOLfnJzTLlh/v/33R eXZA== X-Gm-Message-State: AOAM533t0BTEIdPMXNWFCt1hj6jglXJQV4/RnhIAumhjma+uqDqlwJRR 6bCZp5W/npyFjj1V0A0PxHc= X-Google-Smtp-Source: ABdhPJwUHfulHl4CVzwuW48JZr7yc4B+TDj4yp3uEqLNhqwdi5LQG75OesrunlT96l85jZk7PELY/A== X-Received: by 2002:a17:90b:815:: with SMTP id bk21mr8954482pjb.21.1610022737613; Thu, 07 Jan 2021 04:32:17 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:32:16 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, gcherian@marvell.com, thomas.lendacky@amd.com, john.allen@amd.com, gilad@benyossef.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, jamie@jamieiles.com, giovanni.cabiddu@intel.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, linux-mediatek@lists.infradead.org, qat-linux@intel.com, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Allen Pais Subject: [PATCH v2 19/19] crypto: octeontx: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:44 +0530 Message-Id: <20210107122944.16363-16-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Allen Pais --- drivers/crypto/marvell/octeontx/otx_cptvf_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c index c076d0b3ad5f..831550123719 100644 --- a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c +++ b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c @@ -17,11 +17,12 @@ #define DRV_NAME "octeontx-cptvf" #define DRV_VERSION "1.0" -static void vq_work_handler(unsigned long data) +static void vq_work_handler(struct tasklet_struct *t) { - struct otx_cptvf_wqe_info *cwqe_info = - (struct otx_cptvf_wqe_info *) data; - + struct otx_cptvf_wqe *cwqe = from_tasklet(cwqe, t, twork); + struct otx_cptvf_wqe_info *cwqe_info = container_of(cwqe, + typeof(*cwqe_info), + vq_wqe[0]); otx_cpt_post_process(&cwqe_info->vq_wqe[0]); } @@ -41,8 +42,7 @@ static int init_worker_threads(struct otx_cptvf *cptvf) } for (i = 0; i < cptvf->num_queues; i++) { - tasklet_init(&cwqe_info->vq_wqe[i].twork, vq_work_handler, - (u64)cwqe_info); + tasklet_setup(&cwqe_info->vq_wqe[i].twork, vq_work_handler); cwqe_info->vq_wqe[i].cptvf = cptvf; } cptvf->wqe_info = cwqe_info;