From patchwork Thu Jan 21 04:41:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368388 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 D1039C433DB for ; Thu, 21 Jan 2021 04:44:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E7EB206FA for ; Thu, 21 Jan 2021 04:44:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726204AbhAUEoC (ORCPT ); Wed, 20 Jan 2021 23:44:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727790AbhAUEmo (ORCPT ); Wed, 20 Jan 2021 23:42:44 -0500 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E229FC0613CF; Wed, 20 Jan 2021 20:42:03 -0800 (PST) Received: by mail-pg1-x536.google.com with SMTP id i7so569462pgc.8; Wed, 20 Jan 2021 20:42: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=qu9jTq4Mhds1PLReGFI6BuQWWjoITkJw1sqRT7XAn7M=; b=f1FiW3GfAm0rwczLRVaetfeMzJ8o510yCF13Hy1+MSxlrS2n8x/H6cuh9f5KjEXxq8 WvhixgV9T17sKJN7ifrgTlconwMjrMe1IcroSM8gW3Et2o4PflsY3eEfJ1TDjEje7KDR g4hb3FCppsyzQeoVwZkZLMqFyw9q8C/1Hna6V3BARgmL6EsfTG0EMS2hKNQz8rY906ry /jiZbmD4r50/fN4P1mjdSQPenDGpylA5/Xwrb3uBJbK9Y4jeqQBKdzdlWGqWlAoEoY/W 0m3p+YeZSZRe9RqHBF+bqm6EmtPmhmG8X6NSbssQ0caTqE4EZ7rnqzBKyG9uAwqACc9z 59WA== 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=pmR5QcUaBfVyDmKbXuEuba+kGODisKR8o/AoyGo7Isq3okGur/qqMwwZ5LRH6f+Hls P5/ilEfY9lGqSLqeq5Eb85xpemEdmLuC7IVx7a2JtkILKiUv9CiW6F7tAq1UImOLvd0j Bm5zU3vwZEMHPB0xp2iECcD2LccgI5Fv6xU1QkI9fOoNViS5iGRFD44wRU/3GmLPILqJ n5GSch0xS3aPmdGr+uDsLfALAJQ1ONFWPadu+yoaXJcGpYYJBLYHMfHLoC0hivmAogzG SDHEQjAErYRLP4iPaGHAUOZvdlq9cej4zOSmc4RWNBHGENZvbCy4GBwS0HoUm0RZGDIW 4noA== X-Gm-Message-State: AOAM530kja67ktaEhwhFXKprvkTIXvYUWmSpyTmj81ydDK2O8vMBSAV9 VgEvFsA0WBIvD/eFAH7KX2w= X-Google-Smtp-Source: ABdhPJyLMm7H/FaTax/nz30O7Prof4o8UmbaC75S/EmM87QIur+1h8r9VSHwMKgnivf3lp2EFzv72g== X-Received: by 2002:a62:2bd4:0:b029:1ae:4d9f:60da with SMTP id r203-20020a622bd40000b02901ae4d9f60damr12562238pfr.20.1611204123500; Wed, 20 Jan 2021 20:42:03 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.41.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:42: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 v4 01/19] crypto: amcc: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:08 +0530 Message-Id: <20210121044126.152274-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368387 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 97B81C433E9 for ; Thu, 21 Jan 2021 04:44:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 545EA238E2 for ; Thu, 21 Jan 2021 04:44:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727825AbhAUEof (ORCPT ); Wed, 20 Jan 2021 23:44:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727008AbhAUEmy (ORCPT ); Wed, 20 Jan 2021 23:42:54 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DF3FC0613D6; Wed, 20 Jan 2021 20:42:13 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id 11so779063pfu.4; Wed, 20 Jan 2021 20:42: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=ChEdTs09dQ0RBgzbeZxLNBVFnUFhvXMwpM6L2ZZDSyQ=; b=KvShdbpgZQGFjlp8uI4TxtE3bEvUl7eJ9+58vQiV7UUWClefgys6P5UWJOeFfOO4s6 iXE9k4/KpixLotFwX6CMkUhXEekcidnYyf7r0yEqgWdEJHRU96y3mZdOrc0NMjmPMppz 0BVjikc/C20sfVpR1yIWdtVMubc91biFMOw6SUaCKHmHl6pxVHilYmWo3iu39cl4Jszh WvG29NwzTRxDrp46j5d6awW+vmidYwLfcBMb4x+ifBHDMliBM/x6ckV9kKf1dXWEJfVx W/to4otL5oaeptkREa8FNq1jzqCCeEQ4pqcwWBHj4xL1jdTe+f8rapVyb19i9oupEpzC n7hg== 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=HZKD0SdCmAErBGxgAWOvogyuk79YfXlFZlFjzSIMJ5YqWCoIcFFc9a62LHOgRklrds AXcnwuYjvrxK2iceOecxH9lwGanJMe1UC/FsMr1eOdODkksHrZQJBXoiCRdbT3bR9DU9 7fytscxO0Qp5rqQ+GQq4LufsGsJfsHcVUuKgrBkgYZdETf/lx4MidJjJpdeU0FscHr0y 2wqbs/l6fAa2d4KdUBHVBkGpd2TjXHV9q/YUmKfh5Xi5vBm2CR4a/bJFYx/gcHnIpFJd VmpL+eb4hRHCuzRMBg1H5vPhnaU4hdhOZozD+namMSEcvSJp4Vkgyt5jdN8bj5ffqoa/ g2FQ== X-Gm-Message-State: AOAM532yrxi9EkqKZzoH8+EcjbT4Q76H/J6o0NKPZK2ayfyuJ5lSM8V9 vK+UTZumQ0GK2tTlpLZG5ts= X-Google-Smtp-Source: ABdhPJyU28grIyTHLl0ka3Qi5jVmnSsmWrSzIblQ0aYXzCs/hgUfCfjr+KJ3CsYlTQa6ciboZK20ng== X-Received: by 2002:a62:6341:0:b029:1ba:d55d:1d0a with SMTP id x62-20020a6263410000b02901bad55d1d0amr6199934pfb.79.1611204132571; Wed, 20 Jan 2021 20:42:12 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.42.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:42:11 -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 v4 02/19] crypto: atmel: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:09 +0530 Message-Id: <20210121044126.152274-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368379 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 DC704C43381 for ; Thu, 21 Jan 2021 04:54:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 89810238E8 for ; Thu, 21 Jan 2021 04:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726753AbhAUExM (ORCPT ); Wed, 20 Jan 2021 23:53:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727923AbhAUEnD (ORCPT ); Wed, 20 Jan 2021 23:43:03 -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 8F452C0613D3; Wed, 20 Jan 2021 20:42:22 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id x18so586292pln.6; Wed, 20 Jan 2021 20:42: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=Pt3Ra9o7wlpdpNYx3JDjTYF1o1dX6A0SMQwis6c4Pyw=; b=kdJKzr3/KOueUuqVKKq3BnshDzwd/M3QDO561oVCTojc/9EIA1jKGn1vXT6EHymB8b A8KEKLAEvfazNcpPYdlj/8uYF2qugJdamq+YWmDyIdTPHIZ+6dVV26Lc5t6suwcB9dY0 RWGkFRKrKA5e/IAnNQIIZRh7MUBUkA/T7SJvNpoWvEO3aHNRhHElD3b5BkB6+yU+zony kfnVQihyKH3xYr25Pt7fooWFeyHilx9KSt21RSlEkJ+HW8Ss7JBZhsiNQjlOCT8R+v+m 1nKJaP/w03tl7TOanwIxWQjrVud2NXEPN0wrikeR5LvZAw0ieDhlDBWByWnipQ/0Vlun hiPg== 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=OALiEgoR9SNIe7n5N0a4cVftUoYJ2qdi2VU9XULEGfYTQv5EpYwmqnrWaj7lvS1Bzd R0/AR4DA5mBCFptlhFkUOeyMjQtzbsn8wnriwX2gA3HDvsJ0aVUxRgxW3J0T9zj0uzmU 1khNO9XSvYkPQrzpwuqFdbPuMNtDcuwLRvLjnyAagVP5dIjlaLl0xFHe9FLYtp1oEvvt K2I0HTm7qhdG12FsbRgrIbuK/rYdYMMKuKT7FVuefdBYz3b9RSkvRIc3c7Fz4/mZHSUu UMnWak49fR9YSHY3UWO0SA1X2jqW0JScZYVPfTmC63+Kb2tjVeAW4/Acgw1y4KspEqRk Nlfw== X-Gm-Message-State: AOAM533wmEjEg/VRQXftwpZS06QjTMx42EjqoYchfuiw9KYMg2RCLPNM HqUeR+ztPrsYu7F0ETY4AJU= X-Google-Smtp-Source: ABdhPJzdyVPYF5JUS+hIw72+TAWRW1DhenevRKGUa/SuUS3MpBtGL77FofUqOu7EUYe85JNKgNbU6Q== X-Received: by 2002:a17:902:d481:b029:df:cfe4:362a with SMTP id c1-20020a170902d481b02900dfcfe4362amr1518763plg.37.1611204142162; Wed, 20 Jan 2021 20:42:22 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.42.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:42: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 v4 03/19] crypto: axis: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:10 +0530 Message-Id: <20210121044126.152274-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369095 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, URIBL_BLOCKED, 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 75719C433DB for ; Thu, 21 Jan 2021 04:54:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1935F238E8 for ; Thu, 21 Jan 2021 04:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbhAUExK (ORCPT ); Wed, 20 Jan 2021 23:53:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731609AbhAUEnN (ORCPT ); Wed, 20 Jan 2021 23:43:13 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01AE3C061575; Wed, 20 Jan 2021 20:42:33 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id t6so608044plq.1; Wed, 20 Jan 2021 20:42:32 -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=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=kQ4IBs5RGnxInr65CELhjNbEAk272NcmVxA31yPCdWxsh8gHBtj49IutKuAasFo3yv IdtGcXx3Q3UWwDKkTnk2CAP1OAQ7GGFvE40J/YUquxFskntsW1qmjzmfRDT+S5zcS13y Bo6ZYhPz6IxuWtNbFtn71VbgYkYbSDIslmydhy28FcpM1O5hc67TIljw08KXfEdfWXkx 6REi5dh3N+ob5S1rWMXej9sjVQx/3gZoF1ozlxRVY5otuV/EbVRfZdpBS1a1Y/rUflCr p8HeKv4E87J1PPExxLRnR+984RSHIJF44bnmjvs/mUwjJjHpZeQhmqHqjiT12urkowrr dVpQ== 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=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=LDDyd4KPmaMaFB4PmvwDOpKdxXhNdGXO18UJbVVP3aNq0zfxL1KGZ2efNuoYGfdxkZ VJQR+/1D5qFKpRIstOiP8YJwp2l7SBCQigQHxEw761UznGrQCiv9A4aAizVX7TLte4D5 UgjySTeaJmFkk8FDxdul7xfNRV6Z3bOOUxaqxwUH9HvgBXGsnUytZ/W5yPLYlV061zRp qkMGM9AZc1y4+u54yQiLUcspMosRg6xivpwbK3YKAcbdEd8xrV5aEq7bSGdZMplGRZ2P xWvdihrcek5HxSL4/0goEbCc+Ld4I4mjSGbX+F+f+fiZPPoqFn8MJgEUrfQSEnZTSkxm sPrQ== X-Gm-Message-State: AOAM532CYCcfA5cz4EsqI75DxohNbnqqdxCaJxsPoxir09mqAoiuAZ4T fkd/8QAXsSa6/ogz/IRW7TM= X-Google-Smtp-Source: ABdhPJz3gROHw2YBVyuK/onSBCkTE15+V84IiSlj0HhFbNpYb33RBgymr84d61EoU4s8NU2jWYoi2g== X-Received: by 2002:a17:902:7088:b029:df:cbdb:a0a6 with SMTP id z8-20020a1709027088b02900dfcbdba0a6mr3010271plk.17.1611204152572; Wed, 20 Jan 2021 20:42:32 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.42.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:42:32 -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 v4 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:11 +0530 Message-Id: <20210121044126.152274-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369103 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 79863C433DB for ; Thu, 21 Jan 2021 04:44:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D101206FA for ; Thu, 21 Jan 2021 04:44:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727008AbhAUEoy (ORCPT ); Wed, 20 Jan 2021 23:44:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732044AbhAUEnh (ORCPT ); Wed, 20 Jan 2021 23:43:37 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E225BC061757; Wed, 20 Jan 2021 20:42:41 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id m5so800247pjv.5; Wed, 20 Jan 2021 20:42:41 -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=o/lkqyQFzs4RW/ABushd5cU3kQqz7E7fIT81eyzErV+QAgEJY6dGrscoZ3gFte+H41 owcmN/qzhGHjLzwF8A6OSyvAyYflWMrxM6jdvQIl3jeNB9nemBQtFFozFcaJUDmDZQEI KglKxLIlti4D8ZajrrLab+uRm+kLkcj/T5actvFG59pi3EpNjUVLLVRYUUTg+4llPtdk ua10pw/atw5AQHJEjdCuAGvnEyqAuanMTrJ21AwpOUIljw7o37D0LockJH2oMGGdrBiY 0248Im7oGZSr+M37u8gJO9mzV32nqbxBJM7Ys5LP3pqaCiyL5Xx962skK9n3TSQQAyFy yIMw== 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=tnUpKXpGk2I+hMEW3X6PuiRDD3oFYhvMadDZvgnsRCTP5Gh64xqJSXuaAomHPbJ9CQ gYwnT29cYOVRuttO5gLhLZ3HJ/NogIKb7wS95cAuF1qcuG7qUMApEriGCVOVCn0T4rvb UNN2ITV53dAmFfSf0xfUBqaX1laKfBuA24BBC6vEwGZ6VbaSyNUmFatb0iOEHQQbG5ef ukQZ3iq9n2m0UYG5aGGdeF+DQD+RtA4uV1D+FvdQrCis7lCTXTtaazU9xzGjO7tcae2H qQb1GmJJfnLe45ZlYEMOXVkBDfOF+Vyiixwz2D6KUsriRNndheAvEyCeEqvqRa+nzUfO 3z5g== X-Gm-Message-State: AOAM532hTpOazg0ISO9mAWL0brsmvRAt4P3Gqw/04bQHkB/FaWJCHp9K njX6SQeTLoxJqxnpifim5BA= X-Google-Smtp-Source: ABdhPJylCAvW3LVkG69kqT8x4LlWGA1fRRD/pBOTSoyitwyxD0N4zC7hjGUBGUhnQRnL3TdYZ3CEaQ== X-Received: by 2002:a17:902:ff06:b029:de:362c:bd0b with SMTP id f6-20020a170902ff06b02900de362cbd0bmr12827667plj.13.1611204161491; Wed, 20 Jan 2021 20:42:41 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.42.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:42:40 -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 v4 05/19] crypto: cavium: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:12 +0530 Message-Id: <20210121044126.152274-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368380 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, URIBL_BLOCKED, 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 A3E57C433E0 for ; Thu, 21 Jan 2021 04:53:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53D69238E2 for ; Thu, 21 Jan 2021 04:53:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726458AbhAUEwj (ORCPT ); Wed, 20 Jan 2021 23:52:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732155AbhAUEnh (ORCPT ); Wed, 20 Jan 2021 23:43:37 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3863CC0613C1; Wed, 20 Jan 2021 20:42:51 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id o20so794402pfu.0; Wed, 20 Jan 2021 20:42:51 -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=+bF0wgyuousrsBjw1bti5ZYiRgHZLvFxR0KyJROcYJo=; b=rbNcyjH3IL4S4axnopSH3rjUZzG7W/bGtWViPzFEL1hiac5X86w8YnlDIgVeXJRr6F OV2okXzwTQgN327lmN3MWR7Pcs4xBjG9pwYEIEKeU9D3X8lBYp4qqm6dF+b8BT2SaWAl lWPZBptY6sjp4OGHAEP8cy6ijE9UJV/3cK27KWbwm9XBAQU4dxTAnoCYL7cPF9dwAnFH FNQkM7sFo5pVX3xvjZB0ctPvnIFu1OIFqk+IS3j7h3bMRsD6j+mMxothtt+U9kHcx0aG NrH2u6uZ1O2wqljS2HDaw2TxFOFvBFiE8CFlmgZSWvDDv27217mb4xd4OTz8AoBWm8gN FGUQ== 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=+bF0wgyuousrsBjw1bti5ZYiRgHZLvFxR0KyJROcYJo=; b=tjnxWKyxMq5oTIIz3QGdetLzSuiTvsQsnP5jA6SL8R57DaT4tOiEGda09QzWrHeOcK GqgDRIBtoKcTc707BJ7Ab9NlMFP6hqdGqXHyMT+EiOEl7JJAvzVt+HlegaRo2BsVt7AX g4ijh5F8f94eVzLSFyEQE3/67UPR0bn9QpFcMXdKcPuPJEt8qTMGVOlF4HGNum7jneE9 TZsPyW/bm9T4mmhLa7g3ynBNjbLjzHAAvFax6A3elPlHb3G9T2gfZmlqThjiMr8mhfk3 E6ybVobDevjQs6oWg8qECC9S+onY1kUW/tv2HGoj9nKyYvpeegeudoqfyWgBAwWHAMFv fo3Q== X-Gm-Message-State: AOAM533j69m5/7wjf3sS2jRyVcUdl8F+xgCFumvNT1aKb+g7lKeQnVJv dvxK4ErR3GThz7fhCQMx1Sg= X-Google-Smtp-Source: ABdhPJx8Ln4+ICSJLbxBGsuZt0AxC2rUJSqiRj3gefyildSrFXv1NKr8mSZyvkyBDz5b8dUbD3/NTw== X-Received: by 2002:a62:87c9:0:b029:1a5:9d56:7e24 with SMTP id i192-20020a6287c90000b02901a59d567e24mr12007053pfe.56.1611204170775; Wed, 20 Jan 2021 20:42:50 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.42.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:42:50 -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 v4 06/19] crypto: ccp: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:13 +0530 Message-Id: <20210121044126.152274-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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: John Allen 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 21 04:41:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369101 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 AE65AC433E0 for ; Thu, 21 Jan 2021 04:45:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7ECCF238E8 for ; Thu, 21 Jan 2021 04:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732084AbhAUEpL (ORCPT ); Wed, 20 Jan 2021 23:45:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732385AbhAUEnk (ORCPT ); Wed, 20 Jan 2021 23:43:40 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAB18C0613ED; Wed, 20 Jan 2021 20:42:59 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id e6so821183pjj.1; Wed, 20 Jan 2021 20:42:59 -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=mOt0I8IJqC+wrRNcL/D6svMb/21zM8fB7XcpWJI9cOayuT+wX0dkbPdM8rYbJz4O3N 60x1u8ipN8sDaBnJ7ZamtUdJtANHEtMTIqUXe6+oKcFmkV/StKOsWDPYeMlyCr67baBs kyU4UM13Gsk5piZjRtNBjavM4rOt4L4fhOetcrEtfEbUzM8qhFBhR9wwPdrzxZopt6He zNPk8wM5Ihjo1zIN2+guAfHDTq0nYYHeeWYy7woqepxvQWxjaLyMqGmBZe5tUVRnLbGB y8uenFTI2C3wc+kMIIydahS2SSdfSA504CTqkghs3dM0W8V5x+oMmpQHCsU8lu+Whrxs ygTQ== 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=KxIsGZ7n4LMwzPq93KO0KCgEQa1yCGZRAhJxDCVGt5T4kFqkrC5fXbUAnQIKgyBX3E D1ZNkLCV0VpZe2GYg28uMrkcS1QworDkr+IR2aa3lSz0PJYHE88PTLsii66azFoZnUpY mGh5IyuKkJzvCchufqZEs48b/CkLanAcempNBIheKVKJgSY3BBtYHh+ZjB7ucXUVwEUd LU1ZVVz9s+fYIG4SRu1Y5h+2jPvWe+uwHy+H0xMVG+ytBEZA5llEoPT0sLqmzJCDzkYO 9CUeIZzpl5Rwp7VCeaILVztpoSzy62So3qKcQeEF5gGkgYKvJfwAwoyCcYC7aE4Dg85w /0Gg== X-Gm-Message-State: AOAM532G8EDTGaGt0HBOjWxmDwXBm/u0Vr+gEoTZD8qs2h/SE72fXK5u d29shNX+78akfjwOO+mwqfU= X-Google-Smtp-Source: ABdhPJwk13pWm8t4RlLiDyE22PMxbYkpD1T0fVbUYpisrmjHHMmBAtIajDKJyxxf/OxqZYKgEmj9hA== X-Received: by 2002:a17:902:9a03:b029:dc:31af:8dc2 with SMTP id v3-20020a1709029a03b02900dc31af8dc2mr13234733plp.39.1611204179537; Wed, 20 Jan 2021 20:42:59 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:42:58 -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 v4 07/19] crypto: ccree: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:14 +0530 Message-Id: <20210121044126.152274-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368385 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 3D1E4C433E0 for ; Thu, 21 Jan 2021 04:45:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1EEA238E8 for ; Thu, 21 Jan 2021 04:45:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732448AbhAUEpT (ORCPT ); Wed, 20 Jan 2021 23:45:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732421AbhAUEnu (ORCPT ); Wed, 20 Jan 2021 23:43:50 -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 D477FC0613CF; Wed, 20 Jan 2021 20:43:09 -0800 (PST) Received: by mail-pg1-x52a.google.com with SMTP id n25so602453pgb.0; Wed, 20 Jan 2021 20:43:09 -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=Bng3BsGk+C8xyT/tdfY1mg36WQRvRfp+hn0N4TAQOl6zzjWnogwce20ioIBmtwVYHu 0QfGZFBkMasK3JbJORN8sjQD4LAhBc3il+zzdSWfofpRbL44uKINPjAwdlUW3AO8/eqw u2aP4wKc56/Q45TYbGi1nogwjvZ+5p/73MFSqillVMqLhqiw4v36M1HarMS2pLhtoqzx BsF4+BKRNrDzicRUQIWo9cq/8rSYIl0bUcFgHGI6DxNtwxDRwod/kzRexZUmeOsQae2D NZcbzrT66+ixLhF4aT0Edzs2ayKGCVrTODnjtpNNvEG4jJyNFPbiDN5H0I9IqbEb2egX Jo8g== 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=eL8440UaU05zNwxAfBihtZL6aoJzwFeBLGwjazrKy5hpxYvH3aooBHc5QKIT92qNsO sBmyI+GCQt1z8O3UYr0vEJTbJYQrjPz9j5UF8Z8ehXHWvqIxDKJ19hHWfXGz2kErJhPp egqVLO3d7U+stV/v1X3/f5XYxsB7Sf3kon1geFLKih5QsOtEBG5cPzEVUYaw+jNgXE/Q TtN43tdWFBnIrqgY9aoDvKpJKY8u22MZwquxnibgRa5TDLo4dl0RSwJs29l7VKdvD5p6 Y+9JJlxGHF8I5dTe4+fNpDzcs03RIldEog6g6bN8DH9WjylDY5xDAX4sGWH/diQRnGNt S3Tg== X-Gm-Message-State: AOAM5325HtGXIeJwiPJcqKnM24oDICUfSVn0ZQsrohtZbCcFb9K9oTda nRxCDgorklX26xtliNZz/r8= X-Google-Smtp-Source: ABdhPJy31Jui6z63cGBX2FIWsvZJsQOR36SUcBgxzABGGw4ToD/zOTXFb8AWe7UJjFlBSFEMvOW8Wg== X-Received: by 2002:a65:5ac1:: with SMTP id d1mr6123421pgt.447.1611204189442; Wed, 20 Jan 2021 20:43:09 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:43:08 -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 v4 08/19] crypto: hifn_795x: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:15 +0530 Message-Id: <20210121044126.152274-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368386 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 B1D7DC433E6 for ; Thu, 21 Jan 2021 04:45:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 659BF238E8 for ; Thu, 21 Jan 2021 04:45:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731553AbhAUEpF (ORCPT ); Wed, 20 Jan 2021 23:45:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732424AbhAUEn7 (ORCPT ); Wed, 20 Jan 2021 23:43:59 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DB61C061786; Wed, 20 Jan 2021 20:43:19 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id e9so601764plh.3; Wed, 20 Jan 2021 20:43: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=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=Wj7sCM9F4vpkLG30GosPvfXGOs/DyTzA8qlMHZCc9On0HanCIoDHRg9iVGTBOb7ukV 9eQbqyr8N2wGu9rkSmPb/oATEJlXu/AQL5ePLDblfiMWp8Vzb9wjYXhSf0tEj6RfV1xD Xaa44AdOFoZl00yDcdiouo2F/XS80/Wlv1PmnVuI0HOe3klddc4VAcFxaZY2ltn2pkZ1 d9//TjIqdEle6uY/j2SGZzjfkRX9mtDCrvvtGNBuklsPa6QQafOsvbhFIwIdqUPA3D/6 3qyRCFID8CiXt3/5vUZtXVCYpr/PBRGrWiRgqlDW5g7rZjmkaOfYpThazPuu7BRfZb+r SLXA== 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=Qr6DfhrjSfUlNQOMn/plZ2OhpqRqAcZ/kW9hPIq9RV6XPHUIxk5CbaJ5e+hwRAEbh/ HqBnjeSTUoe755iQuefGXtbn47ZCckBRBANPiLxolq3vxFxNYr30lSu3LAvt154qpqsI nRxN0IurTX6GVHacdNmoUXSvi2Th3CKcTteiutuWS8fsbMVvd29Wd4+iSlKENdfkFsfT wI6dE2w5zcwDl/XF7nbyyYzOHZs259eVneynCRLuDfU+f7wWGQS5OXtL9ZMItwl2/XJO 4qlbPDfUVFAvMf5B1aKMj8isUc+dp7DiT/v0YHiPMq5Ip/rMtK4xGmaMxnLJREYkg/NF wYKA== X-Gm-Message-State: AOAM531XEdfJnfuTUKF5i+ZffYbanWUcp1++JheLrgMguM/dZw+T0AsR 5nCjsoDNQTFbJ7y9Jj2ETbs= X-Google-Smtp-Source: ABdhPJyYZlYB42BvnE/n4p/4TsihHSr67FHVZkVeLOSZ1wHznRF1VT8sQpAm0++SX7YhI0JY7paF9Q== X-Received: by 2002:a17:90a:bf05:: with SMTP id c5mr9623039pjs.90.1611204199054; Wed, 20 Jan 2021 20:43:19 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:43: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 v4 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:16 +0530 Message-Id: <20210121044126.152274-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369102 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 51F9BC433E6 for ; Thu, 21 Jan 2021 04:45:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10457238E8 for ; Thu, 21 Jan 2021 04:45:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728842AbhAUEpB (ORCPT ); Wed, 20 Jan 2021 23:45:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbhAUEoI (ORCPT ); Wed, 20 Jan 2021 23:44:08 -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 62A7FC061793; Wed, 20 Jan 2021 20:43:28 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id be12so596820plb.4; Wed, 20 Jan 2021 20:43: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=1e1njK4JCLyF4BWRntmeMNLMXKX/535/WykRDF+9nqU=; b=topJBmTZuunqbvTDzVdkBfh9P8KCyWEnAtWWRNR9932PVRZx3eYWs3SxndCP1iHYi8 WR7bGw+WjM4BMLhKJNR5CtmbFMfX7ZNVRn7NVu34LQsll2C29ne2NjiI67aPjyGNBJgd lsNuO8pBwS2moiAgBFO1EtsMwvx2F/9sX4RUIy1gqAAkctztFwAjMsjL5AnYx7MwDNsm TdrFx1WT+Ys7g3fgcVaXuUqrVVn22GLSI6Lde/kroqU1rDx70K45VNqKIrBiFot2F177 w/ZN43BAAdbW7968mn8kZy6TBVfg1oVMQRu62HY5VMUC4Psy/axK/+LQv0dOyMmY1eHT ufeQ== 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=VLmoUnptFrcPN84xaWWd0FE8n4b/DOc5CJpf1peP6ynj1eOmHfmmTeWSD1zaEMmSfU buktDFGPn2T/3/IKzzc0zm+XyAJKg1AfvLFfuXaV6xDy+whOXnvVJ0RGqLEqsHJ8egJR taSFF8URmxMo/VxYBAkaA5zrjC1Jh69oIWf1VgL9cO7G0gKqJZ2A5qskQOjK65/bkWfL b8rZbS0k5O5HcMGBtDD9xekQnLKlnCTCi5PF7cPQaaii3PuGIFhXb1Z6NDxqg4YvSSAu Hs+G7q5ldtUrVKvsXS/P+TDJkjycvskYJHzR+1HxIklrTquv6B8hcPUBEtiBQWWw/r9b eMrQ== X-Gm-Message-State: AOAM5316uXNuVkhcY/5Vk53nyyojOzeVnOML7xyg3/8SvYeHfuZU9ZfB bpuDp1RYMk3/jrb/j44QURA= X-Google-Smtp-Source: ABdhPJy41DiXk+Qf+MzisRUhFu9MMpeTc+QZ9UkJGMoATJGG6zWsX7eb6sh1HezenmZ65yENeI9Ysg== X-Received: by 2002:a17:90b:11d8:: with SMTP id gv24mr9468737pjb.232.1611204207952; Wed, 20 Jan 2021 20:43:27 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:43: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 v4 10/19] crypto: ixp4xx: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:17 +0530 Message-Id: <20210121044126.152274-11-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369096 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 C2669C433DB for ; Thu, 21 Jan 2021 04:52:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75D0C238E2 for ; Thu, 21 Jan 2021 04:52:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726059AbhAUEwJ (ORCPT ); Wed, 20 Jan 2021 23:52:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727896AbhAUEoy (ORCPT ); Wed, 20 Jan 2021 23:44:54 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45FE0C061794; Wed, 20 Jan 2021 20:43:37 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id u67so784861pfb.3; Wed, 20 Jan 2021 20:43: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=gZKtlD6nuAorTKG2PqNJjMaym8CBQGfY80Jr0aK5tbM=; b=WCE5Tr7meTK5ZLL4PcSZDSudzsc8vmkuG2k7xatRtApKVOMRijxopylZ6GoJEwV/K+ b4TwcRkiZ80U4weZGZSKFvdCWRTcC7VDMgzdNUqYAxFeogELRM1YnUqumFk0V/E+Myxq +yL+voX64dYVEzELn8maV0XBsgj6qiR6ri1YsnWZ8mjvqFvdm9l5/8ZFIwta2I2jIhIO Zm5l/JcWqSkjTeRs0+0TsSRLKc1cqn3zN3MxOewsKT1DpJEUhOZ4jCyURXVkkvtMrJj6 twUjiCuhBcMbVdsMzPqFt+oXo1maJm13gEPoLtn5lOXPHtwObpvzZBieKjog5nv/MFn+ 2mxw== 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=jvVHnSI30vwhgu2Gq2sTBCBziE1PF9vTT8cVB8AfEVrr1hdNhsenR+Yh9p1DgUWUzs uZwwipdYXdUvQU/gQGKZ4CJ5tbJWtn5FzL+l+ow2UdLK0kPfHrudPSF/cqpL6Lxg8FhV zE7EdGD18k//sH3x8zEI5eyG/77Nwas9ERrGRZxavsEQ9NZO16wDIu8vDYNmVHVnUEcw /NOrw/pqRpaV2/+EeKw8F+vs5mo1NiBLHvzREB59XpBfdCi8x1O+KUAIZ0Fx1+35myEI +N8zTBKBAq2mgfc/elUYUZvpLoabKA8BLrVsndMgrPdLTG2cDKHkob6ldgKJ6yoJEYKa iK+A== X-Gm-Message-State: AOAM53259PcSs6UJdby/HqbuaDgHIQ2bLzJoXCvpJ0wDGGR1pFkkQZZG BQVVM2twR3EEy4Xf4DF9ZAY= X-Google-Smtp-Source: ABdhPJy/wJvam2KFK5a+Fdu1Ly2SEYwHjlW/SIFLjBMDW1WY6SjYaRLw33jugUlEZBjnv8RF/XZosQ== X-Received: by 2002:a05:6a00:1342:b029:1ba:5263:63c3 with SMTP id k2-20020a056a001342b02901ba526363c3mr8224465pfu.2.1611204216858; Wed, 20 Jan 2021 20:43:36 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.43.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:43: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 v4 11/19] crypto: mediatek: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:18 +0530 Message-Id: <20210121044126.152274-12-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369098 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 01FADC433E0 for ; Thu, 21 Jan 2021 04:51:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9872238E8 for ; Thu, 21 Jan 2021 04:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726379AbhAUEu5 (ORCPT ); Wed, 20 Jan 2021 23:50:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbhAUEpE (ORCPT ); Wed, 20 Jan 2021 23:45:04 -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 0FB4CC061795; Wed, 20 Jan 2021 20:43:47 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id u11so558746plg.13; Wed, 20 Jan 2021 20:43:47 -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=HrygOR1BWNIotzg6O6ErsFsiWZcWgZhgzT9noJQNrunLoGJR6zECCPmaX4YCn4XE3/ 4c289qLP/gRMavAAJo0sAwxcgMllDPvjBLoz+xhQ/INGEbDPMjRKi8eeE4bpm7qwALgj ndzsZwVthvJORshKm5joL/2a8qyPIu/W4R1mIjPF/4VmatQif94ioE6um2t4QyC/uSVs 1baJ+Ze0HyaxVKT0elX4DnO+5J01C0nlgNgJ49GVJU1ylWrii7cRBbdJK5lY4Nc2rQnn 43rDT+e4NlArZJOA3KpDQ78j6hTfjRjClbhPqvujAxpIB+5UHj6K17k3/5OxSeaxHKhf y7aw== 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=JXHT0ch9thSYWfkG0xgs4BHrM5sVXV/4DAgPRvQjWyB/tlY6tHLUIKcznnmRvBOMjT y1YiuEdF1aPS1/Tnt3QOj2FtufdtJ8qlHTS4LRIPe0QZ6uJZoCoLF+ofRm100e0+119F MN3TnnrD2w+7AopAykcN2HmgAe9gHW2JJb4AWGttHTAHTKfGXAlmMT/uFrl+YGJxMfL2 WmWw9xiKAFD+Ybpya4LjjRdlN4nJjpyeJxKG7Qfw3ztNP5Le6IqcjHKvthsCthyjJeIS 3OzzRYyI5KfC52tHjs7zY4daawtgAMjpstbGhyorGqmWhj5+CYh57klnDxxX0doA1cKy TKWA== X-Gm-Message-State: AOAM53088mtrTC0Z5vdRdvgwZXSTAuR6X+DxUkRU+vkKn79DOjTQLKzk b+8wIMj2B/tAjNOb1pTa8ts= X-Google-Smtp-Source: ABdhPJyz8AYlgBIXbzAAO1CzCpeRQOk4+I+IrNB8crMdWalHL3KAkDCXzqUheg9ltYi0KwgNHQMU0w== X-Received: by 2002:a17:902:7243:b029:de:cd0b:9577 with SMTP id c3-20020a1709027243b02900decd0b9577mr9366219pll.83.1611204226633; Wed, 20 Jan 2021 20:43:46 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.43.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:43:46 -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 v4 12/19] crypto: omap: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:19 +0530 Message-Id: <20210121044126.152274-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368381 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 2CC6EC433DB for ; Thu, 21 Jan 2021 04:52:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB56B238E2 for ; Thu, 21 Jan 2021 04:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726187AbhAUEvv (ORCPT ); Wed, 20 Jan 2021 23:51:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727559AbhAUEoy (ORCPT ); Wed, 20 Jan 2021 23:44:54 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09D83C061796; Wed, 20 Jan 2021 20:43:56 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id 31so570408plb.10; Wed, 20 Jan 2021 20:43:56 -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=YcZEALK88C6Ie3UfV/NxIVW467onUG7DeIDhOp7jC+bX302hPlWbEVlnebgdCBbwFj LOfHF9OGgUlWjLj4wIBvH5lDknvO/fNQBpFbxTx5hQvmZSvg2FI4T7wq1SWUY8IjDElq tBHXoMkG1PrFIM2bBualHC6DrvMNzuLL9tHtzO17KvRwOgIGCG+A2n3xsYGLTrmsLLtL FHVZQ9zJrNd9rMoLlJb4wRfv3cynMP8nKgEOaTz0LCxKtAv4ZNEvaaowW6LA42qsA6j2 OvGmfqDHs0jWX+Zrk2Zl+2+I0+uX3UV62B0QiQn2Ff0gKlNEE9LyANJMLdDJvz9Hb2A1 WuFg== 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=nt7Xx8RVEye0jjxnSl8dEKYVfhKeqBcKELefxzsbAvwVnbKjE70PMdWzmvbd225VcK IUMlmih1WnmzeXHNYnliJJTUoNuy23huoenHSpe51se/S1GJtJK2XzQaYcmgLfvMw1DO v+4sAgyND8+UR0qweoPQRGkgnpn3dDVRvAo19ndjPsw7pZzG3Qewl+UjgCNFFW2jwYq7 n9AxibHGS6soXTK5/qrTHrqtUhhWlhNLB6/3ncOwDwTOUqENUbdJ4yC5oLNvJFHMU+y6 B/7eTKNH7uBKwj2OgrW63fK/W+G/OaCNKzbBA9ZmoQpdu0K0q+EBqnoCdH3k5XEXbo54 WPLQ== X-Gm-Message-State: AOAM5316ar7fA2g+UbpDWRfEjtsl6e/QJMjdYf3j9JJtOefcp0nat5U/ mfhB3p4J9VdSO7IIIDQshm8= X-Google-Smtp-Source: ABdhPJz55X807cU8264jB4dLtQ3vVAqYFPxZ8roblYo9YlKQHa5BhE7/TMsNFZx5ohRE85FkNMi7zA== X-Received: by 2002:a17:90a:9ac:: with SMTP id 41mr9635853pjo.46.1611204235611; Wed, 20 Jan 2021 20:43:55 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:43:55 -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 v4 13/19] crypto: picoxcell: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:20 +0530 Message-Id: <20210121044126.152274-14-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369100 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 AC0D5C433E0 for ; Thu, 21 Jan 2021 04:46:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70ED1238E8 for ; Thu, 21 Jan 2021 04:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbhAUEqI (ORCPT ); Wed, 20 Jan 2021 23:46:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732424AbhAUEpV (ORCPT ); Wed, 20 Jan 2021 23:45:21 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34F84C061799; Wed, 20 Jan 2021 20:44:05 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id b5so830769pjl.0; Wed, 20 Jan 2021 20:44:05 -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=aDBTv2B+LhvFEC7t2eWQQe9AxBbS9DBJDy7E87hqcXE=; b=hGHgPFCXOZQwdFLrlU22tRxE3AKOW0Z8DKU+3Cfw3nkaqiL59pEWXrQ8ky+vgx8sdW QqtmJ0BGLDP0xpl64SQFZwjIFjvFxHO0hPoN2dVKAeVdzNFgAQYmfjRr35q+tA+plsN4 a+QCEWR4TtUpCyhPNuE7hC0KUHO059X2ys39qpuFnUbXXBIrbpNfgSxxG8LiZKpGy7Yr x6FbaO+/TV0KJQjKbE4bIivPSGuJKrCz7SjPH7Fbi2BBNkT4+lzq1xrQkpuaCTH09wrM +4KwX5t/4UyFplxXLx4jN6wvDLL6dqv05BUJNONXg19hwDSxh95E3N/64Zlgn7UnSevj 5F4w== 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=aDBTv2B+LhvFEC7t2eWQQe9AxBbS9DBJDy7E87hqcXE=; b=R2z37BqDlZA+33gUYAmKd3WITMqnIlMk6ycwoUN/ov3DZfLwNk8+xTG8nZsUvY0beI 8XmP+LZwAGFWlZgI650tSrPg5YSEiiCqRWDLazKIPU+rv5QemE0Qpuj4F+GRQhUkAusL pPjNpSLgbjsYEfa6zdzwUE3DCHlIamEP0eQ2j7kBb83Rw7wKaWDK9ZdZZ2U++NjZJvYK HTqWf7M/jViNa/KwFRFeAS525ffhEal8OyI5p4qiKnEhnLthST1hmQZ8cjuLAaoNd7Le gn/jP3UsTHv1g4X3KUiDX14Su8jz1PoC68kFEu17QCYTTtUue918GRP5rZzG17MV3+ci rbDw== X-Gm-Message-State: AOAM531Xb8Jno+JCGfbukUpXzKrfMtgJQ5je1RHt87iNfM/IhXc1qMfk 1JAHXEmXeyymUsubq7aN+aI= X-Google-Smtp-Source: ABdhPJwJqlqax5zVac9kJYJAuQxEreMoKC3/hsqQ3CMFwPfANq1YsmjfOLnM8E4j8Rj481PtWVxHpg== X-Received: by 2002:a17:90a:f309:: with SMTP id ca9mr9479618pjb.11.1611204244751; Wed, 20 Jan 2021 20:44:04 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:44:04 -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 v4 14/19] crypto: qat: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:21 +0530 Message-Id: <20210121044126.152274-15-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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..50b4dcd49753 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..748f81294fb5 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 21 04:41:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369097 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 5560CC433DB for ; Thu, 21 Jan 2021 04:52:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B498238E2 for ; Thu, 21 Jan 2021 04:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726564AbhAUEvs (ORCPT ); Wed, 20 Jan 2021 23:51:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727317AbhAUEpA (ORCPT ); Wed, 20 Jan 2021 23:45:00 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7311CC061798; Wed, 20 Jan 2021 20:44:14 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id x18so588473pln.6; Wed, 20 Jan 2021 20:44:14 -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=BupZcrXhhNK8Ef6ojLlQM42EwDg3c1oTSVd8H+/oHXiemqGl5WEzw5ar1WiOZx+iC1 jvVMgDVDYdxjTtfxYu78QrlC0iD6CqYMsHQO14d3u/k/FzKXX6SQP2XOINno1iXJgCld 4rZ5ayp0ch64tHhDbqoBufiU0rftkrB4lzOgJvHfBiRYnwclH042wfAC1IOVo8or3EvO JrX4jA2FS/PZ0Oi6MEceS+MYxaga4gy2lmJSbASRPTx+WtxyunTISoxeVi7oSbv5GNe+ oHPTQXwPGwEWVuhWPI9AHbUS2BYxMiz7KP0iypNrPDePZi/GniAt/ru7X3bHn5ZdOkwi 5zVw== 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=um+o6HckUMgmvlRn3y9CUtEGK1KrHOs05ng1CRw+/p6zVhMIVKYprfuM9haWD/U7hA TOzxvBYqmHnYDBdoM7kICYXsiwnQxhYt/pvjSomf9ylSojiPs8PvXEb+8eAYvukvVkiq K0CuTluJ1/Wn6l5pHboSVxHCOSQj9W+pGygUn0EV2Ot1+8Lu48RbOHsYzrA0uCZBdOhn mmhMPmbeFZhBFoXd8LzoHhH33gjLChDyvCT4jIEXQER2y9EQINHvDsomUk2yvZt3OOfU XlDEGT3ttDJMT8S84A/yC0JU3G1DGMCuYbPV14vlDY2IUFW/bxB4GzAGd8wwGtFGtYPI Od9Q== X-Gm-Message-State: AOAM531WjaKknG18zP68W4MIqjiGcmpv7lzgcdAcraqrTAj0jBhWl8hi zJ0rHAzeDJ+QZnZ1gE8JeAM= X-Google-Smtp-Source: ABdhPJxihhD7rtz9KUgJnDNb27lJMLl+Qqb3jgEHtXH3KDbu2VD5PkvZTpN9Xi673Iz88wL6BF/1ZA== X-Received: by 2002:a17:902:a501:b029:dc:3e1d:4ddb with SMTP id s1-20020a170902a501b02900dc3e1d4ddbmr13240061plq.60.1611204254054; Wed, 20 Jan 2021 20:44:14 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:44:13 -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 v4 15/19] crypto: qce: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:22 +0530 Message-Id: <20210121044126.152274-16-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368384 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 297FFC433E0 for ; Thu, 21 Jan 2021 04:46:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D46FD238E2 for ; Thu, 21 Jan 2021 04:46:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731575AbhAUEqG (ORCPT ); Wed, 20 Jan 2021 23:46:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbhAUEpZ (ORCPT ); Wed, 20 Jan 2021 23:45:25 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D2F7C0613D6; Wed, 20 Jan 2021 20:44:24 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id kx7so808095pjb.2; Wed, 20 Jan 2021 20:44:24 -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=YEPwpL8tIwFQ2pgUdTDSsmDRSKgoB9OQrqIbywK9g6k=; b=dU9WU1E48oj1RRxS0YgvTzPsbpnhRc/jNgYXGzORXZK2kmMTbQmjpzN1uNz+lKkiNU TOaLwOEAb4HlD3elA0CfbOZHOh+b4SKjf3/GELVuSnpAbZ9Y2PkjdN26sSERD6ONqgfM FLZd77ZV9iyiG8iRIWR+DzFJQjg3BlPmsjRbU+d45KuBV/dnWMeZVA5cX0g7GhT5QoX/ Dj6KU3poUouCZqom9b7QhEh8xnGdXPOyBp4QlFHXgTlE7yvoyoEKa2amj7F8wyTgsFvD KQuM21l9P5n+zlHdJqhWTFYCUsvpn2ac53gsWGoY0//kn3tKW0q/ddvcrB0QBDV7AdQR t8Lg== 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=YEPwpL8tIwFQ2pgUdTDSsmDRSKgoB9OQrqIbywK9g6k=; b=Xs2G4r4cHXgPd7K4A6F/Mpq+KK2qo0s/FaFQ9Z9nDQ5N2fVMiWw8PBo+qXU8/2RFWa 1DWSTn1hMjEuu8NLFV4E49ZsOg4varv5hNA7ZREdFOx0zZgdPwC5A6lhNYRubhnswMsr Sr9CrmSaFgGXyz/4KcfbzJbK5yigF7p1bAh/0NwGiO0Z5khg6EK0Atad0lVWmMscPI4F silgeSivhM5xWkMfjqTIBeC64MPz11S4iXp1wUMwZsBz27J957DSD/rvZkoHdW6aHUOK kXoiBcM54SN/IT1dcEsMSqGgSOirNL2D4Br45xYxfaobGpnoPTGqH4nCIARgwuKUP8N1 fLIA== X-Gm-Message-State: AOAM530ZjSZvpIS+nkJdgBZfI8snWAri+65nLZXY0J+5JqfCADpuTKN3 Qo+yG8fXo6n21dysu4ROkis= X-Google-Smtp-Source: ABdhPJwJ9hGf8pbMPGeEG6z5iRCJqmXre9McNlr8vNJHe99q8dg0/KYxRa6Y2rusHu50LojxQn4eEw== X-Received: by 2002:a17:90a:1913:: with SMTP id 19mr4557392pjg.183.1611204263868; Wed, 20 Jan 2021 20:44:23 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.44.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:44:23 -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 v4 16/19] crypto: rockchip: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:23 +0530 Message-Id: <20210121044126.152274-17-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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..85f314c79734 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 21 04:41:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 369099 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 1F164C433E6 for ; Thu, 21 Jan 2021 04:46:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D74DB238E8 for ; Thu, 21 Jan 2021 04:46:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726014AbhAUEqZ (ORCPT ); Wed, 20 Jan 2021 23:46:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731776AbhAUEpH (ORCPT ); Wed, 20 Jan 2021 23:45:07 -0500 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E87C0C06179A; Wed, 20 Jan 2021 20:44:33 -0800 (PST) Received: by mail-pf1-x429.google.com with SMTP id y205so780082pfc.5; Wed, 20 Jan 2021 20:44:33 -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=or/uV8vNwzSNQAD9VOW+E6JxiU2rzML6E1U7mO1jiDzNuL2NIYAHw64HUf5uK50fl/ BMnGsUkuiEABSJ/Rf6x4WZE236IE57YW16ZaJuT+Fcufv89T0K2IGzkxIQuCOHeraIwD ZQNY6Cz/a++hUz8KgenUYRCZ3pPYRp/dU0uIya5WdmLgkEhcPGiqpHtGNMD4x+Mes/Ud BLljOq/WKBAk3TZCPf5I67nA9Iv2XmL/ncubnhVHDlatxw4KmCoDOxuAlqEwDCjwIMX4 hH/2dwwo1UkfmUGjFtNUc7xfNOvFDaiy9oeCl4CfSpQKbW5f9dcmI8WiUQZD34Eqb3TV b3fQ== 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=mjRf3eek51DdtULSG7xzvmy0Nq2GC4IQnCv9mrUOODDyzdR6DsxEphhoVeIbEFmxu0 o3E62MQbNlontwoGNFrlhIHOZwexfzrqi5GsYHfIGptRYmdO+/dKjCDxukq+B27b8Qg3 5HEhdHyRR2tn0bdZ8k7VM4AlG+yRjwt2cvEdAJ3eKrqpdbItd62mR2I8tKcyTbvoBxwt HlKvXo2xErY4UhVf6vyToYw1HVO9UoDAVFJf45s5o2xlNUGARBZQRP5lufVgqmaXwk8K Wq7+8Zm+RLrMfvczKJDDUU9IKH6rDrR9d1rusOFxn+Zup8OX1qGXwBdDHmvt9CN10mS4 lXKw== X-Gm-Message-State: AOAM533VMV8I8uGrNBTdnhbM0owNVe3yH/WFgDQmDyOkrb8WBOV7ULcA O7WIclQmNgZYDtXarAMK6D0= X-Google-Smtp-Source: ABdhPJxgMWq3EcaBTGUm+3pIVl34jEttbaEgC3Eeu3x5zjQqx3tSac0inE0U/K1D2V8XWxvYWNw73Q== X-Received: by 2002:a63:4c65:: with SMTP id m37mr12590854pgl.110.1611204273495; Wed, 20 Jan 2021 20:44:33 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:44:32 -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 v4 17/19] crypto: s5p: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:24 +0530 Message-Id: <20210121044126.152274-18-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368383 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 62A47C433DB for ; Thu, 21 Jan 2021 04:50:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C56923715 for ; Thu, 21 Jan 2021 04:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731799AbhAUEqN (ORCPT ); Wed, 20 Jan 2021 23:46:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732044AbhAUEpH (ORCPT ); Wed, 20 Jan 2021 23:45:07 -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 6685AC0613D3; Wed, 20 Jan 2021 20:44:43 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id q4so584105plr.7; Wed, 20 Jan 2021 20:44:43 -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=QuKnuHVPR0uI/jdQsnSht9GUZEGK9u5ViUc9Yq8v21a5b37KnprPKf0xEnOzA/qrFv H2jAk4IGNDF1MSBs2qsdjjP7HZJS8pqfMJn6sdfZmdA6uEFT1PASKQo8t85oE6E8WCcG ARO80VHAbM18QS2FHzEFOKBbeNnh+lCvsSCu129Souhtv4vlmUzHBM6avYKEbNBAPC6r cGg90jLbrj5+mcdVmVJwf+LLh68apdBXp7Qqe7MXIjwpwiYVPBxR96gePADcnX8QYsOe 1CVn8bj/6ohkHR/S+nmCQ5xjSAUjtMK+7yilHYQQT+8K6AJbbH9SRQBMheDH6F2AXkaf ycJA== 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=fyv0+Xoq8xHq9zg5miD45LZCvu91r23qLB5mkwpNexMzePPFr1ZjmdRoqARaE260bB /37MbT/xTrfYdYeI5djz7s7ZXQOc0nqTlZd70bi/CHxsWaBMZ0iLqSU876wf6iPW33+h 8Ltsh7NaM3lZT0daJQPiyzZVJr28dSVLd9aK9d7sIpJtpIG9SP6zUVOad41PCNo/TW1h R0W4Sl29xj2aAUVXTOG5ArVyICvRNrrBw3qjLQACuixdH5lesiSP7YUqckePzOPJ0Vkt SrxLlwT+YhxtPx2qMu1Qb9AFEY2hpAmvSmyk1BbU/DIZYCQdSTNwW9KM7X+WY3VuqZW9 FpSQ== X-Gm-Message-State: AOAM530nVStuFxLyDo4+vTl3NVdAh+uKBeeOQ49c6K+mm0XcpNbUE+FR tpM93PhybhEIBkLpoPbEz4Q= X-Google-Smtp-Source: ABdhPJy96E/CjEntE3VvwWk49lAn8/IQldu+ebf0A17yHzBCo7j86qPnnA0UVe0qU4q1/qkQmIBakQ== X-Received: by 2002:a17:90a:5d13:: with SMTP id s19mr9494996pji.110.1611204282975; Wed, 20 Jan 2021 20:44:42 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:44:42 -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 v4 18/19] crypto: talitos: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:25 +0530 Message-Id: <20210121044126.152274-19-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 21 04:41:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 368382 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 76D9FC43381 for ; Thu, 21 Jan 2021 04:51:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D4BB23976 for ; Thu, 21 Jan 2021 04:51:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726043AbhAUEux (ORCPT ); Wed, 20 Jan 2021 23:50:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732513AbhAUEpc (ORCPT ); Wed, 20 Jan 2021 23:45:32 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FD13C061575; Wed, 20 Jan 2021 20:44:52 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id q4so584259plr.7; Wed, 20 Jan 2021 20:44:52 -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=eS/1ggdFWLmfnsVYZXAbwW1SmBRdM7h+i8u7eMxYshtdJMIwvsuLM6yn9GZBZ9S/K8 KPB7IXVkvHseo+uWh3JXdsekkzlPnpD1fO5nonseXf9GOWYDGdR+HhSALKkTBW2yHqxA vhNiTnb6elTC+ROHAMTVxAmqh54NOFG8AXMg5XK2ZaPgk0Zkawh6ZbuAdmEfdFkEhZm2 1UIpxFwDL7fAY+OlhacieGmRlqtZX1Sk/wWXzHNgZL3wH6FTjfH0lEmZHOzXOWK4oZol FrhZLsRXZ91FD1PC349AL88h5bApuFeMzE3PJ1YZJKXFQ8yXe/V3L7GGuSfN9S3XXoFM SpOA== 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=cqRFmP4HCr6x+0vWBHmYc/FCT8RzKVW7gSjVc41N132gmYrqJJAZGYpVjEK7/hn5sA b33dUNiZpvpS2ckgshygcjIrQ1Y/soWDOuJJ2z/ev+U9yf12YE61tBd8TOuZU/FEECnP y9RJBNvDD07GDon1FkYel7rg5KAliqdbWfYGVSIHAJrPf26YlLtT4ANT7UF99v8HDgCW OIl0FJigRiKVzKV9M0eyIunN6fO2q9OqiavGqp2JAVBLnYwimoQnTOKqtYzVfGND/gDU 4tTapBj8Qq+/JCXz1Vv6W0EOCvv3QD0Bbx5uhj5zWrL5KfYQerMcPNBPr5oe1+ma3LBY ROMQ== X-Gm-Message-State: AOAM531Y9x1F3fwANvASbT4JMnl4HnGiOHsGPcJOyAGyuZG068+NBmZU uDsJXrJsGV3v5k2qkwAcg+g= X-Google-Smtp-Source: ABdhPJwK12yN+Nm/X1Li1WBmyUtsyI++TR5W0kfCfg/xipnswNtdqtNaye9X6xF+P0AT5ihT3NrvwA== X-Received: by 2002:a17:902:8549:b029:de:8aaa:b012 with SMTP id d9-20020a1709028549b02900de8aaab012mr13199334plo.34.1611204292055; Wed, 20 Jan 2021 20:44:52 -0800 (PST) Received: from localhost.localdomain ([49.207.210.174]) by smtp.gmail.com with ESMTPSA id jx15sm3916014pjb.17.2021.01.20.20.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jan 2021 20:44:51 -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 v4 19/19] crypto: octeontx: convert tasklets to use new tasklet_setup() API Date: Thu, 21 Jan 2021 10:11:26 +0530 Message-Id: <20210121044126.152274-20-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210121044126.152274-1-allen.lkml@gmail.com> References: <20210121044126.152274-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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;