From patchwork Mon Dec 7 08:59:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339222 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.7 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 D2E34C4361B for ; Mon, 7 Dec 2020 09:00:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9C79723358 for ; Mon, 7 Dec 2020 09:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726239AbgLGJAe (ORCPT ); Mon, 7 Dec 2020 04:00:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJAe (ORCPT ); Mon, 7 Dec 2020 04:00:34 -0500 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D244AC0613D1 for ; Mon, 7 Dec 2020 00:59:51 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id n7so8353113pgg.2 for ; Mon, 07 Dec 2020 00:59: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=NzBxuchgBhXbhsOEbY1R6PmYAYkMhLDdWvlyeLY2vog=; b=DRtOO2F3FiNS2yenHS6AFnLnafKEylS3w29eKfoMABLwkaCMZSa/EV/19jC+/8t7HI eAEAOmyP40wMBwruw2IfT6AjI9M0WnXMgx0xXPljlN2YHykmzuHTpoO/IPYPpulxQeFb nnGkZWW/GUzB8gln1DYo/FlbpR2NW+3Exc7/TDEf2Hrp8TKHESYySnOkRN84PdoruxJH 6v/QLhYYqLI3L2I172Pz5F/bRk+3Hs06CtlJ0h9lNipy9cDuPGZ3JRi5Z1wKxkmWoT0W GvY+d50L26ypxdIwbWCdjNw58SBwI4E3rXqj7xTxUQFJncV6WTHwieijECtAo6gj12x0 x/ZA== 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=NzBxuchgBhXbhsOEbY1R6PmYAYkMhLDdWvlyeLY2vog=; b=qFsNPWnm1hOETYZRWyTMjDn/XcgaPLeIFTQqSybu0MTDmlioobdkYOoCGX4f2we6KG L2yzyS3ST52mduffZK9cWtR3eTUfq6KKSUBJAbyT0cQ4fAM9wxkI49EKCjqwGC9IEvPf DDuI25ca6MkDRD00IvH7Q/TY60iUf1C5K9XfhxgANEHolsHtXycgPK3cE8yMclNnyZmp rG3851vjbhmyV5QU6LcUpkyDiPc3oDElkr+D+nlW/EDVTdue8jTZDdD9AJ9ZX3aZb5Q0 CJVsskXZmvPma9jB/XdsF7zLtBcgvD01O6BM54rK9jEdELPTR//KW2wmGxvHKR8sREbc /ORA== X-Gm-Message-State: AOAM530ThtfkXXWEpunpAJCxvpkHJne3K/8zR3RXkIih9Hphf6r8yHai gbhW6BQEIQrXV/yU1Z4Hiw8= X-Google-Smtp-Source: ABdhPJyWg0t8ZZLWemoqd7EqH04HVFTB+b26h2x0RS1jicddGF5M1Tp9w0YMKw1GZa7YztD3neF6zw== X-Received: by 2002:a17:902:ee52:b029:da:4dee:1a54 with SMTP id 18-20020a170902ee52b02900da4dee1a54mr15113403plo.29.1607331591509; Mon, 07 Dec 2020 00:59:51 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.00.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 00:59: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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 01/19] crypto: amcc: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:13 +0530 Message-Id: <20201207085931.661267-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/amcc/crypto4xx_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 981de43ea5e2..3700446a99d8 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 Mon Dec 7 08:59:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339851 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.7 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 72A8DC4167B for ; Mon, 7 Dec 2020 09:00:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31B4F23341 for ; Mon, 7 Dec 2020 09:00:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726327AbgLGJAf (ORCPT ); Mon, 7 Dec 2020 04:00:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJAf (ORCPT ); Mon, 7 Dec 2020 04:00:35 -0500 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01D95C0613D2 for ; Mon, 7 Dec 2020 00:59:58 -0800 (PST) Received: by mail-pj1-x1043.google.com with SMTP id e5so6979950pjt.0 for ; Mon, 07 Dec 2020 00:59:57 -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=lQmsB3eRaTqWnNYrdOpAfX6/DjfqVjGaRHnXLnbG4FE=; b=NVjazYzkyJFBEGofN0G6piHHeauL0d1lCqUsYHwLEP62AbEcTPXqugfibhgH76AgQC o7JZ0HL0qydJ5sokhcydeLzpjAHrR9cY7MjX5GtCL7hgVYqExcCbagyMwHacjzpBkZYL g5PRa26b8vzDZdLJ5tZRddTbP3WsAsHkPpGwIotzvteMV2EZ4toDNvJodHMku18/C8em qqYE5vfPF/dISMmXJcuzn1M8PXd4Dv/Rs1V8qiy2AL08sj9KbSBCHBHkV4XKr3ZpAx61 hdGg8bFNG6U0ZlS++fYmTVJt6devZdGyqm+L14SDwuYz4aNZtGhLanYJLAm7qTmVLGcB 1aOw== 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=lQmsB3eRaTqWnNYrdOpAfX6/DjfqVjGaRHnXLnbG4FE=; b=YbgfJ849WFgCHAn56JNFYtem6sNVZ/wdM7yWM4oAG8avu0DyKcZyhHatz9CZe6K672 Uvo0zoUWA9sgCpCdtAMBIBA50tJc93+S/WWKz424FcfvB1RQxQisZWZ0bW43hAShB62Y BvIrKJqU/k++k46AdsbbOCqjSg1eYo34vFqrYgmhwLk5TpwP96xxbnhHBcMOI4T399v1 kyc0vRMQYs8B3pll+29fp3I+jCBbi8BahSCZVtvGT8DtPsDlU1buJvApNWGpjxPklYYk dNoXVvTQQ7Z5j0lVq7deLUoSw5RFZflKI7W6YCsGrSbjUcU8scz74TzEXG2ZfAP521q1 vgOA== X-Gm-Message-State: AOAM530XZQdwE6+8fOQfofl8Vwfv/QLppsADWsMVfVui9JGrzc/nUugS ioW5cjZ6XZDqNA0nFlPWom4= X-Google-Smtp-Source: ABdhPJxHMnul7yrU/QIEWrPq3/O0e45B5Em3LEfX2JjW8Wuh9SMbO36XXv5iE+h2ZpvA2f3fFxfU0Q== X-Received: by 2002:a17:90a:990f:: with SMTP id b15mr15239943pjp.166.1607331597564; Mon, 07 Dec 2020 00:59:57 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.00.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 00:59:57 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 02/19] crypto: atmel: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:14 +0530 Message-Id: <20201207085931.661267-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/atmel-aes.c | 14 ++++++-------- drivers/crypto/atmel-sha.c | 14 ++++++-------- drivers/crypto/atmel-tdes.c | 14 ++++++-------- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index b1d286004295..804e6a5a39d4 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2300,16 +2300,16 @@ static void atmel_aes_dma_cleanup(struct atmel_aes_dev *dd) dma_release_channel(dd->src.chan); } -static void atmel_aes_queue_task(unsigned long data) +static void atmel_aes_queue_task(struct tasklet_struct *t) { - struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data; + struct atmel_aes_dev *dd = from_tasklet(dd, t, queue_task); atmel_aes_handle_queue(dd, NULL); } -static void atmel_aes_done_task(unsigned long data) +static void atmel_aes_done_task(struct tasklet_struct *t) { - struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data; + struct atmel_aes_dev *dd = from_tasklet(dd, t, done_task); dd->is_async = true; (void)dd->resume(dd); @@ -2499,10 +2499,8 @@ static int atmel_aes_probe(struct platform_device *pdev) INIT_LIST_HEAD(&aes_dd->list); spin_lock_init(&aes_dd->lock); - tasklet_init(&aes_dd->done_task, atmel_aes_done_task, - (unsigned long)aes_dd); - tasklet_init(&aes_dd->queue_task, atmel_aes_queue_task, - (unsigned long)aes_dd); + tasklet_setup(&aes_dd->done_task, atmel_aes_done_task); + tasklet_setup(&aes_dd->queue_task, atmel_aes_queue_task); crypto_init_queue(&aes_dd->queue, ATMEL_AES_QUEUE_LENGTH); diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 75ccf41a7cb9..84a7c8a9dd02 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 Mon Dec 7 08:59:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339221 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.7 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 11F7AC433FE for ; Mon, 7 Dec 2020 09:00:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D80D423341 for ; Mon, 7 Dec 2020 09:00:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726395AbgLGJAl (ORCPT ); Mon, 7 Dec 2020 04:00:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJAk (ORCPT ); Mon, 7 Dec 2020 04:00:40 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6903C0613D3 for ; Mon, 7 Dec 2020 01:00:03 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id s21so9160568pfu.13 for ; Mon, 07 Dec 2020 01:00: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=xNg8pNNWaksnY+6lDZvyxPvu8HjE3EZxEQZ5eEG5LTs=; b=JUEMDpGBsD+4TbFIlDTozsCnEXlshfWWGUCv9uTlgDPTRox1UvN9XRQ+h8C0g1eT3q P9dgi3Vt2bcR4vAQA9CI4NZ4J1F/PKgkHmY4Rod+sb+RwPTqUvpSZNePs4FztXPfIIT9 Y8TTh/3GQpMj7ttAFHHhqwlP/HO5yHjw8AievCm9STMCbmhpUJIUuKjD2fkk3CK0C7ax oQC/4aGTTq4+WL8WPWWAqwR3KxxGIR83BA+bhN/5u4sJsFa+SjiQOSavwWpU4tFopP8G GdvyTAErFxFuinB6+b0d+C3EYkENV/Kn2vPHa4O32MmKAdHRyY2Be3jI1S7ttMwNkauj ze+g== 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=xNg8pNNWaksnY+6lDZvyxPvu8HjE3EZxEQZ5eEG5LTs=; b=S36Sp+S6nkiAo7FJCkU7/b8xWFz34uEKWakG9eGzOF7ec2T01hNrNaEPXMPyWVyK6J ixFD7QnnMXOZ6TP3j/5sno8LtsMnjwvZFYnVy4OYJBLsUIcbJIeKoq/rlcHAlqkzTo7q 2Rt9/HU/UqnO1grJpyBmSQvG5Xwa7Y6Bd3S1NgS69K7RVI9+U6rQjyy1IlpDXicZg5Vs snoRgumV2KDmpQXv7nI9yt09nthNOlqNjmtqQJjKOByjMeUqlbDl4+n4p+Lei+ChqrtB OIXBvwVExmvIOCRm5ziZeyvsVpBYWG0iikdcIxDoJk6h67gnFJpYVf3pjuHyeZNwksei NdvQ== X-Gm-Message-State: AOAM531T+dPpJLz3YBrbmOn37YcDruW+b4qXzKv34eljJi8f1sjPh//p Gk0FGZRiEUYZ4/koMVZdbCU= X-Google-Smtp-Source: ABdhPJwkzh+08sxL7KcKdqnLkBNyw/K0UA+5XzzMxAxxlf/b6v5U1/hmxmxXN/2PxXkohgsxkyCSSQ== X-Received: by 2002:a62:2ad5:0:b029:19b:38af:83e0 with SMTP id q204-20020a622ad50000b029019b38af83e0mr15270217pfq.54.1607331603516; Mon, 07 Dec 2020 01:00:03 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.00.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00: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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 03/19] crypto: axis: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:15 +0530 Message-Id: <20201207085931.661267-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/axis/artpec6_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c index 809c3033ca74..d24658f6c496 100644 --- a/drivers/crypto/axis/artpec6_crypto.c +++ b/drivers/crypto/axis/artpec6_crypto.c @@ -2074,9 +2074,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; @@ -2899,8 +2899,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 Mon Dec 7 08:59:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339850 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.7 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 DD913C433FE for ; Mon, 7 Dec 2020 09:00:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A67B023341 for ; Mon, 7 Dec 2020 09:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726226AbgLGJAy (ORCPT ); Mon, 7 Dec 2020 04:00:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJAx (ORCPT ); Mon, 7 Dec 2020 04:00:53 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3CC8C0613D4 for ; Mon, 7 Dec 2020 01:00:10 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id v1so6972803pjr.2 for ; Mon, 07 Dec 2020 01:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lYFZGtLuk72sYVLmu7rAbpM8KMBKDbH9+vOX7LfurE0=; b=IpnVdSiSemytDcytJ/5iu7FzpsyNRWhYZE2qMPN2PEOIzGIirH/N2n7MwgZ33xOFU4 EncwQQk1z/FTFpmv+XQyY4Ev34A5wIKzSPO5/GU+FKE4av2/CKnEJcgk9l3lC1ulTV3E 120TL4CPYg9p9Bl/opZdRcF95O0qDwKi9zuUHadSVGpeAFPG7HLKSB4FvQnS5Ndituho 6cr6dqSOK0px3ATrHP2j3m43O+Mf1mrMFA6zeUFzy6iz7zsffmlL2Ummkx1lkljxSrb1 dHkIoyEqj/yLlvfovox2lSX/2WjIvnEJoyk86SIg3U18XnippUvXHUGpSvWSyWu0BZCS 82eQ== 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=lYFZGtLuk72sYVLmu7rAbpM8KMBKDbH9+vOX7LfurE0=; b=i2io2i63jS96UUDzYs7G2Byn7Th1NZLP2L8fpyrWagSS58aKUO0zl7tJciSJe7JAFY LTdBRl+cMr9QMh3dbfT2vuVmxDPERHku/WAbOXdYwE8d98nd68sNiV32jm3hBRSZzmxf ngsggkSLcY52bj+KzR902tLSXBR76MfcvMQ9kIY+RUYAPCrd4NkUoXPtglq6zLcC7KzY TjzqwWL0HYBiN/mkadOuGwAvKJm6qEBI9JucX6Rm1vYghQKgI3MH54bu6lJ61fVSI280 4zDaChywXPBFKhmpE6fiexKP9ZnMrvvNW5hm/wX8WwlAX5HP8X0rPFSX5XLA5fF7IWCX X5Uw== X-Gm-Message-State: AOAM5318+EE9ZWE0qEMPV9f/0v2fkWqdblBMq0Fn+da4Ztb9geIeO0tr YKthb8UxfqslQ0jKJrpnero= X-Google-Smtp-Source: ABdhPJypQnGHb6Koy+LvWz3rGHdxoNLT3V6GHblscF+Ke6QXc2UaGU7WVh0KcaohTb7qVbU3V1njVw== X-Received: by 2002:a17:90a:7101:: with SMTP id h1mr15269864pjk.26.1607331610345; Mon, 07 Dec 2020 01:00:10 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00:09 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:16 +0530 Message-Id: <20201207085931.661267-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Reviewed-by: Horia Geantă --- 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 6f669966ba2c..1b5939e42e67 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 Mon Dec 7 08:59:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339220 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.7 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 BE493C433FE for ; Mon, 7 Dec 2020 09:01:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D0ED23359 for ; Mon, 7 Dec 2020 09:01:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726424AbgLGJBC (ORCPT ); Mon, 7 Dec 2020 04:01:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbgLGJBC (ORCPT ); Mon, 7 Dec 2020 04:01:02 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFDABC061A4F for ; Mon, 7 Dec 2020 01:00:17 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id w6so9176491pfu.1 for ; Mon, 07 Dec 2020 01:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VnfnQSV6H9PvSIxQFc8Y9hliaEs25KDdA5TgREN7pW0=; b=G4DD3d+OiyEQxg4ciyK1dryykxk5VWU1nZV4ZjrIiyaTTrRfsuWFUIIwqFeI9cVsWP CumUadHZvdkZ7cOQncOh0omC/v56tHDBEA1eMjY2lSSx8PFBMqW4dH/64INfm9WAtur9 n5e7undCK20NMwz2bM57Z783mrA4B5z3jSroKwKIAcMgyepyDl2IXE/q2YJYWV/OL2UD UG/sZOjLR4/aJitU9yaEruzo1e876yI1AX3K79FDL2UT897D6DeE9osAb9UmnQ+DW7jV RaDON/1cuFxI31aTa6hffhYFl3NBcjVBav7bRWy2fcKfsGkbtzbpM+tcJZRtfk0jE6yY k4LQ== 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=VnfnQSV6H9PvSIxQFc8Y9hliaEs25KDdA5TgREN7pW0=; b=BijvgAjht27mECbgKkFJd8fz/BwMt4k31IKyxh+a9u6Dx1Y1502PXFgVWqkr29CgUo ZDwHdaTGePIehgpxJd6kSknbf1cdXBOpkpEBEfQRIDQfqoB4o5iubh8RcMo7sdTGRniJ rW0ISgZE/Yt34AgSdy77fpGSAuPSjie+hS1hO8pKtjp6AbYYAqz3JYO4Ys04fQ/r7ADp UwIA4X+ApX6zQsQxwBQKkBD4vVGhQ/7hI59NYcAN+OUTTxM18/vA9MnRLqnxrBLOwoUT Yht9tiH9IkPXGtGscqVKnMKH69DZQerhftpJz7m9SifS1QkJRGdUKUfW1UmWGSN/BbIK gMdQ== X-Gm-Message-State: AOAM533OS2Qm5n/GtSuRnVyoSAdlA6badnEPA2XnltWGFu7/TBdaIfNK L5fZguSLT1aRqXODEMOqpHo= X-Google-Smtp-Source: ABdhPJzmlet5ApFKimWbKQVg5zB/H1UneTkPFUDvmidX3M9scmVwqfoVQBD2e1M/GbdH7c35zx3/7w== X-Received: by 2002:a17:902:9f86:b029:d6:d25f:7ad8 with SMTP id g6-20020a1709029f86b02900d6d25f7ad8mr15524634plq.4.1607331617227; Mon, 07 Dec 2020 01:00:17 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00:16 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 05/19] crypto: cavium: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:17 +0530 Message-Id: <20201207085931.661267-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/cavium/cpt/cptvf_main.c | 9 ++++----- drivers/crypto/cavium/nitrox/nitrox_common.h | 2 +- drivers/crypto/cavium/nitrox/nitrox_isr.c | 13 +++++-------- drivers/crypto/cavium/nitrox/nitrox_reqmgr.c | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/cavium/cpt/cptvf_main.c b/drivers/crypto/cavium/cpt/cptvf_main.c index a15245992cf9..87f4cc6e80c1 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 3dec570a190a..cc6b7c78e070 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_isr.c +++ b/drivers/crypto/cavium/nitrox/nitrox_isr.c @@ -200,9 +200,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 */ @@ -342,8 +342,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; } @@ -363,8 +362,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; @@ -441,8 +439,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 5826c2c98a50..1c113be87ada 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c +++ b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c @@ -579,9 +579,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 Mon Dec 7 08:59:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339849 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.7 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 E2BD0C4361B for ; Mon, 7 Dec 2020 09:01:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91F8223341 for ; Mon, 7 Dec 2020 09:01:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbgLGJBC (ORCPT ); Mon, 7 Dec 2020 04:01:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726416AbgLGJBC (ORCPT ); Mon, 7 Dec 2020 04:01:02 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A70DC061A51 for ; Mon, 7 Dec 2020 01:00:24 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id 131so9160937pfb.9 for ; Mon, 07 Dec 2020 01:00: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=Hl02x8ql2XGF95XIKstR0+VLj5TGwdqR79qBtHrvrJQ=; b=PVBEZVERiXtOe7GDNM4swZX2Y6AWjP/R8pT+Rp5j9PHLnL2m1kOSQ98NjSUdAYVu0h nsnAM6SKAaxxcMWBhRZyp1dASFMBQfGpAqR2Q69cGboEQshl2mlYOW6V1j3F2XZxK1tM wiSQMTIb8n1nYuojfYuUBWLb7MQBgRVtXWUy17cPQNbFEsQaHQJG1berm6bBL+jMecLS yLHtVovq3C7/oTatiV5kl/jhRMK9R6Y0N393PLN/e6Sn7eu5gfS2RTI/1+Ik4N80LXBz Zm+t+O248Cj+x+ZY++H80AYXSH4J/wgXrG6cCkk5WeiG+R3S5CSZ7sxCvi7m7TcL7tHU jrNw== 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=Hl02x8ql2XGF95XIKstR0+VLj5TGwdqR79qBtHrvrJQ=; b=lM4zTLFXz5qKnNC8oKFKWDeXkRJqbb9WybdGJRlTaNZ22u+8cp4gLO0/gqgS4a4Xk2 iBFfa4vUnv4hDM6Yqs3USoWVyc5zvEEi+C5AsT5yDsVyYW6VK41GnTypOq4JKPJ/4d0i IJr55vAaR8SOmXDTQWzxhF9NPkooJWhOz/shlQPtsAZSAA4rfcwgc1CNGeMT9W4hoj00 o4GPUqHdGgBEsXda8SPMQHpuTAzUZ8Esnbuf6Iz4IBXW/TatQtPyqeZhJ2DI4VI190t+ Q3KHP4KkT+jeZtOe7cThJ3WsrUVXkzWQWgJ0VmZhR2h/bYuQ3JsdwZcB+pnNLLpQtEYd rXYw== X-Gm-Message-State: AOAM532xjbruDlJLc6tyGtKgDbplcKV6JpbPTsJNA4csYGEpwvJkUm70 I5EpWdwYUPxqD20Lxix5q3k= X-Google-Smtp-Source: ABdhPJwzFrdQQVvhHkK5bfWwvpLahJG1logcT+5pTHKLEcZY3C3N8k6fPf0QFDslFhmgcjMybBiRRQ== X-Received: by 2002:a62:8cd6:0:b029:18b:ad92:503b with SMTP id m205-20020a628cd60000b029018bad92503bmr15037751pfd.77.1607331624096; Mon, 07 Dec 2020 01:00:24 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00: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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 06/19] crypto: ccp: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:18 +0530 Message-Id: <20201207085931.661267-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ccp/ccp-dev-v3.c | 9 ++++----- drivers/crypto/ccp/ccp-dev-v5.c | 9 ++++----- drivers/crypto/ccp/ccp-dmaengine.c | 7 +++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c index 0d5576f6ad21..858566867fa3 100644 --- a/drivers/crypto/ccp/ccp-dev-v3.c +++ b/drivers/crypto/ccp/ccp-dev-v3.c @@ -321,9 +321,9 @@ static void ccp_enable_queue_interrupts(struct ccp_device *ccp) iowrite32(ccp->qim, ccp->io_regs + IRQ_MASK_REG); } -static void ccp_irq_bh(unsigned long data) +static void ccp_irq_bh(struct tasklet_struct *t) { - struct ccp_device *ccp = (struct ccp_device *)data; + struct ccp_device *ccp = from_tasklet(ccp, t, irq_tasklet); struct ccp_cmd_queue *cmd_q; u32 q_int, status; unsigned int i; @@ -361,7 +361,7 @@ static irqreturn_t ccp_irq_handler(int irq, void *data) if (ccp->use_tasklet) tasklet_schedule(&ccp->irq_tasklet); else - ccp_irq_bh((unsigned long)ccp); + ccp_irq_bh(&ccp->irq_tasklet); return IRQ_HANDLED; } @@ -457,8 +457,7 @@ static int ccp_init(struct ccp_device *ccp) /* Initialize the ISR tasklet? */ if (ccp->use_tasklet) - tasklet_init(&ccp->irq_tasklet, ccp_irq_bh, - (unsigned long)ccp); + tasklet_setup(&ccp->irq_tasklet, ccp_irq_bh); dev_dbg(dev, "Starting threads...\n"); /* Create a kthread for each queue */ diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 7838f63bab32..e68b05a3169b 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -733,9 +733,9 @@ static void ccp5_enable_queue_interrupts(struct ccp_device *ccp) iowrite32(SUPPORTED_INTERRUPTS, ccp->cmd_q[i].reg_int_enable); } -static void ccp5_irq_bh(unsigned long data) +static void ccp5_irq_bh(struct tasklet_struct *t) { - struct ccp_device *ccp = (struct ccp_device *)data; + struct ccp_device *ccp = from_tasklet(ccp, t, irq_tasklet); u32 status; unsigned int i; @@ -772,7 +772,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data) if (ccp->use_tasklet) tasklet_schedule(&ccp->irq_tasklet); else - ccp5_irq_bh((unsigned long)ccp); + ccp5_irq_bh(&ccp->irq_tasklet); return IRQ_HANDLED; } @@ -894,8 +894,7 @@ static int ccp5_init(struct ccp_device *ccp) } /* Initialize the ISR tasklet */ if (ccp->use_tasklet) - tasklet_init(&ccp->irq_tasklet, ccp5_irq_bh, - (unsigned long)ccp); + tasklet_setup(&ccp->irq_tasklet, ccp5_irq_bh); dev_dbg(dev, "Loading LSB map...\n"); /* Copy the private LSB mask to the public registers */ diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c index 0770a83bf1a5..a85690866b05 100644 --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c @@ -121,9 +121,9 @@ static void ccp_cleanup_desc_resources(struct ccp_device *ccp, } } -static void ccp_do_cleanup(unsigned long data) +static void ccp_do_cleanup(struct tasklet_struct *t) { - struct ccp_dma_chan *chan = (struct ccp_dma_chan *)data; + struct ccp_dma_chan *chan = from_tasklet(chan, t, cleanup_tasklet); unsigned long flags; dev_dbg(chan->ccp->dev, "%s - chan=%s\n", __func__, @@ -712,8 +712,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp) INIT_LIST_HEAD(&chan->active); INIT_LIST_HEAD(&chan->complete); - tasklet_init(&chan->cleanup_tasklet, ccp_do_cleanup, - (unsigned long)chan); + tasklet_setup(&chan->cleanup_tasklet, ccp_do_cleanup); dma_chan->device = dma_dev; dma_cookie_init(dma_chan); From patchwork Mon Dec 7 08:59:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339848 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.7 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 0EE9AC4361B for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE1382333D for ; Mon, 7 Dec 2020 09:01:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726452AbgLGJBP (ORCPT ); Mon, 7 Dec 2020 04:01:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJBO (ORCPT ); Mon, 7 Dec 2020 04:01:14 -0500 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB32FC0613D0 for ; Mon, 7 Dec 2020 01:00:31 -0800 (PST) Received: by mail-pf1-x42d.google.com with SMTP id c12so2089571pfo.10 for ; Mon, 07 Dec 2020 01:00:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nllu/1tGGDrEMJ/oLNxcbjQW0tHY+y5w5t3p2pyUa+M=; b=coDYmNpHSBdexEszS/lxNf+euhBncaDaj/GZHlSSADcBf5TZE0aDXv/F5x+8VM61Vd s5KfRX5O37Jb/lNu4mNT8Bx9GqUYSkdvXYq9K8XXC+xOlJrZIVsPV9nmRe43ZVWVksVp kYPLliJpULr0WMSHryPK4Q0oEQsU1Dpkbz28oTKONHbyWplTkhFdS5sUosYDMveaBABc 15sHiLZwvj2MC1nRavwZ0gXnLVfKcb9TPl/HKxze8iNrer9LhJ62Gd934ITSMzKE+HG0 8qw+r7lmqmeRY1lHYjeli/Gfr/rGkefLerTabTImvWYiDpY1I2zIStM62h1kVS3C4ey5 fZBw== 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=nllu/1tGGDrEMJ/oLNxcbjQW0tHY+y5w5t3p2pyUa+M=; b=jKws2di7ixX8elXd2te4IbVPYg/BGJKMqZ9CIw4ByKFLQvHB2+iT/xiQlEIT7kwEX2 gD04xtLn2EXahLlpeXwC/y+4zGww2fAvS6JtMJ8MawlOUGECEY4vJrzDPOz274/U1RGr 8lYmWSTUh49l0qGWagAFwg35JiltI7nreqBgI2t9NRsAYAgFx4QT6xsHbxvfgUsMEMfP xI+C0ww9E9KhSG+dCAl6M7gAPb8TigHc+0ej9zNBSp15uq1hR7+j7bqZyoTzBK6zWpUz w0xs3khpvYzFXYeGkrDA7I+FWt2Yj6sdnbKKyKXcv7ndpsgusFMoYyfxe/T+hdvNUtfi d4YA== X-Gm-Message-State: AOAM533VKQHVqdby/wZYwrgTLIo6e1P/yyLT9aybRngjMJyO6TkFKLIv Fw+ns0odex6Y7tetb998P5w= X-Google-Smtp-Source: ABdhPJwwk8liiggnVy6F4SuwIj/Nc9hO+9RpP0MMqzpZ7u0O/1tJ/9qt1x+xCF2w8xqZnLhs6mssNA== X-Received: by 2002:aa7:8a88:0:b029:19d:8f05:b7a6 with SMTP id a8-20020aa78a880000b029019d8f05b7a6mr15035971pfc.39.1607331631239; Mon, 07 Dec 2020 01:00:31 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00:30 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 07/19] crypto: ccree: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:19 +0530 Message-Id: <20201207085931.661267-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ccree/cc_fips.c | 6 +++--- drivers/crypto/ccree/cc_request_mgr.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/ccree/cc_fips.c b/drivers/crypto/ccree/cc_fips.c index 702aefc21447..bad228a36776 100644 --- a/drivers/crypto/ccree/cc_fips.c +++ b/drivers/crypto/ccree/cc_fips.c @@ -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 *t) { - struct cc_drvdata *drvdata = (struct cc_drvdata *)devarg; + struct cc_drvdata *drvdata = from_tasklet(drvdata, t, 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 Mon Dec 7 08:59:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339219 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.7 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 2DF43C433FE for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F03A623357 for ; Mon, 7 Dec 2020 09:01:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726480AbgLGJBP (ORCPT ); Mon, 7 Dec 2020 04:01:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJBP (ORCPT ); Mon, 7 Dec 2020 04:01:15 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75AE7C0613D1 for ; Mon, 7 Dec 2020 01:00:38 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id f9so8576531pfc.11 for ; Mon, 07 Dec 2020 01:00:38 -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=x5of+eu/O3/72kx5fP37UL1yWIpLxGlDGOGpwCqEig8=; b=UhgUXmmm5hHsgzg4VLk67KHbXam/G6cZDancgohIojsxIWWPAWR0P9S7hK12P9gGOs J3oqtih7OkDfpy5gC8enW7MOGfGMvMq8c7ip0JJstLv7NESWzxPgWNa5VhLpYkBWmzRx xP/hcITLH04H7A0+MSGfF1JIT4/CDFK+CT1JHa+fiOtAzC8s0OONZQoJMwwxQ0Yg2f7r SU7xXVODeVFDNtPK1sxK7OXmDPc2tW3lhPIMH5EoIGqy6qUCBe0Fz7nmU/0TjiIIymWU dLf6E8cWdcxEFRTbJINPHFcqLKoJRehVUYUqCL9TwL96LYG5HsVo+5jKItSb0PXrzB4S FcwA== 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=x5of+eu/O3/72kx5fP37UL1yWIpLxGlDGOGpwCqEig8=; b=kca0MOmbxVWFI9Pm3cIfDLVm+D4hWAcB5bgTUrOpf4zMWEfZDJixIHcXFGjsMUmgAD 6uZTciY4X8zeZoBEfoCq7ELxz5JNrSKupuQENssuqoRHAQ+ohUMLzFlRn2yVT1z9P4A4 w1JPcHQgOgxbBqfaenp5Ah+PeOQIc8Wn/0raKbef7z66NPqhs8rYD4FLuJGpDWB27v/x 1IYv6Y5iBScrTvbJCyD7uidamqg0c5T5aLINtHKb/5OglmipUMxFZ4FZN3fDRg6CC+EQ xk0mrDXKUyQmsqntEIVN0vnSLz9MBdVBuEyl/x/zJ99Jb9nUtd1RNDteVm08SZXnYVgS LRFw== X-Gm-Message-State: AOAM532AcBDF6Y6cM6MaUHbNtDTTCi+NWObUXX6RXkaDrc+2WHm7Brbo 0wao+Y5N7ZAslGRAZCqrrP8= X-Google-Smtp-Source: ABdhPJwN5u7DYmVUOjez2U/vkXdRn/aVPRTzLc6jlYV+LNOMmhQ3kUhuqqifsajpV54rZHQXxcUA/w== X-Received: by 2002:a62:6003:0:b029:18c:796f:de1b with SMTP id u3-20020a6260030000b029018c796fde1bmr15040891pfb.23.1607331638094; Mon, 07 Dec 2020 01:00:38 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00:37 -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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 08/19] crypto: hifn_795x: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:20 +0530 Message-Id: <20201207085931.661267-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/hifn_795x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 7e7a8f01ea6b..47f7bb43477e 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -2445,9 +2445,9 @@ static int hifn_register_alg(struct hifn_device *dev) return err; } -static void hifn_tasklet_callback(unsigned long data) +static void hifn_tasklet_callback(struct tasklet_struct *t) { - struct hifn_device *dev = (struct hifn_device *)data; + struct hifn_device *dev = from_tasklet(dev, t, tasklet); /* * This is ok to call this without lock being held, @@ -2533,7 +2533,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) pci_set_drvdata(pdev, dev); - tasklet_init(&dev->tasklet, hifn_tasklet_callback, (unsigned long)dev); + tasklet_setup(&dev->tasklet, hifn_tasklet_callback); crypto_init_queue(&dev->queue, 1); From patchwork Mon Dec 7 08:59:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339847 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.7 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 F213FC1B0D9 for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9035233A1 for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726525AbgLGJBW (ORCPT ); Mon, 7 Dec 2020 04:01:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJBW (ORCPT ); Mon, 7 Dec 2020 04:01:22 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B9CEC0613D2 for ; Mon, 7 Dec 2020 01:00:45 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id e23so8323930pgk.12 for ; Mon, 07 Dec 2020 01:00:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TLIrEr5wIXMbPu/4ewr5f4rk76+fGINRwBQrZI3OqEw=; b=LKi32KPFqNL3vsQH95/IP3J4ZnxdIbx6nTb41ksojqyqu8D5bqYJ0PMWBWl8K2Lgjx qOW2uT/woyfMJcsFUn4K3xNCyM21dIi+UuLHklEo3t5E5LfGe9EsXXbrQzguU0ACH5NE dNIlhG8o8hQWZr8KLtT8FSF9dJD6xGJmRUS8C7iejl7NEoEXwwIJYfTnDiD9E2j5cuBb pJEkZC3aSVw/Ji6XEVx+WQeREfTMiyGSINg58WWpIoq0udwWnyr44PeuPESoVGXvGfxM pZVHHjEJavlk8GI51ZR0gUM1BuyZkD1IizB0GB8LdwI3qByTG0UMdtd34ZohwlmlpXGW tVKg== 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=TLIrEr5wIXMbPu/4ewr5f4rk76+fGINRwBQrZI3OqEw=; b=i4YTgwCK0xbwBaOYTOjSE0iP2ww/ajZElzHeq25HbK8+o/S22mx/4h0d60BoR8acxq a54fm0CR0lPlR2ja8tNBS9iVtEWL8+HK5USvQ0tHE3ASMxBfQFt857/thQP1BrNN6+xI epTGcueXROGojW4kAYeBciAgEtLaNvxjm3UH8kUQbGT06ZZCnQeIRhwQceOgLHgz0TS/ pt5p8w91MBCrboayfMdNR+mlwxb6wlgj/oOp6ujLpzRd1cz3onTosb88QL6A4E0I5iJY TTdHdi0+FkYksZMIq/PWPbwhJtGz5MhnYgkn71BJzKWq/y1C0r6CRxfDLnaRA98E+woa 7UiA== X-Gm-Message-State: AOAM531gbYilzZNDOBDgb4fWzQKdMk54p6Cqu9s72h3Q9kCBWG+uH50y jSjy/i0P3qNslEFe3jY3ZCM= X-Google-Smtp-Source: ABdhPJw2neGee+CSqL2cvtMD7aGaxj+EyJNO7rpepJpVskZmSn3ulrUj6CKN0KUNYz9FfWiYUf++nA== X-Received: by 2002:a65:4887:: with SMTP id n7mr17818622pgs.85.1607331644974; Mon, 07 Dec 2020 01:00:44 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00:44 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:21 +0530 Message-Id: <20201207085931.661267-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/img-hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index 91f555ccbb31..9b66f9d8c52a 100644 --- a/drivers/crypto/img-hash.c +++ b/drivers/crypto/img-hash.c @@ -354,9 +354,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; @@ -886,9 +886,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) { @@ -953,8 +953,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 Mon Dec 7 08:59:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339846 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.7 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 0BC9EC2BB3F for ; Mon, 7 Dec 2020 09:01:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6FCE2333D for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726527AbgLGJB3 (ORCPT ); Mon, 7 Dec 2020 04:01:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJB2 (ORCPT ); Mon, 7 Dec 2020 04:01:28 -0500 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFDC0C0613D3 for ; Mon, 7 Dec 2020 01:00:51 -0800 (PST) Received: by mail-pg1-x542.google.com with SMTP id o4so8357936pgj.0 for ; Mon, 07 Dec 2020 01:00: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=Dhlnry4NnWxGfU7xyG9jOMoMfechIl8tc2kpnH7quI8=; b=HWvL63nCN8ED8T6DxDhlhWlHgtWg7KFc7i0RCZvQxLOuQrpUqpmds8R9bbMtD/oCbc 8Vvj8BS5QpTHWyllnu8a3mEZPMndy5X3OETUZZaU5DIXKdbtAtPLGSVIlZSA/xR5v3kW xohI3/qB3Pje9bN4Ax/UhYNNqNd69E5UmWPHJFN6Zw7Y+zxqVhvb5NOJcB0OFqmf3Oer 0P9fH4rZMnSBXmRNUZqNoYEeSj7wIblB9lOpV5OyRRwlpIoW0zUcO+KblZYK2SnHPObh UfHLYMjVik69zBhGQk71wY/4kT5zDMCcjb+PFnDw2xgXQlAS9Ma8sjSl6OyqngzJ0OL+ 3ZAQ== 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=Dhlnry4NnWxGfU7xyG9jOMoMfechIl8tc2kpnH7quI8=; b=Hpk5VEI4PzDKWtU8g8cR9e4oMys0ERLR8R+Wfs9u3IeoYhlI0CMgFCQY30oHqybBJj xtn6A3RnY8QqL6BimEfWHc9MlrnQmvbaluCePcOYk0NBQUEsgaTRKFPpBzgPNA3iKCE6 kc9VBcbTmOmq2QJGWtZS33ik6S59p8wVvhrADfp0wcowcoXX6ojokRdrfdWMS3Xh/KH3 QjF1y7wnhhOwsGL7cryQcL3xfsz11k/eE72Pah3H0Sd3/IpwdMbg7+lrImfsFKnTuHzQ NsJwJJLKlz+2sMz3qHaXuqG9H7jl1nKfeajxXsjN93/RmOe+SwjErZBI7JWnFw9G48iZ orxA== X-Gm-Message-State: AOAM532O0rJy2nhxnLWaDAb7bac+UJ5L6Jq4ZcjOs7trxbk4z9ilkeJS aMhVi1kY2az8+v81YrCE/SA= X-Google-Smtp-Source: ABdhPJzQKTaKN8Fro8IbUDB9hYbWvk4LqdE55HMO2Tqe6hADg851Ewa9z7B/T7NAT1VkD8HZmkuqCQ== X-Received: by 2002:aa7:8387:0:b029:19d:a8db:81a8 with SMTP id u7-20020aa783870000b029019da8db81a8mr14891061pfm.66.1607331651366; Mon, 07 Dec 2020 01:00:51 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00: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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 10/19] crypto: ixp4xx: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:22 +0530 Message-Id: <20201207085931.661267-11-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ixp4xx_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 276012e7c482..de6b51d030d4 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 Mon Dec 7 08:59:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339216 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.7 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 C0987C4361B for ; Mon, 7 Dec 2020 09:01:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 862722333D for ; Mon, 7 Dec 2020 09:01:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726531AbgLGJBg (ORCPT ); Mon, 7 Dec 2020 04:01:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbgLGJBg (ORCPT ); Mon, 7 Dec 2020 04:01:36 -0500 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 154CBC0613D4 for ; Mon, 7 Dec 2020 01:00:59 -0800 (PST) Received: by mail-pf1-x434.google.com with SMTP id w6so9178626pfu.1 for ; Mon, 07 Dec 2020 01:00: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=e0dUI8AGxbvnrFrBTmynHGYVP/vznJDLgVM97US7ciY=; b=UaiBWUBY/ZKe2kG0aaX1w/9KtIW5UarBuPjFPTkqSlZBc+xjUBnrR0jZUm03twXCuR 7lTBxFz6jfW8q3xV4aMYPQGXy3YBSuQayYk12cjmHClk7cUXa0Ze0BnXHZ+sZBcioxaE LeKCxd0gsLOiXxLzMwAUx1mLP4iDWiatqCz72K+sF+fZE8UCLkEfLDjPviNJl0ju41/g nXJGDuJ6kqJuWsXBnq7HJEiVWDP3tuLGC6iSf9qviMkqjmqxUuj1JkUFs4T6I/hrNCAY 65QoHTihCdVh+SRqc7nK8dN4s0wC3zoV3A4p3bVWup2Zh5aheH1ti8nH3metKhGcTAo/ g5uw== 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=e0dUI8AGxbvnrFrBTmynHGYVP/vznJDLgVM97US7ciY=; b=h0Fu+uzV4WnEMYd+1ToUuVmBTm1ZnGFn2YT76/aMAiweVIsePFTNykgv5wGItabal3 Vus8bE3FCDdKiqxS7SSWcpiTtLxCJbrFSZ6mBNPrCf98cnPHC9SQ4JIlIJQghkogK7i2 wz85wAGFF0jhhyzGTSMr/MlUXesJX3WqSB2b15MOuPSTuKgpfKFFYkiu9/eykH7RWjme /LnpRCW0s7d7EFxbdGH7vBPGHhumcv0PwPJXAAcd///tmY472U2WSecLFQASpjYPQIik hNBWWmHXz/u90GVmz/zC/+Fdvi0C80V4etHtjTz7sWPhOjSSvSNgZh35d5ZO/k26BQhM 1iew== X-Gm-Message-State: AOAM533ILTjiAw/5jbFWLXuUp/c2jeakytCIekK+C9RBZnfNzpRR+uYI Cf9k3ETPiwKzXgIPKxHNZ1s= X-Google-Smtp-Source: ABdhPJwbBuTlrrbNOGzkydTVU9NzPOqM9J9hDvoDKxyLGK1h05gx6ZJbWzyzX71ySiIVcNuyXzEfFQ== X-Received: by 2002:aa7:828c:0:b029:19e:3acf:98a with SMTP id s12-20020aa7828c0000b029019e3acf098amr265902pfm.54.1607331658698; Mon, 07 Dec 2020 01:00:58 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:00: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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 11/19] crypto: mediatek: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:23 +0530 Message-Id: <20201207085931.661267-12-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/mediatek/mtk-aes.c | 14 ++++++-------- drivers/crypto/mediatek/mtk-sha.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/mediatek/mtk-aes.c b/drivers/crypto/mediatek/mtk-aes.c index 7323066724c3..fa49bb5b043b 100644 --- a/drivers/crypto/mediatek/mtk-aes.c +++ b/drivers/crypto/mediatek/mtk-aes.c @@ -1080,16 +1080,16 @@ static struct aead_alg aes_gcm_alg = { }, }; -static void mtk_aes_queue_task(unsigned long data) +static void mtk_aes_queue_task(struct tasklet_struct *t) { - struct mtk_aes_rec *aes = (struct mtk_aes_rec *)data; + struct mtk_aes_rec *aes = from_tasklet(aes, t, queue_task); mtk_aes_handle_queue(aes->cryp, aes->id, NULL); } -static void mtk_aes_done_task(unsigned long data) +static void mtk_aes_done_task(struct tasklet_struct *t) { - struct mtk_aes_rec *aes = (struct mtk_aes_rec *)data; + struct mtk_aes_rec *aes = from_tasklet(aes, t, done_task); struct mtk_cryp *cryp = aes->cryp; mtk_aes_unmap(cryp, aes); @@ -1142,10 +1142,8 @@ static int mtk_aes_record_init(struct mtk_cryp *cryp) spin_lock_init(&aes[i]->lock); crypto_init_queue(&aes[i]->queue, AES_QUEUE_SIZE); - tasklet_init(&aes[i]->queue_task, mtk_aes_queue_task, - (unsigned long)aes[i]); - tasklet_init(&aes[i]->done_task, mtk_aes_done_task, - (unsigned long)aes[i]); + tasklet_setup(&aes[i]->queue_task, mtk_aes_queue_task); + tasklet_setup(&aes[i]->done_task, mtk_aes_done_task); } /* Link to ring0 and ring1 respectively */ diff --git a/drivers/crypto/mediatek/mtk-sha.c b/drivers/crypto/mediatek/mtk-sha.c index 3d5d7d68b03b..1f55f6143fb7 100644 --- a/drivers/crypto/mediatek/mtk-sha.c +++ b/drivers/crypto/mediatek/mtk-sha.c @@ -1163,16 +1163,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); @@ -1218,10 +1218,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 Mon Dec 7 08:59:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339218 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.7 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 4F142C4167B for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18C632333D for ; Mon, 7 Dec 2020 09:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726484AbgLGJBR (ORCPT ); Mon, 7 Dec 2020 04:01:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbgLGJBR (ORCPT ); Mon, 7 Dec 2020 04:01:17 -0500 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4886C061A52 for ; Mon, 7 Dec 2020 01:01:05 -0800 (PST) Received: by mail-pj1-x1043.google.com with SMTP id hk16so7053131pjb.4 for ; Mon, 07 Dec 2020 01:01: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=GcAYPi2He4WT4nOyUOQGohetD9h1+ROi0M4lDzpFuEs=; b=VOV8u1XTI0VAz3HA9t+q8ngVh4xQNv9Ga6L5nTwucsy3HdNJfRtCWwTKPnQnCcoNPu 2Q3wJbMhwYOH/w4mrPg1IaF3MymiINbTLpUL97/JNKLiW+PUbVLgO8z178MTnRLZ7Nyp 6HOJfQnL5do6xUg0izme0oXWd6QSmHHb7NCzDdDj4DckYqbcHFgIQGBjX01PbP7arAMc ZlCCyQkM8kMSUFs3J6N/pP+vZfPfUcZ52IF3iQ6QCuDAGgIQk37SliFGZGs+sC7Yo89n b6/ksoktxFyQXl/alFAFlkHprH7FGtHxZspPeAT7ZngZNmShXGmPLR5wE3FCqYyr4/lI dGNw== 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=GcAYPi2He4WT4nOyUOQGohetD9h1+ROi0M4lDzpFuEs=; b=FKmnz4ROjIe9njOXTcL1IYeIUXSOneCZfDLwGjLMby/F7bJKwmCZGzfuQDMeziXk+G jKFPdwPAr1nXC3NOO34xRro3J25z8iAqsKfCY0gf+z4B67Ubfdy0+lOabef9GhbEXaQG lU2Qkz4419FB4TeuA3BQoGyB14z5w7kp+18ixrnfCb+XCtPqpV6+QyDc+R3udqzrZnKV Cd3AFeFuRdEyiRWpRs14FvfvrcAhpg/B4WqbWEgwSRIMEqvqHjI2g5FxkyuKgkX0weA6 nTqvJfMKNklZCTpJIprtMnEal2L1dFhfswaZhsQ6FfEsiOnj5e778k3SOQqo1UWJ2V8p 5xQg== X-Gm-Message-State: AOAM532id9EJTKTOheJkmIFKEotWcAbePjsP0Zp+k6W/8L7v/w5sXiOX I7qJxH5K8zOSFu0+C/Y/yi8= X-Google-Smtp-Source: ABdhPJxfImiHKFQRVZn5gC/bvjgdR1cccZZfapyciDpBcOB/T1UnrT+NVihU77rjdMI1WO6BsQo5Yw== X-Received: by 2002:a17:90b:215:: with SMTP id fy21mr15747225pjb.227.1607331665241; Mon, 07 Dec 2020 01:01:05 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01: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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 12/19] crypto: omap: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:24 +0530 Message-Id: <20201207085931.661267-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/omap-aes.c | 6 +++--- drivers/crypto/omap-des.c | 6 +++--- drivers/crypto/omap-sham.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index 4fd14d90cc40..4eae24167a5d 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -502,9 +502,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"); @@ -1150,7 +1150,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 a3b38d2c92e7..b0fa0443793b 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1724,9 +1724,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); @@ -2083,7 +2083,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 Mon Dec 7 08:59:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339845 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.7 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 45948C433FE for ; Mon, 7 Dec 2020 09:01:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1BE2323341 for ; Mon, 7 Dec 2020 09:01:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726451AbgLGJBz (ORCPT ); Mon, 7 Dec 2020 04:01:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgLGJBz (ORCPT ); Mon, 7 Dec 2020 04:01:55 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F6C8C061A4F for ; Mon, 7 Dec 2020 01:01:12 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id d2so5286592pfq.5 for ; Mon, 07 Dec 2020 01:01:12 -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=SBLd7A+SLeCAxqu7t9KC/1LuDodNLH34yTZT195Qbig=; b=V/nvvdpbAm2HTIv7NRkBMdqo6AWPo2v3kMFA0+isJmP6m8q16UtsirsXkXpu2CCbWI dcDbRNHfM7x9E74oDWkhjO1Ui7aG+G8216kgC2RuG11MT8Q8HqMDkmvnbuYkLgoPQV5l FVRjFY7v6RDNE255LVx/zEMygZptqVPiDece4p52Imqwkz+5D3bMTUfNt60BJYSG1ErW DZqUaf+sDLMzdfmPFQTjMZZs+4i8DWDPITE0Y7dCwFPxCWvuUP1ZydlnV55Km8af7yeK eeaeeBIwqzmRBU7yNwKu0A2VBOfuwXZ1izmbTXoCvQLKzZEbGy0/+Sy7ORzjXGxH9U// Z+Zg== 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=SBLd7A+SLeCAxqu7t9KC/1LuDodNLH34yTZT195Qbig=; b=FrnHKmaJFq8Lck74cLPFZV4dNjivhYTsLDwgIjeYrO0Zxdx3AMf7Z7/nF2dBH0aAON 1dtx2/jHK9I8N0JBTEekGjs4Vh8XDctmGWMZpQXizugWJYPfvclU7skzO1H2MeFIwT3P yIUMpKWgYoBRsB8cRJhKyrNfAjF75uioGX4RI1pKi2HGnNI6hrHhl0azUP9ZGJXrHocG qcpJ/IVipJk25XEXT23EnUmxQy1qpCWqVl5uAiLZMcc+YT3qGLx+KCRIIdMZN9m74KX2 phDG66hcQsmVUvwHRBaHpGvGaT+uj7Kxktlg+SxozjXGs3N9xcoDpuZYbc6R6OH7NKXB CtTg== X-Gm-Message-State: AOAM533ByT/5xhsui44HsuKearkEnd1GVyp5SLd01Us4G8L1h/T909fO m4XW6FKA86whKeicaTspnh0= X-Google-Smtp-Source: ABdhPJz0E7uE2AhnfZ77YUzT9U7VF0+/WSHGyOrxo4AkCbvkEb75vLZCRMN/90HUJILoMW9OIvSx6g== X-Received: by 2002:a63:eb10:: with SMTP id t16mr12759586pgh.210.1607331671885; Mon, 07 Dec 2020 01:01:11 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.01.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01: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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 13/19] crypto: picoxcell: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:25 +0530 Message-Id: <20201207085931.661267-14-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/picoxcell_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index fb34bf92861d..e96fd1caba14 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c @@ -1136,9 +1136,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); @@ -1648,8 +1648,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 Mon Dec 7 08:59:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339217 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.7 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 2FF90C1B0E3 for ; Mon, 7 Dec 2020 09:01:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 082A9233A1 for ; Mon, 7 Dec 2020 09:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726207AbgLGJBa (ORCPT ); Mon, 7 Dec 2020 04:01:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726530AbgLGJBa (ORCPT ); Mon, 7 Dec 2020 04:01:30 -0500 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BD18C0613D0 for ; Mon, 7 Dec 2020 01:01:18 -0800 (PST) Received: by mail-pj1-x1041.google.com with SMTP id b5so3176131pjl.0 for ; Mon, 07 Dec 2020 01:01:18 -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=4mCl+VG1quISRri67xJaj5KQFCDnCTzLaRrkOWH7JsU=; b=lnQ5v3UX2W2r/x/vQHyes6K9heq249ZpMufZCezzXxp4d3l6W96+iwRF5MVEXJrN6i ua1fA19fke3Qdvv2JTLeqx4d7pNgd0B35SlIuBVpQbF8B7OcIc+yRjr2vut2Ig1DKf7m 34YaWpfsrEOpCNCC6+Is6FySQEf32A0QBIOsygJDkuOU2yFXOg0kv+bIfdp4g3zfJQJu EkXI9jvLARJAEBpbFzxiU+C+szZVXbI14ikJAIGdEUn42omWyH9GtPiG+b41c2xAXijX HwT3E1tsvL12TgnAImytds8DPV3N/jGrEafcFspFuHM8d3bVlxbW/KJHHKnOYFlXt1C9 QFkQ== 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=4mCl+VG1quISRri67xJaj5KQFCDnCTzLaRrkOWH7JsU=; b=SKeKQlZdhNXMaPIvP++Tj//Wwrhs+FcI+n6vzrzVZXIpIxjYXKKaHSrMDRrsaL6wKc XvuBhIyw9Uv9TucuiopnlsKudrY2UrA1fLTzNbfd6E82QYU5z1/31/S/FwFsE/WFs3hv gzXA3Zldgf+501tEOdMgaR/QJHcTPZ1jZS0xDGQHb9UqbpiBckzOuuUfLv23Fkfh2YgX Y02BEGi5AujMkHlofLgd4vZ9eEX67S7tRFHbUTX5mcmPzJvnRUpKxo7QXxzCAgJf2Ea0 gkqje4ji8V/0iLz+sPP16oVv/MlIJ+1qiq3jBByfGNZSAm13qaL2KkxLrkd9aNAxhMBr Dc3A== X-Gm-Message-State: AOAM531/mZCV2IHeUDmCKuFf4Q7vO0onZdcd7B602TTuJ/vfi0mRtn5Y CX3lpcCI5mxiSVrxwPmiZ54= X-Google-Smtp-Source: ABdhPJyLsO9zc8jmQ5yZ74tnN7d4rzTrT/9FZk3hpbmLQCVW8ta4eNKtpJOEzuKc/61XrgpBnPzkdA== X-Received: by 2002:a17:90b:4785:: with SMTP id hz5mr16116798pjb.157.1607331677750; Mon, 07 Dec 2020 01:01:17 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01:17 -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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 14/19] crypto: qat: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:26 +0530 Message-Id: <20201207085931.661267-15-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/qat/qat_common/adf_isr.c | 5 ++--- drivers/crypto/qat/qat_common/adf_sriov.c | 10 +++++----- drivers/crypto/qat/qat_common/adf_transport.c | 4 ++-- .../crypto/qat/qat_common/adf_transport_internal.h | 2 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 11 +++++------ 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_isr.c b/drivers/crypto/qat/qat_common/adf_isr.c index 36136f7db509..2c725c01ee4f 100644 --- a/drivers/crypto/qat/qat_common/adf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_isr.c @@ -239,9 +239,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 963b2bea78f2..f9e276cb6f23 100644 --- a/drivers/crypto/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/qat/qat_common/adf_sriov.c @@ -49,9 +49,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); @@ -81,9 +82,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 2ad774017200..60982c67b466 100644 --- a/drivers/crypto/qat/qat_common/adf_transport.c +++ b/drivers/crypto/qat/qat_common/adf_transport.c @@ -297,9 +297,9 @@ static void adf_ring_response_handler(struct adf_etr_bank_data *bank) } } -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); /* Handle all the responses and reenable IRQs */ adf_ring_response_handler(bank); diff --git a/drivers/crypto/qat/qat_common/adf_transport_internal.h b/drivers/crypto/qat/qat_common/adf_transport_internal.h index c7faf4e2d302..ff891f5bc783 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 c4a44dc6af3e..79c0d51ea263 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; @@ -215,8 +215,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 Mon Dec 7 08:59:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339215 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.7 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 DC1A7C4361B for ; Mon, 7 Dec 2020 09:02:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CE782333D for ; Mon, 7 Dec 2020 09:02:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726419AbgLGJCJ (ORCPT ); Mon, 7 Dec 2020 04:02:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726534AbgLGJCH (ORCPT ); Mon, 7 Dec 2020 04:02:07 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80DDFC0613D1 for ; Mon, 7 Dec 2020 01:01:24 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id f9so8578975pfc.11 for ; Mon, 07 Dec 2020 01:01: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=KSAoCdQyf0n+bqp1cHBDvxl2KUOc51F/2ZEjX4jvHOA=; b=B+bGkccBb1FmrPahytnbZhW/9ccgGXKkJ/W9Ct81ShecGWT7LvG2E/2nFXwUn/GHT6 ehKdH97gvzHEQ+ClFGTZcPOAYBCeJXVwjgTm4uApffXtktUqD7jlSoeKKZK8YI93ERRe qTJmb3b0+BUKgIrJofJ4nmiYbwy904H+fE3mq//7GgFKNFutjZhIh5EhnsnxxHKGzswP i272itG1s54SXVUOoYbJkE8GPEgOMYtfiBC3sDIll5J7a9jmPnVFT+sRMs1Z3sABjOmS KQ7k1iFeRsc+EKN+dghJr9v1YQOWXzVXehXxlQvdgJM1lBpc98iTSTcy02/uJxyU8ohu o2wg== 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=KSAoCdQyf0n+bqp1cHBDvxl2KUOc51F/2ZEjX4jvHOA=; b=Z0feKv8zkLbh2TEG9s0JrkJkVviZ/YWvZJpxap9KDUZFJDBgF8USINVofTI7bg7Ad9 1vyCGqmCY+D4F6PpSuxmheC1v2LzcXjHRl6Pcq/o39J+8fkX338RdHa43fuevYDpahhI KWuij/qjFcuvBwfugJJs+H1Cum4hwBaAfh2RS8tPOhZTU2/jdZIQ6cEqbnd/7tqMMjIW i9i/PNAMSv8oWooEQdMb4i6uuUNnY59b5aSyWEsk3tHQBRQidTDcCzA6n9BA9C4dmv+m uqEPGj0pz5RPB1NxK8QLXVgmhDvXyhZOBOFoMzF5JMp5KCzmshMTn+KgCp2KmMDKpMcj JcYA== X-Gm-Message-State: AOAM533fRTSSzHEfEPIA1hYeyvXClyM4I6nwjjNaaajknWMGPDT3EFgF 7BVPU1gHuC324twyQUkPU/w= X-Google-Smtp-Source: ABdhPJxHCxzuT9Qd65It9W8hO2z1stjNAx3iTCzYAK10xY0x5v50jrjQNVZYNs7hZaBVW4MbPGlhgw== X-Received: by 2002:aa7:93cf:0:b029:19d:e287:b02b with SMTP id y15-20020aa793cf0000b029019de287b02bmr7097813pff.66.1607331684143; Mon, 07 Dec 2020 01:01:24 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.01.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01: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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 15/19] crypto: qce: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:27 +0530 Message-Id: <20201207085931.661267-16-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/qce/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index ea616b7259ae..b817c74a281c 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -117,9 +117,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; @@ -222,8 +222,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 Mon Dec 7 08:59:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339844 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.7 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 28A71C433FE for ; Mon, 7 Dec 2020 09:02:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECDD723341 for ; Mon, 7 Dec 2020 09:02:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbgLGJCK (ORCPT ); Mon, 7 Dec 2020 04:02:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbgLGJCI (ORCPT ); Mon, 7 Dec 2020 04:02:08 -0500 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68174C0613D2 for ; Mon, 7 Dec 2020 01:01:31 -0800 (PST) Received: by mail-pj1-x1041.google.com with SMTP id lb18so4439178pjb.5 for ; Mon, 07 Dec 2020 01:01:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a0a+s8DfWmh39WSyDsFfhzIHFFGVsGTi08AQmbosj58=; b=q9ZQM37CmElJTky2NfOIFrcEZ3EPLdQ4nKPRicVUOVSUchKoqecobL7H8p56cAM66/ JLdS/WCuH9mjY14lkLdeYOlLDZidyW09jgf2BlwKmQh8IjbAKS56QLFrXavHqf/ZvNmi Ag5uAb0a31GiEWBTTIiNdBhYQuPSLTY+Ch5WI+nMaohXAbzkJWy6m7SubwGsXLwfhR13 CuFwhRczqCKTiYqwQDHj/wQM3+/600bW9KaW4+GUt6mVlOWHdWM4cNw7wmHp/eti3uDN 4ehVxMYCd1f46y+e+cLNwztO+uGjR6dSAoABLaqBPXXUCrDxPVuamy9vYGhU5qjQkRA5 nuWQ== 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=a0a+s8DfWmh39WSyDsFfhzIHFFGVsGTi08AQmbosj58=; b=GqTFqZ2yu+eQD3i7F5fKnEsKI3DNXdbHjnibDfjBdM4qQE8ytQ5iaqK4aqOOPU8piC 21hTL1wer2jCFzxxvy60PQ8fqP1CfWvpxrJIjCa5ssHxVlNV5q3PA9af/ApRJUoFZVUa 5394IY0RJ90tOq0KJQzwj3UnRSPeXa14ZCDwQE0myjO4bRsq0FSNHFY/Ue/3ZLpBrBby TuxTvsPfT3/WpiNRiWHFt5EiLRpw7s05Eeuv6gZDkdQ5dXA5HZw4op1sDBycmFfdFfPd ugSetyN+Jxh1s5Jdov4atrf7PBz8vDbGkwJjsBORW22UGynsfr/WqI103ChKUsghZWub UbVg== X-Gm-Message-State: AOAM531z6iETMYMnAjJfBoAY50rXDsnCcIv3Hi9bk/eRMEcImdvCV2pL N04Rc6DM+tHUaCK7TcY5gt4= X-Google-Smtp-Source: ABdhPJwGZer2FXc/4pJqfukARQ2Cq4qQYfAeJ5j7F8qsNFCGUryti8kBuKVXacQX5hlQcc1iaFErLA== X-Received: by 2002:a17:90a:e005:: with SMTP id u5mr15445795pjy.64.1607331691057; Mon, 07 Dec 2020 01:01:31 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01:30 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Cc: davem@davemloft.net, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, jesper.nilsson@axis.com, lars.persson@axis.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 16/19] crypto: rockchip: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:28 +0530 Message-Id: <20201207085931.661267-17-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/rockchip/rk3288_crypto.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c index 35d73061d156..af6ad9f49009 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -201,9 +201,9 @@ static int rk_crypto_enqueue(struct rk_crypto_info *dev, return ret; } -static void rk_crypto_queue_task_cb(unsigned long data) +static void rk_crypto_queue_task_cb(struct tasklet_struct *T) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, queue_task); struct crypto_async_request *async_req, *backlog; unsigned long flags; int err = 0; @@ -231,9 +231,9 @@ static void rk_crypto_queue_task_cb(unsigned long data) dev->complete(dev->async_req, err); } -static void rk_crypto_done_task_cb(unsigned long data) +static void rk_crypto_done_task_cb(struct tasklet_struct *t) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, done_task); if (dev->err) { dev->complete(dev->async_req, dev->err); @@ -389,10 +389,8 @@ static int rk_crypto_probe(struct platform_device *pdev) crypto_info->dev = &pdev->dev; platform_set_drvdata(pdev, crypto_info); - tasklet_init(&crypto_info->queue_task, - rk_crypto_queue_task_cb, (unsigned long)crypto_info); - tasklet_init(&crypto_info->done_task, - rk_crypto_done_task_cb, (unsigned long)crypto_info); + tasklet_setup(&crypto_info->queue_task, rk_crypto_queue_task_cb); + tasklet_setup(&crypto_info->done_task, rk_crypto_done_task_cb); crypto_init_queue(&crypto_info->queue, 50); crypto_info->enable_clk = rk_crypto_enable_clk; From patchwork Mon Dec 7 08:59:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339214 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.7 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 04FAEC433FE for ; Mon, 7 Dec 2020 09:02:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C0EFF23341 for ; Mon, 7 Dec 2020 09:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726379AbgLGJCP (ORCPT ); Mon, 7 Dec 2020 04:02:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgLGJCP (ORCPT ); Mon, 7 Dec 2020 04:02:15 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A6AFC0613D0 for ; Mon, 7 Dec 2020 01:01:38 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id p4so3296167pfg.0 for ; Mon, 07 Dec 2020 01:01:38 -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=TNGOSyD9pvSkFWvUcTJ6vgncpYFYELUqqTXdTgopIzw=; b=YqEgtCO1VCHtD+TPIaRKXJ6nBtvUPhRnW/tZPf/a0BgypZWAHgfVxRoTim5JqfLihs UL2bYIdD5/vDeoMGHtIle8YMfNtVnVPxEm5E83GR8sO1N4xi1Cwdn+R/WNTk7ERdTX/1 Dn0qiCtN7JioHWCQPTVKhylS21nJx/gLtzAHDjB9j2Amnb/QhmVPM3iQioP4PL6tCAvy 0X5d8A7XoL9ZVXHuYOP9AgGpJUDgYpf27HByfom2KBC6V14EfD+DlKu2qHtuicN18F1L DVKcy4cQdn8WzfzslL2yKwAo7lC9Rl7bh5JA5FylJKOeO/GT0d3iTiaEM1u+YDm6y8FP xNqg== 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=TNGOSyD9pvSkFWvUcTJ6vgncpYFYELUqqTXdTgopIzw=; b=nJQiqrKru2etzx6kPVjmiljOMcW5LnLNMoES5xa7Gw9Kep4P+A/npSgbJ7YehIfPpJ ND9rT+h5vRPfMb/Y3nH0UPMEdkNeOAOdHU5Dijs5idzWHXOp45Un/2bC9nMe/J4Z986F JpzFAWImxfDwHF/X0RxEqDS68Hls75ntS5oys0yN2p8kN/GXmH27OIpNXlWX89IeUKWH uxmC1nTAKzhe2gMwk+ffug05cCmphmV7Buhuzj/WGxiXKCjoR8waZcaq0QfJHAVw2I8K m0o7MC+UYo2slvdqSSxCs9D6FZ9hY+Tq85XRzJduA+5sPuPFoHGEKYOmto9xm+ZNYCv/ OJzQ== X-Gm-Message-State: AOAM532Y2GV4+ArLIlHecbdbDhxyMHT9yCxMTjXdFtJb5wYGfz7tT7Gb HDNmz1e6tmFy70DzMTqEihw= X-Google-Smtp-Source: ABdhPJzH1NILmg8DaeKOl+ffgiDfnXwTRLvgsjb1J+cmX1q14iDLXGQW0UtcBx1ObaHchTs716peTQ== X-Received: by 2002:aa7:82c1:0:b029:19e:3672:50ca with SMTP id f1-20020aa782c10000b029019e367250camr685546pfn.12.1607331697836; Mon, 07 Dec 2020 01:01:37 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01:37 -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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 17/19] crypto: s5p: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:29 +0530 Message-Id: <20201207085931.661267-18-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/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 88a6c853ffd7..81d5222d5e63 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -1444,9 +1444,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); @@ -1974,9 +1974,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; @@ -2257,7 +2257,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++) { @@ -2267,8 +2267,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 Mon Dec 7 08:59:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339843 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.7 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 8AE7FC433FE for ; Mon, 7 Dec 2020 09:02:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 56AD723341 for ; Mon, 7 Dec 2020 09:02:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726491AbgLGJCW (ORCPT ); Mon, 7 Dec 2020 04:02:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgLGJCV (ORCPT ); Mon, 7 Dec 2020 04:02:21 -0500 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B535AC0613D3 for ; Mon, 7 Dec 2020 01:01:44 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id t37so8347527pga.7 for ; Mon, 07 Dec 2020 01:01:44 -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=bcWybFW0Ro+8sR47Oi3fg+rTDgDElKicz0ep/BqaKXI=; b=iFLr6cVQD84XOdcT8Kh2qAJ2UxyPCdwT2MiMfkxr434r9ng7gRQnW+Gjjm+3LFQdjX O8jOErV8qyZ+wWGSJuWxEwm1BVNBiu8clC9dj8qheK225ngAuzYJ9mLzbc/qTzguTcg6 wpcs8xD4Yo6S/woW19RlgENhApFdtKejdr1kOEtPuZGrU0VaAk71Z9TdGJ7weG+5dj6+ Ww/B9mvKJV8TiJctYjwL3JMTeJHdoSBg6gpuSVJ9hKb0D575Q+kGgeLezuqZqV5x8a3I ojxXgQOh3jYnNrpIFh3/9ZEty+RQYDOdgwLkAahTM3VoJJnNCUw0lcMKWpf9/6ISJT3p q6iw== 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=bcWybFW0Ro+8sR47Oi3fg+rTDgDElKicz0ep/BqaKXI=; b=c5Ra7/25YjWS7GSbbAkygpcmS/XubvDUJ8y5cuvvrn6nzUl4RbCpxGHShxMl0IpIpL keJ4VPewoWzDM8VD3Su0tZ7LZqWj+Ad8G8O/mEKByXuLHVqXLg/MTdRaZ/z3BU+fMHX6 8oJMJtLJArn0vYdZyS2G61ztiN6yNRLWUb3MUuBa7nqWU9bnK0K6//gMQARMWvE1FB/u rxvi/hr6fSYwrl8bwnq3qPHeBBQziqKW9bz4uTHEnw8FOltDawfAXLXwDQzOsIvmdwf/ 0/TleJY+S/fFdGUG3tiBRdzZ7HlJT2ITMVooLz6Q7M1fL8jO09258kM4RjzxTXn0A5hw ww/w== X-Gm-Message-State: AOAM531kpqn0JbFB9FZPAosACI0QZi4qgb0k1WoEibhIVh5TW0BL9UMm uESd8mCIRwZr+IQyitc2PT4= X-Google-Smtp-Source: ABdhPJx+DTWuSfZMEdRqFW6QP6apGccblWe4PJLBsoGSElAl0nBpKdxuCZDqV992H721q86JMUiOVA== X-Received: by 2002:a65:55c1:: with SMTP id k1mr11295329pgs.130.1607331704276; Mon, 07 Dec 2020 01:01:44 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.01.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01:43 -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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais , Romain Perier Subject: [RESEND 18/19] crypto: talitos: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:30 +0530 Message-Id: <20201207085931.661267-19-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/talitos.c | 42 ++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 66773892f665..7cc985ce0766 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -402,10 +402,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) \ @@ -428,11 +429,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) \ @@ -452,10 +454,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 @@ -3385,23 +3387,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 Mon Dec 7 08:59:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 339213 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.7 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 3F411C433FE for ; Mon, 7 Dec 2020 09:02:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1186823341 for ; Mon, 7 Dec 2020 09:02:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726346AbgLGJC3 (ORCPT ); Mon, 7 Dec 2020 04:02:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgLGJC1 (ORCPT ); Mon, 7 Dec 2020 04:02:27 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAACAC0613D4 for ; Mon, 7 Dec 2020 01:01:50 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id t8so9170615pfg.8 for ; Mon, 07 Dec 2020 01:01:50 -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=cGKoDGcGM+RwGvXEqZt36aMwO9Zs+cXK/6ewtYJSP6U=; b=YMUffoAifTEFNCq6VyY6CW1Da5PBrBEZ29j1IR3CaLHYd/0SAFTxhxLQdD1w6PNc7I SBR5rUDQ65ciNi5Jpb2WLnZAwYyAou3QBLb82w/nysjGY9YDXzY6lLXsrTBLAewUhwDh 4TOK+La1vC1Nm98s0VtRBIupGnumoFNzWlB37Xqq2fmKy2pTVsszYuG3XACQewAUPHxw X76Z/OskZ2w29dnN2YPg5c0xQwdzgY3481dRCnWyKmX8RN5fLrq5VsVd26c9bnOjODQE E21+kXhJWZ8hNl3IEr4CtOgDSgeHlBLhCejS7ecqM1YztybdPqWgciXhuUM9zwLg3M1k IMIA== 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=cGKoDGcGM+RwGvXEqZt36aMwO9Zs+cXK/6ewtYJSP6U=; b=fQu0/CXlzkc+e1af89YxYCMtlG3NTUAhOKtg2R3cemRipNMVGjC7nHtM2BmeO4xcF2 aaa9dtqWhooGbxG4GOq9U3CI+dFmonvYsQqMfWoWhettukO/pJJSELW7EjhgN+23EooR s5molfRndzYxeKSKkOdKCUnuMfunOsTWR8davzuyBel2dgkq+EsFg8bTtnGvkUTPc4Wm 4s8XfC5bJ8enoDO9puFJwTr3KMB7szwtwpNX6E45TSYbM+W7C1dm1plxraFHS/9JPD7J KgW0oG+yTh3r4CyxIA/oePFhmMJGzFllWTYYncbAQ6G22wVNYKF/dokP8WbOr/V0Kn2l aU3Q== X-Gm-Message-State: AOAM532au+gj4y2KXKjlPimoIH/Xc4UMNlx4pPX77ST6quEcLxl4mY1k llb/q8l1MOBL8G5h+uxC6hQ= X-Google-Smtp-Source: ABdhPJxJVDi4Hy+Rvcp4uYFGbGyHLH/F7FQG2fQRuWpUSqHaMLgyJsMiDOzF7bKmW0fb9H9jxPDkYQ== X-Received: by 2002:aa7:9635:0:b029:197:f590:8563 with SMTP id r21-20020aa796350000b0290197f5908563mr14937145pfg.58.1607331710384; Mon, 07 Dec 2020 01:01:50 -0800 (PST) Received: from localhost.localdomain ([49.207.208.18]) by smtp.gmail.com with ESMTPSA id w200sm11325029pfc.14.2020.12.07.01.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 01:01:49 -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, bbrezillon@kernel.org, arno@natisbad.org, schalla@marvell.com, matthias.bgg@gmail.com, heiko@sntech.de, krzk@kernel.org, vz@mleia.com, k.konieczny@samsung.com, linux-crypto@vger.kernel.org, Allen Pais Subject: [RESEND 19/19] crypto: octeontx: convert tasklets to use new tasklet_setup() API Date: Mon, 7 Dec 2020 14:29:31 +0530 Message-Id: <20201207085931.661267-20-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201207085931.661267-1-allen.lkml@gmail.com> References: <20201207085931.661267-1-allen.lkml@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Allen Pais --- drivers/crypto/marvell/octeontx/otx_cptvf_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c index 228fe8e47e0e..515049cca9e3 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;