From patchwork Thu Jan 7 12:26:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003855 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BEFEC433DB for ; Thu, 7 Jan 2021 12:27:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 259B823356 for ; Thu, 7 Jan 2021 12:27:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 259B823356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dkwS2nkRhtDgd7va9wmmgEh5uZDQuVExfdwkNpLGewU=; b=M2MC/Fh851i56b2Rk5BqKka5l qlcFaWvseqfwpfev7fvP1RF4e5VS5IavQZlK6h9+ixY7Y8L+nma9cNOEkyngWYbaSzBJAbMeyY/ks XEvsbJzABrkk3U9GAJZ1XOdyNPsGJ4mVm5wsy3V5yxudFOuEBJQ05UVvm3fR4QtE/tdMCecjIHsX3 4fCkLhsLZcsev9gULtM+TW1PEnnmFpLa/YFER29P5PYvQARL1jsY/Uo55Qaih5az0Bj8tuzKW2TMK 1uYGjT4j9Qg1pULgLwwhR/OCrq2EQ+4GdVZJjT3+a6Vw8oVSmADRN6ovSi9H1/TEIBXAgAricnjps nqwp/xFzA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUNt-0003bj-Kd; Thu, 07 Jan 2021 12:27:21 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUNq-0003az-R4; Thu, 07 Jan 2021 12:27:19 +0000 Received: by mail-pf1-x436.google.com with SMTP id m6so3761592pfm.6; Thu, 07 Jan 2021 04:27: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=qu9jTq4Mhds1PLReGFI6BuQWWjoITkJw1sqRT7XAn7M=; b=QC08WxFbW+qIztVxBinWE5vs7IHHEhE3+M6tuDRvQi69LJbJ6fap5aP6NxviDUZ0Fv NOYboVzE5XO/yPpV1qHjKJMTd0JsECGmnj14cr6L3G39uy9Pjq5P19dNdg8wMtr8i3pt dUkrZB/iH0b2l84GCJyEKnaAJrykR6bRNhJEKV/3MOo1JRovquSz4KiMtuW5pzQT7iSg /EDg45nLnuGsvTelzscW1WfpG1eXUsifA/ZD0Hto17AEq4yMv3rQsg1JoSsLiTDLLv2o 3JEncImGFvwY3tXhhD1XSHIdxY6+ltkiQ/C/B4njyP41JG5Fk6SINZ5gJTQl88Zi171p bwOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qu9jTq4Mhds1PLReGFI6BuQWWjoITkJw1sqRT7XAn7M=; b=JJFZ2Ao2645RhQfWDUy11IrBUyaoCEx4MAFfcSs19c4VeqUfjkZ6lVYBEh3SiqFDLr n2lJw9QekwhNp7LDDVWfY/az0FYOccMTCb8ItB2j/lDgaFOhsJh+7PtsyxdL5uDyBPPG 6RQ4dJooPRkKWkAfqsgK3jci92981Nof2TBX/EVr4cYEZQcveXAHIqR7+fTWthGpVH66 upKUbkYNJj3Ayrends0DcTUzIe8sq3MVn/P3sPLMn78UpFh+V3haroi54gOLnW/qpaI5 0/5cdKS7M4qXazggL2ncbbFQTMBxJ0sV4RPiW1xoXRDuBYL6lt5fOC/b2J8Hceot2ofG A6tg== X-Gm-Message-State: AOAM533tDdqmzdAkEGZfeCmLZPiH83G/hgvmghZl6zCACjwtZ6giTOx/ /ZyjI2xU/SwUjH4bjwu4x+s= X-Google-Smtp-Source: ABdhPJzmtC0ZYYtJdJncyLo9jUcCmBc8rPOUk0rIqkXUz5Z6T+Z47y0DxRXaN43On1iH8mzHPPPjJg== X-Received: by 2002:a63:2ccf:: with SMTP id s198mr1638747pgs.30.1610022436883; Thu, 07 Jan 2021 04:27:16 -0800 (PST) Received: from localhost.localdomain ([49.207.207.140]) by smtp.gmail.com with ESMTPSA id x28sm5860403pff.182.2021.01.07.04.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:27:16 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 01/19] crypto: amcc: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:56:28 +0530 Message-Id: <20210107122646.16055-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122646.16055-1-allen.lkml@gmail.com> References: <20210107122646.16055-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_072718_938940_4D546796 X-CRM114-Status: GOOD ( 12.39 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/amcc/crypto4xx_core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 8d1b918a0533..0e13430a5b9b 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c @@ -1072,9 +1072,9 @@ static void crypto4xx_unregister_alg(struct crypto4xx_device *sec_dev) } } -static void crypto4xx_bh_tasklet_cb(unsigned long data) +static void crypto4xx_bh_tasklet_cb(struct tasklet_struct *t) { - struct device *dev = (struct device *)data; + struct device *dev = from_tasklet(dev, t, tasklet); struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev); struct pd_uinfo *pd_uinfo; struct ce_pd *pd; @@ -1452,8 +1452,7 @@ static int crypto4xx_probe(struct platform_device *ofdev) goto err_build_sdr; /* Init tasklet for bottom half processing */ - tasklet_init(&core_dev->tasklet, crypto4xx_bh_tasklet_cb, - (unsigned long) dev); + tasklet_setup(&core_dev->tasklet, crypto4xx_bh_tasklet_cb); core_dev->dev->ce_base = of_iomap(ofdev->dev.of_node, 0); if (!core_dev->dev->ce_base) { From patchwork Thu Jan 7 12:26:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003857 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71AA3C433DB for ; Thu, 7 Jan 2021 12:27:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24E2E23356 for ; Thu, 7 Jan 2021 12:27:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24E2E23356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0Cj9qtdhYweGNz/GUy4eZKVS8LAMtcU0X8fFlI+B1S4=; b=N4F/GdYNmooO8NWZiUuoeMPZO puH7sGjrftAHBUnl2WSprxybkst7FcOoBkkPRil21hy7OvvMIGxjSfw+8wXDnYLy1wcj+kJWyQC/y rqYX3ipJKdupR6k/ISusQZh0Z7ZJ37ZKMGYK1/APfHK6V/ma/K3maid+qsc15z10LDehqjHigC8yL qyToKn2d05PJS4b3jXUtE3CeXTFqjrRK5QHzx52KOfOddF0EWdWjBcc6lwNJcOMU6nZlwvU8OBEat elkxsUPNthf1iO7OKp/aCKllYeJU0tBklMLjF+KL5jDxARutirREOhZGHcdAW0HDUS7Konr6/EuXB ZbfGEmayQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUO3-0003ek-7Y; Thu, 07 Jan 2021 12:27:31 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUO0-0003dm-Ps; Thu, 07 Jan 2021 12:27:29 +0000 Received: by mail-pl1-x631.google.com with SMTP id t6so3416349plq.1; Thu, 07 Jan 2021 04:27:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ChEdTs09dQ0RBgzbeZxLNBVFnUFhvXMwpM6L2ZZDSyQ=; b=kAoid7v3FFbiH7oBR3uCo/5IkT/s0C/4bktioTxr1/loZe/W5KibwOVR52gcw1e5/A 4/d+YGm05IwecPjuh5EMd/RqRZXfjbDWSUqSueab0WaimcV8GlM4wtvcBvEVL0F628e4 LvScvGROPJr/WtqXrJFmpUHlu14ZAhR6MyynIKgr6qftmzU1VDZeUbfLP/4rMglys9RZ 9raw70l7X0PJlt4hvT05S50I6+k3GfUJOiNttjxs8G0NEPHfoMj9h/2V2EHBkBBmA6BM IxD9gPR6n63Bt/Fs3LYBjjdBLKExxxPHQjMkCfFIK95n3kg5oR+wcut7W24c22/FAPbX mW8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ChEdTs09dQ0RBgzbeZxLNBVFnUFhvXMwpM6L2ZZDSyQ=; b=eYfC4jr40myRLoQMeGiQl4UVwG/Pyv/XwJGhS82cL7LTwGOL/pc+5JykQwkxHIIKtx S3v7UogyClpneNusnJGASGUcGDG55w/0LvwOZAcerxAiIra0LwEBB+WAf1kkX38o83J6 tqkq6eh6fI86VLNIwKWvxCGFf32zRy75lBcdHEocpYtkZj33fLMs2eCkYjuWdMn8yK01 DKlP2u/uj6Y1ubQEdWAQdIqo6S7P47MPDwRRCTi429JNShTxwyKe5LxN1boxCEwoqC3X VWO+5pfVHYJE5aLE4ZzSpSPufJux/Wf1YQESRGSJLz3eJZ9gBMS7rZgxKv88RgNqBPRR ajWg== X-Gm-Message-State: AOAM533eXa8O52d/98tgQs7MPvIl3/Gm9E+Ve/Kbs7D2yRYpKJKkMtq+ AtSXXaFZWNtWIEidLRdvUf4= X-Google-Smtp-Source: ABdhPJydfhet9xlKM8LSiwmiP9ivKiEWjw5v+sep8vL8Nxz74x1JQp9iAk5faH/2yMMCOKbW/KMHWg== X-Received: by 2002:a17:90a:7087:: with SMTP id g7mr9055469pjk.200.1610022446738; Thu, 07 Jan 2021 04:27:26 -0800 (PST) Received: from localhost.localdomain ([49.207.207.140]) by smtp.gmail.com with ESMTPSA id x28sm5860403pff.182.2021.01.07.04.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:27:26 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 02/19] crypto: atmel: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:56:29 +0530 Message-Id: <20210107122646.16055-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122646.16055-1-allen.lkml@gmail.com> References: <20210107122646.16055-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_072728_855898_54BBD1F3 X-CRM114-Status: GOOD ( 12.86 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/atmel-aes.c | 14 ++++++-------- drivers/crypto/atmel-sha.c | 14 ++++++-------- drivers/crypto/atmel-tdes.c | 14 ++++++-------- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index b1d286004295..804e6a5a39d4 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2300,16 +2300,16 @@ static void atmel_aes_dma_cleanup(struct atmel_aes_dev *dd) dma_release_channel(dd->src.chan); } -static void atmel_aes_queue_task(unsigned long data) +static void atmel_aes_queue_task(struct tasklet_struct *t) { - struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data; + struct atmel_aes_dev *dd = from_tasklet(dd, t, queue_task); atmel_aes_handle_queue(dd, NULL); } -static void atmel_aes_done_task(unsigned long data) +static void atmel_aes_done_task(struct tasklet_struct *t) { - struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data; + struct atmel_aes_dev *dd = from_tasklet(dd, t, done_task); dd->is_async = true; (void)dd->resume(dd); @@ -2499,10 +2499,8 @@ static int atmel_aes_probe(struct platform_device *pdev) INIT_LIST_HEAD(&aes_dd->list); spin_lock_init(&aes_dd->lock); - tasklet_init(&aes_dd->done_task, atmel_aes_done_task, - (unsigned long)aes_dd); - tasklet_init(&aes_dd->queue_task, atmel_aes_queue_task, - (unsigned long)aes_dd); + tasklet_setup(&aes_dd->done_task, atmel_aes_done_task); + tasklet_setup(&aes_dd->queue_task, atmel_aes_queue_task); crypto_init_queue(&aes_dd->queue, ATMEL_AES_QUEUE_LENGTH); diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 352d80cb5ae9..8ec8a32606e8 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -1314,9 +1314,9 @@ static struct ahash_alg sha_384_512_algs[] = { }, }; -static void atmel_sha_queue_task(unsigned long data) +static void atmel_sha_queue_task(struct tasklet_struct *t) { - struct atmel_sha_dev *dd = (struct atmel_sha_dev *)data; + struct atmel_sha_dev *dd = from_tasklet(dd, t, queue_task); atmel_sha_handle_queue(dd, NULL); } @@ -1353,9 +1353,9 @@ static int atmel_sha_done(struct atmel_sha_dev *dd) return err; } -static void atmel_sha_done_task(unsigned long data) +static void atmel_sha_done_task(struct tasklet_struct *t) { - struct atmel_sha_dev *dd = (struct atmel_sha_dev *)data; + struct atmel_sha_dev *dd = from_tasklet(dd, t, done_task); dd->is_async = true; (void)dd->resume(dd); @@ -2570,10 +2570,8 @@ static int atmel_sha_probe(struct platform_device *pdev) INIT_LIST_HEAD(&sha_dd->list); spin_lock_init(&sha_dd->lock); - tasklet_init(&sha_dd->done_task, atmel_sha_done_task, - (unsigned long)sha_dd); - tasklet_init(&sha_dd->queue_task, atmel_sha_queue_task, - (unsigned long)sha_dd); + tasklet_setup(&sha_dd->done_task, atmel_sha_done_task); + tasklet_setup(&sha_dd->queue_task, atmel_sha_queue_task); crypto_init_queue(&sha_dd->queue, ATMEL_SHA_QUEUE_LENGTH); diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c index 4d63cb13a54f..b7a734f666ae 100644 --- a/drivers/crypto/atmel-tdes.c +++ b/drivers/crypto/atmel-tdes.c @@ -1049,16 +1049,16 @@ static struct skcipher_alg tdes_algs[] = { }, }; -static void atmel_tdes_queue_task(unsigned long data) +static void atmel_tdes_queue_task(struct tasklet_struct *t) { - struct atmel_tdes_dev *dd = (struct atmel_tdes_dev *)data; + struct atmel_tdes_dev *dd = from_tasklet(dd, t, queue_task); atmel_tdes_handle_queue(dd, NULL); } -static void atmel_tdes_done_task(unsigned long data) +static void atmel_tdes_done_task(struct tasklet_struct *t) { - struct atmel_tdes_dev *dd = (struct atmel_tdes_dev *) data; + struct atmel_tdes_dev *dd = from_tasklet(dd, t, done_task); int err; if (!(dd->flags & TDES_FLAGS_DMA)) @@ -1177,10 +1177,8 @@ static int atmel_tdes_probe(struct platform_device *pdev) INIT_LIST_HEAD(&tdes_dd->list); spin_lock_init(&tdes_dd->lock); - tasklet_init(&tdes_dd->done_task, atmel_tdes_done_task, - (unsigned long)tdes_dd); - tasklet_init(&tdes_dd->queue_task, atmel_tdes_queue_task, - (unsigned long)tdes_dd); + tasklet_setup(&tdes_dd->done_task, atmel_tdes_done_task); + tasklet_setup(&tdes_dd->queue_task, atmel_tdes_queue_task); crypto_init_queue(&tdes_dd->queue, ATMEL_TDES_QUEUE_LENGTH); From patchwork Thu Jan 7 12:26:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003859 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D60CC433E0 for ; Thu, 7 Jan 2021 12:27:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C89B523356 for ; Thu, 7 Jan 2021 12:27:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C89B523356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Nx+tJQp/fztnvMIOfE+FWw5m34MR/M+ExeYqEcjlO8I=; b=NFbfFCBu+FD+Bnd5Qpvk4oBHr HgiVvNjuHZNrATOO+GgFypwsivwuN8kcIdc/7omo2ESwMwsY5Y+NyXe3qLjtAxQ0LA2DIX5JPP6sg CaP1qITIkwOPsthuOBIX/rfC6Wq5DcEz9gfA+Va5yd/ARs1Aft756d2HnyuTBuH6atuOhzIO4+ZfW 4U9BtuyCdb6Hh//w7fFb2/cg0RT18f29Gy/7L8j8uaD3fHi+mF2jYsJ8UCLSlC30H1TaGj3UvHmmm 9p16Uq50z3RmhgJgEQvpB+34xPE937J2m+L2lInUqfjnw2rZMX4hDkjpa3WEd5TxxnJkSKKu7X/v7 dVowdljXw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUOC-0003iC-D8; Thu, 07 Jan 2021 12:27:40 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUOA-0003h6-5p; Thu, 07 Jan 2021 12:27:39 +0000 Received: by mail-pf1-x429.google.com with SMTP id c13so1067763pfi.12; Thu, 07 Jan 2021 04:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Pt3Ra9o7wlpdpNYx3JDjTYF1o1dX6A0SMQwis6c4Pyw=; b=LaJaOgUfS2mksDAvNuGS50zbrWlySONgVy1PzslszujiHDkOF+lvqfdh5d1kSYzWhu rVoVlpXMXQcDthXshz1ubbVcG7MrUqceN2dfemCxKLN3vXZX5EqLEpYkG3ZUlYMbHuMk 9dTop92UA2q+KPmSduf/kIZea88rjWwp3SrJL6qyLoQKObqH9+e3OBJ1iz4ghvK8ceF9 4po09vE/Y6xSYMFrm7gnjZfXAM/JWRn3WXuMXfxIQWAKPospD3EJDoejfDNifc+9M7Js AlKJ774etDCWZEenSrfCi/HcrxhYb79Uq0GMaaAYiiQeBB0ywMPZ+OPE+hSUjWzT3Fau Mi8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pt3Ra9o7wlpdpNYx3JDjTYF1o1dX6A0SMQwis6c4Pyw=; b=swywp09VZb3Hsn2bwZOpYTfYJpiFQdzGDd2oaI8fuj3rRnYmVYHlQlzBF9Dxfuif30 R8DYCyBZBEHTWvkugKJ0ih0tSWUHiWHIBO02b1BqoUwujLJY7xcttLBneRsLVqVoRCs1 DTj0y+s6avsEFKZwpTdNBIMfpHsHTHVxbnzB68lu/407PmePGiFBx5fr3aZ6+mfGIypk T/dYHW0tLM7UTFE8X7j7dSGQWecybeCQ7vRgXaqDpbL5wohdlI9L3pzXoYIX0Z5IrP5c bfIolAMl6WSWv+x7YlM9W5gstHQLqHS2Wh7son6Jx1W009xJz9Xbtz0jvY9SIL3nkcN8 MJrg== X-Gm-Message-State: AOAM533wyZc433mG6WzNFAMfXP+EWrDc3BHM8C5V9hTenw7p+ZXTANJj F7Xgm6UzoDzm5a3RZLVJoKk= X-Google-Smtp-Source: ABdhPJwkwRG30UkJgDKao5YgmvhJZh+Poyk8jdZdvUk5stX2bNOUPSkdSosxtH//b/GHsNL9xBR4/A== X-Received: by 2002:a63:9811:: with SMTP id q17mr1651620pgd.238.1610022456221; Thu, 07 Jan 2021 04:27:36 -0800 (PST) Received: from localhost.localdomain ([49.207.207.140]) by smtp.gmail.com with ESMTPSA id x28sm5860403pff.182.2021.01.07.04.27.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:27:35 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 03/19] crypto: axis: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:56:30 +0530 Message-Id: <20210107122646.16055-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122646.16055-1-allen.lkml@gmail.com> References: <20210107122646.16055-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_072738_234651_4E173FB2 X-CRM114-Status: GOOD ( 11.67 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/axis/artpec6_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c index 9ad188cffd0d..52e0c7fdbfa8 100644 --- a/drivers/crypto/axis/artpec6_crypto.c +++ b/drivers/crypto/axis/artpec6_crypto.c @@ -2075,9 +2075,9 @@ static void artpec6_crypto_timeout(struct timer_list *t) tasklet_schedule(&ac->task); } -static void artpec6_crypto_task(unsigned long data) +static void artpec6_crypto_task(struct tasklet_struct *t) { - struct artpec6_crypto *ac = (struct artpec6_crypto *)data; + struct artpec6_crypto *ac = from_tasklet(ac, t, task); struct artpec6_crypto_req_common *req; struct artpec6_crypto_req_common *n; struct list_head complete_done; @@ -2900,8 +2900,7 @@ static int artpec6_crypto_probe(struct platform_device *pdev) artpec6_crypto_init_debugfs(); #endif - tasklet_init(&ac->task, artpec6_crypto_task, - (unsigned long)ac); + tasklet_setup(&ac->task, artpec6_crypto_task); ac->pad_buffer = devm_kzalloc(&pdev->dev, 2 * ARTPEC_CACHE_LINE_MAX, GFP_KERNEL); From patchwork Thu Jan 7 12:29:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003861 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D1B6C433E0 for ; Thu, 7 Jan 2021 12:30:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5302923358 for ; Thu, 7 Jan 2021 12:30:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5302923358 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=3f9jcC/dayf0T/lNKkmXG4cjbdvz9jqoECNz21y+lzY=; b=tRBv4WdGxdBnSAwwDY5w3vNeKw X2Sx0D6JxNEnYABZ+1Z3csGtrgJMgTV8B+/4CbQqh0wrWNE5eILT+jZ2n5/e2B0S5UdxfuZs2v8Wc jcGm5eNQGa7S+kWYOX0aDrWUP2RJomVYrftFbwGdWGGxVFMXhkcP5wRZ/Xa8tADs63QNUicVdp8mw 8QNpBvk1tFupXOwCtndWj0ek5q6t50B6IUG3TeIjf6miou9ehQETdtzMNQl3+TUTqYvZOSYHH5KGd 7arrhaUAp25oB80hRfjkVsZz8sC9ZqfkO2rxJEw8eFQPQcTBGylW2EApOBDhCkXq+wPkVj4/Z+rad XuRkcIFQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUQX-0003xt-4P; Thu, 07 Jan 2021 12:30:05 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUQU-0003wl-Fw; Thu, 07 Jan 2021 12:30:03 +0000 Received: by mail-pg1-x52c.google.com with SMTP id 15so4727758pgx.7; Thu, 07 Jan 2021 04:30:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=H0SYn3zavUKS6x6UDhKNxQX8cw552XrJ/WIv8yRpRIM6sDKARzTk8yEKqCCKzEL7OZ Sqe2lyc88QLHWM7CCr2M//0J4DNWNtxS28SXcCB7UJ5dID9OCzEAcIv4JaHnq5lHgmgQ sgET4LPtv3JAqIE7o70L0OCCFn0KXXowlcTA1xUCm5ChdAd+757F4S2iJZS47qD5F7PY KAX+L9qLahgIkAr9XaXavaw81lYV9AEJ6o19/MZNYDN3ZwqsLEf4hiVKa70pM0eoIFko HItgzMuy7Wn4PFEnRymGiIjeu9ZTGEgiVO4ENgrgRMU4GygY5uxOiSCYhri8kBt+F246 74Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=pIXBy2BfJsPfr+EiczU4DIZRl8zU/sVOkl0BVra7gIG+zNZEHPf3bU6h5cMDXsYwJo Pr67466gqThDYvZM9xwe/ewDfpUew92HzTzE+R+4GIDPbapAAvxAqB8EMbrmOIcuEsFh dHaNMpHwsy3nhhJa/IrV0ANWobTymDXLphv/GkHB0/BJp4FyuozcmpMTzJzrLuX39ePr RrrqgNMuSrz+LtytSKh8iLSR0CbyFuX9CIZ5BtYv+CYiz1LXGuRgM9pBkWZvo3H2pIkt 79GzlxfSJWjBOOIZcSbu6c1OHz/5bba7VDja7c44cXDpkoBkj9N9hgJ60CXmOdhsKjHE 3E8g== X-Gm-Message-State: AOAM530eHWAzeGC3epyKje4kZ5KFteW0ULBuSKy47RGHTaxGoO/OAtsh W/vGjzgdrFXKnH4qKasdVvg= X-Google-Smtp-Source: ABdhPJzT/YJktNDHrk/I8qZ8dAithbSQ7i/79m4+vWBw3oHcFA3VosHZj44pM2C/wLC4imXef32UQA== X-Received: by 2002:aa7:8811:0:b029:1ab:9e4f:b8ea with SMTP id c17-20020aa788110000b02901ab9e4fb8eamr8543725pfo.78.1610022600501; Thu, 07 Jan 2021 04:30:00 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:29:59 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:29 +0530 Message-Id: <20210107122944.16363-1-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073002_619519_6A1DC03C X-CRM114-Status: GOOD ( 13.24 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Reviewed-by: Horia Geantă Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/caam/jr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index 7f2b1101f567..2903e1af0a56 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c @@ -9,6 +9,7 @@ #include #include +#include #include "compat.h" #include "ctrl.h" @@ -201,11 +202,11 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void caam_jr_dequeue(unsigned long devarg) +static void caam_jr_dequeue(struct tasklet_struct *t) { int hw_idx, sw_idx, i, head, tail; - struct device *dev = (struct device *)devarg; - struct caam_drv_private_jr *jrp = dev_get_drvdata(dev); + struct caam_drv_private_jr *jrp = from_tasklet(jrp, t, irqtask); + struct device *dev = jrp->dev; void (*usercall)(struct device *dev, u32 *desc, u32 status, void *arg); u32 *userdesc, userstatus; void *userarg; @@ -483,7 +484,7 @@ static int caam_jr_init(struct device *dev) (JOBR_INTC_COUNT_THLD << JRCFG_ICDCT_SHIFT) | (JOBR_INTC_TIME_THLD << JRCFG_ICTT_SHIFT)); - tasklet_init(&jrp->irqtask, caam_jr_dequeue, (unsigned long)dev); + tasklet_setup(&jrp->irqtask, caam_jr_dequeue); /* Connect job ring interrupt handler. */ error = devm_request_irq(dev, jrp->irq, caam_jr_interrupt, IRQF_SHARED, From patchwork Thu Jan 7 12:29:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003863 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5FDCC433E0 for ; Thu, 7 Jan 2021 12:30:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7201B23356 for ; Thu, 7 Jan 2021 12:30:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7201B23356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=llbtdWILOnYkCjVbTAEqpf2yc/STTSSJWFp1AZ7P8qc=; b=X6c2LjOey7fdBvy0khDEIXt3R PZS29AJnDpXbnQ9XNiupo5U9kx+xoFdFbI/l+xIm9A51/TdBiSwpf7BPIoITSvIl0yAgkX+N3/qcP a+FIb/Te89MueNzVDo6xI1vElqOQcvD7RY1zoQcFmNY7npC86P+/aV7UpTko0ZMAwgkJ64OpIShrD VqJuwrOiJUTZBADLMeRVNDB2bG2TsW7WCnzmdi6JhXkPEdjMmY/xYHLsFKDddb4fYPGEVikIOEA5e u4/RAZFbZnKzuBUjehoHCJhLtsYJ4CEWPzsVK2AspdvNsFlRKo+DjHbdELlzjViq75JHEoMFJC9tN sWjh4Npww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUQg-00040F-1L; Thu, 07 Jan 2021 12:30:14 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUQd-0003zE-Cg; Thu, 07 Jan 2021 12:30:12 +0000 Received: by mail-pf1-x429.google.com with SMTP id a188so3750426pfa.11; Thu, 07 Jan 2021 04:30:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qp9LBDTmnPZcn3zbp0ts8Zh1JyTpVMJr9nqNyHr6PFs=; b=Advhv+JeBcayRbTWxjyllWoh9FTaCJUijNK3TW42haYbC7+lx4Rry1R5mFggpSCAHE 7OmyTRUB/jFL81HiOz05CyKqCKoF9uR1UZwrO9HO6wuHXkbFxwABNc1Bi2Ew8Fb89RYf w4ntdE9kvcAn+UrY+TElJUuY2HVNAZ68lPCZcEPjWnLrdYs9mmeTZfLq+DrAeS335ZNO +0zamgoVYhQxZf8J8aqQKD49X8b7udRn3aDOxEOmhy+BRB6RNaETqXBjyvLc6tzR+pd0 a1Q1oKsIE1VKhqGV1B2Gp6ESQS0gXnRwu3vibKbKAHzwzEGCshe1YvZ9hfg+bGTafen5 Z6EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qp9LBDTmnPZcn3zbp0ts8Zh1JyTpVMJr9nqNyHr6PFs=; b=C5q4QF4IsSIwBrsFpIyrxZ+A+h9P0XjzBQmfLNG5QAHWEw2Pwp5Mj+AdTYzqRuhSuY FPi2wMK/RBYVZrRrFSlrntyrw9iJrItDl9MqTSxsq0LE/xBv2r0LKEDCINJyDR0uE438 SPSZtaWXuRVHfonSJaTTygSCNOI/2d0yOjSWArtz+P9MfijXxBX4W1j/tcuq04PngXf0 C7UqCKE/e0Hu0JwkS/ZBFtXBujPyuEbQ5yuYqiml4FkAJFbEHTvY+qZwMayjfoy98r8X u46SG4fe5Avn1ALE1S9GdIIrr/KXlHMimnB2cvuwoMFVECrwUCjXj2bZpZDpQHXo7fVX Zm9A== X-Gm-Message-State: AOAM532D8850FCka3avN4eNYuEh45mElo6/zMrqThVjBIQ+9dpvuY+jo P9XodL/34PE7A9neftexvoE= X-Google-Smtp-Source: ABdhPJxz9NQmwgNlNPmzAveDr3euMsyXIEzMiBFYqFDRARr1rosMSOElf8iqzEjXbuqqgaIwvnVVEA== X-Received: by 2002:aa7:8583:0:b029:1a9:39bc:ed3b with SMTP id w3-20020aa785830000b02901a939bced3bmr8817010pfn.48.1610022609738; Thu, 07 Jan 2021 04:30:09 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:09 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 05/19] crypto: cavium: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:30 +0530 Message-Id: <20210107122944.16363-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073011_495800_DEDDFF2D X-CRM114-Status: GOOD ( 14.98 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/cavium/cpt/cptvf_main.c | 9 ++++----- drivers/crypto/cavium/nitrox/nitrox_common.h | 2 +- drivers/crypto/cavium/nitrox/nitrox_isr.c | 13 +++++-------- drivers/crypto/cavium/nitrox/nitrox_reqmgr.c | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/cavium/cpt/cptvf_main.c b/drivers/crypto/cavium/cpt/cptvf_main.c index f016448e43bb..6424bcc74139 100644 --- a/drivers/crypto/cavium/cpt/cptvf_main.c +++ b/drivers/crypto/cavium/cpt/cptvf_main.c @@ -21,10 +21,10 @@ struct cptvf_wqe_info { struct cptvf_wqe vq_wqe[CPT_NUM_QS_PER_VF]; }; -static void vq_work_handler(unsigned long data) +static void vq_work_handler(struct tasklet_struct *t) { - struct cptvf_wqe_info *cwqe_info = (struct cptvf_wqe_info *)data; - struct cptvf_wqe *cwqe = &cwqe_info->vq_wqe[0]; + struct cptvf_wqe *cwqe = from_tasklet(cwqe, t, twork); + struct cptvf_wqe_info *cwqe_info = container_of(cwqe, typeof(*cwqe_info), vq_wqe[0]); vq_post_process(cwqe->cptvf, cwqe->qno); } @@ -45,8 +45,7 @@ static int init_worker_threads(struct cpt_vf *cptvf) } for (i = 0; i < cptvf->nr_queues; i++) { - tasklet_init(&cwqe_info->vq_wqe[i].twork, vq_work_handler, - (u64)cwqe_info); + tasklet_setup(&cwqe_info->vq_wqe[i].twork, vq_work_handler); cwqe_info->vq_wqe[i].qno = i; cwqe_info->vq_wqe[i].cptvf = cptvf; } diff --git a/drivers/crypto/cavium/nitrox/nitrox_common.h b/drivers/crypto/cavium/nitrox/nitrox_common.h index e4be69d7e6e5..f73ae8735272 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_common.h +++ b/drivers/crypto/cavium/nitrox/nitrox_common.h @@ -19,7 +19,7 @@ void nitrox_put_device(struct nitrox_device *ndev); int nitrox_common_sw_init(struct nitrox_device *ndev); void nitrox_common_sw_cleanup(struct nitrox_device *ndev); -void pkt_slc_resp_tasklet(unsigned long data); +void pkt_slc_resp_tasklet(struct tasklet_struct *t); int nitrox_process_se_request(struct nitrox_device *ndev, struct se_crypto_request *req, completion_t cb, diff --git a/drivers/crypto/cavium/nitrox/nitrox_isr.c b/drivers/crypto/cavium/nitrox/nitrox_isr.c index 99b053094f5a..c6fb8b3263e1 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_isr.c +++ b/drivers/crypto/cavium/nitrox/nitrox_isr.c @@ -201,9 +201,9 @@ static void clear_bmi_err_intr(struct nitrox_device *ndev) dev_err_ratelimited(DEV(ndev), "BMI_INT 0x%016llx\n", value); } -static void nps_core_int_tasklet(unsigned long data) +static void nps_core_int_tasklet(struct tasklet_struct *t) { - struct nitrox_q_vector *qvec = (void *)(uintptr_t)(data); + struct nitrox_q_vector *qvec = from_tasklet(qvec, t, resp_tasklet); struct nitrox_device *ndev = qvec->ndev; /* if pf mode do queue recovery */ @@ -343,8 +343,7 @@ int nitrox_register_interrupts(struct nitrox_device *ndev) cpu = qvec->ring % num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, pkt_slc_resp_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, pkt_slc_resp_tasklet); qvec->valid = true; } @@ -364,8 +363,7 @@ int nitrox_register_interrupts(struct nitrox_device *ndev) cpu = num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, nps_core_int_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, nps_core_int_tasklet); qvec->valid = true; return 0; @@ -442,8 +440,7 @@ int nitrox_sriov_register_interupts(struct nitrox_device *ndev) cpu = num_online_cpus(); irq_set_affinity_hint(vec, get_cpu_mask(cpu)); - tasklet_init(&qvec->resp_tasklet, nps_core_int_tasklet, - (unsigned long)qvec); + tasklet_setup(&qvec->resp_tasklet, nps_core_int_tasklet); qvec->valid = true; return 0; diff --git a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c index 53ef06792133..676f3d00bf61 100644 --- a/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c +++ b/drivers/crypto/cavium/nitrox/nitrox_reqmgr.c @@ -580,9 +580,9 @@ static void process_response_list(struct nitrox_cmdq *cmdq) /** * pkt_slc_resp_tasklet - post processing of SE responses */ -void pkt_slc_resp_tasklet(unsigned long data) +void pkt_slc_resp_tasklet(struct tasklet_struct *t) { - struct nitrox_q_vector *qvec = (void *)(uintptr_t)(data); + struct nitrox_q_vector *qvec = from_tasklet(qvec, t, resp_tasklet); struct nitrox_cmdq *cmdq = qvec->cmdq; union nps_pkt_slc_cnts slc_cnts; From patchwork Thu Jan 7 12:29:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003865 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5E50C433DB for ; Thu, 7 Jan 2021 12:30:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6ABAD23356 for ; Thu, 7 Jan 2021 12:30:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6ABAD23356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CE+eGGeXJL4umSj1KX70fIIGl8gqRrZVEYf1egNRDfs=; b=S+Lcou9YAoLAqoH1gdtDuFkDO eWJP2Lr4sFTaBJ0AwywZpBxEepnok/XFDD5osRsfs+qim0IqZZJzT5G2UnVcclX6qsUlQKj81/nJo XWjmWrQBhSSkVXSgCh3acfr1bFR+PQrciFZ8eRGOIk1Ivhy3araw7CfRUgx2ywoifr0nYjQFwcq1L BCQs/r1Va8IPHlHZzY0RXd6ZNMxvZ3IhOQfkXCQnei1NfDpDYFUKOsoQXt4bPN2ugKdkkIuSZe+pO Xhe8HpYecIIpbJBCF+Eg6FxuRNaxGaTz96J1mg9nvYPLDqjeZy2HCUaJnra3bKQkrZB/ioCSSBDDC ejGQU/jGg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUQp-000444-8v; Thu, 07 Jan 2021 12:30:23 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUQm-00042e-Rp; Thu, 07 Jan 2021 12:30:21 +0000 Received: by mail-pg1-x531.google.com with SMTP id p18so4712894pgm.11; Thu, 07 Jan 2021 04:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X8fsop2xmYxltHA5D/rZSLD1hZ0w/2RK5zEw7HljbjI=; b=q/oJK60fsB9omlgtoRNmAEcUxj0VpRPDimQSIcRCBHJ3UmvI0OcDnEqpOVeJs+4OaE kOkrObU8cuRzSnOnAnbcsWIso9d39wTUqujdIcEE4KnBeWmuFGsGY8mEEda934nNZgqW JonzQFItVIhIsle/CvukTD5c96i/XIaTMpm6qzmDDm0vf9nZ044IKqADIs8D18MwucqB ucQUAeyAKKsPkrtn1g6nMcyiOJy6XRwn+wlQ1AjoeZ5wYRJ7a9JDvNYFEh+rJQGMJU0p JDUBMj3ngsjKtKVYBtEbDqRShGXKxiFoaG1igTb5Kx6Egsw7gbybiLbZK7R6soGZEwr4 Wt0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X8fsop2xmYxltHA5D/rZSLD1hZ0w/2RK5zEw7HljbjI=; b=fOo/ez8Rp7cGDywiWYQLwa878b0oUalZdJQjIGKBa/3s0dDmcA0Z14UiXqXwORU1Ca eLd3c6EbhRo14imQMm62ey2CziEyNsHdvFtk5Z1podPkT0yNBPb6YJkl10KQZ1jpoTwH bRpjhpDN6rW5hAjRbLSUJwQMqeg8RMn3ctirVqSAljc9If4yuuZaZ5oGmp1ZpCsl+XrG jrn0Wispoo4vaNixyISTQ43Mhx7IQX6+dAJ+SkifMKgh/T+Oeus5xActYHCFeTG2UC+C 8a2ceAkeMaCmyI5D6PL51OR/6I9ewuDT4ecOodN4f3OXpBQwcrbjFuBnULQo685eom9A zPiw== X-Gm-Message-State: AOAM531CJUDu2/H40A1SGnA07lLmnAu2X+Cw5e3gDM+bmldb3XnPmSc8 d7hOAo357lLRewLi5PqveT0= X-Google-Smtp-Source: ABdhPJy7F0kr2j2dPf/ONfSPxUmvYH6sY7gdQ9MPl4cRBGd+zmHYEphBj57UcUKZwoM3uxpWr2fEQQ== X-Received: by 2002:a63:6344:: with SMTP id x65mr1637166pgb.172.1610022618866; Thu, 07 Jan 2021 04:30:18 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:18 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 06/19] crypto: ccp: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:31 +0530 Message-Id: <20210107122944.16363-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073020_969827_8D38D94C X-CRM114-Status: GOOD ( 13.18 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ccp/ccp-dev-v3.c | 9 ++++----- drivers/crypto/ccp/ccp-dev-v5.c | 9 ++++----- drivers/crypto/ccp/ccp-dmaengine.c | 7 +++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev-v3.c b/drivers/crypto/ccp/ccp-dev-v3.c index 0d5576f6ad21..858566867fa3 100644 --- a/drivers/crypto/ccp/ccp-dev-v3.c +++ b/drivers/crypto/ccp/ccp-dev-v3.c @@ -321,9 +321,9 @@ static void ccp_enable_queue_interrupts(struct ccp_device *ccp) iowrite32(ccp->qim, ccp->io_regs + IRQ_MASK_REG); } -static void ccp_irq_bh(unsigned long data) +static void ccp_irq_bh(struct tasklet_struct *t) { - struct ccp_device *ccp = (struct ccp_device *)data; + struct ccp_device *ccp = from_tasklet(ccp, t, irq_tasklet); struct ccp_cmd_queue *cmd_q; u32 q_int, status; unsigned int i; @@ -361,7 +361,7 @@ static irqreturn_t ccp_irq_handler(int irq, void *data) if (ccp->use_tasklet) tasklet_schedule(&ccp->irq_tasklet); else - ccp_irq_bh((unsigned long)ccp); + ccp_irq_bh(&ccp->irq_tasklet); return IRQ_HANDLED; } @@ -457,8 +457,7 @@ static int ccp_init(struct ccp_device *ccp) /* Initialize the ISR tasklet? */ if (ccp->use_tasklet) - tasklet_init(&ccp->irq_tasklet, ccp_irq_bh, - (unsigned long)ccp); + tasklet_setup(&ccp->irq_tasklet, ccp_irq_bh); dev_dbg(dev, "Starting threads...\n"); /* Create a kthread for each queue */ diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 7838f63bab32..e68b05a3169b 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -733,9 +733,9 @@ static void ccp5_enable_queue_interrupts(struct ccp_device *ccp) iowrite32(SUPPORTED_INTERRUPTS, ccp->cmd_q[i].reg_int_enable); } -static void ccp5_irq_bh(unsigned long data) +static void ccp5_irq_bh(struct tasklet_struct *t) { - struct ccp_device *ccp = (struct ccp_device *)data; + struct ccp_device *ccp = from_tasklet(ccp, t, irq_tasklet); u32 status; unsigned int i; @@ -772,7 +772,7 @@ static irqreturn_t ccp5_irq_handler(int irq, void *data) if (ccp->use_tasklet) tasklet_schedule(&ccp->irq_tasklet); else - ccp5_irq_bh((unsigned long)ccp); + ccp5_irq_bh(&ccp->irq_tasklet); return IRQ_HANDLED; } @@ -894,8 +894,7 @@ static int ccp5_init(struct ccp_device *ccp) } /* Initialize the ISR tasklet */ if (ccp->use_tasklet) - tasklet_init(&ccp->irq_tasklet, ccp5_irq_bh, - (unsigned long)ccp); + tasklet_setup(&ccp->irq_tasklet, ccp5_irq_bh); dev_dbg(dev, "Loading LSB map...\n"); /* Copy the private LSB mask to the public registers */ diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c index 0770a83bf1a5..a85690866b05 100644 --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c @@ -121,9 +121,9 @@ static void ccp_cleanup_desc_resources(struct ccp_device *ccp, } } -static void ccp_do_cleanup(unsigned long data) +static void ccp_do_cleanup(struct tasklet_struct *t) { - struct ccp_dma_chan *chan = (struct ccp_dma_chan *)data; + struct ccp_dma_chan *chan = from_tasklet(chan, t, cleanup_tasklet); unsigned long flags; dev_dbg(chan->ccp->dev, "%s - chan=%s\n", __func__, @@ -712,8 +712,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp) INIT_LIST_HEAD(&chan->active); INIT_LIST_HEAD(&chan->complete); - tasklet_init(&chan->cleanup_tasklet, ccp_do_cleanup, - (unsigned long)chan); + tasklet_setup(&chan->cleanup_tasklet, ccp_do_cleanup); dma_chan->device = dma_dev; dma_cookie_init(dma_chan); From patchwork Thu Jan 7 12:29:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003867 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A637C433DB for ; Thu, 7 Jan 2021 12:30:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D854E23356 for ; Thu, 7 Jan 2021 12:30:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D854E23356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+I4Y6tGgzAItwUK8UuF9xVKMkhTJBYIyI5oFF9FTDzo=; b=hDihGeTUbseLMQLbN5uqvscO1 7yFvwnqV26RdAbWMXTvJ+mdy1tM19oRNj6C10SJAUl2JeKIeYG6oXUpdzRGZqvA9OvCGVZkeLAquI zlc5GaCd+mRhSw35w1K4f9vbuuL1kOWwoxgFVa7A5fQiKPv0V66nVud7xPSuyFR2ffbqg9lp3x7Kc y0xcQk3oe8JT4XrYHm1zQqvJmeh4kll+jkGIqjz6V/F/dBRvlsgb2ZD2LR2531ZOtnxbSN+AHGnYS EwehidW9Nh8kaP4caBdsUl3CERHJANdKEc+y5I1RehqbTG2YiTyblb/XQH6Zfz0DY6ZPq2XJ0rU6U X/p61sSpw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUR2-00049d-JD; Thu, 07 Jan 2021 12:30:36 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUQz-000478-6z; Thu, 07 Jan 2021 12:30:33 +0000 Received: by mail-pl1-x62e.google.com with SMTP id v3so3386503plz.13; Thu, 07 Jan 2021 04:30:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uwo40ct7uzVjK8NcMtTbNQmNhWXoxMbACC3WJlaa3jg=; b=ufEmWbyZUa+dQQvAYhIkE8p0pOHhu50F7qe/0f12DD/tRcDNzhDQ9/wCoyhw5VjPzQ dnd0JxxBwzKuMIZz87eJM0611NaeBvh0JKQhwpyuBZAZSvrunvM2Krth7aa6VMlqwa2j TofjP1deDG8A8Y/9MQ8q8w7i79bNBdRz5RX7iPHWy43hjJU1BlJErRE1Wd9mpJxGBv6g WFoD+YH25Z/8jOGBVw1SCHZFUUWJFja/AyJIVQvV20LvPFD4ErlwVgkg/yOWNd6g/Lgw pLHjomwwpODFFA76JDMXo5Bt4X1WycGxzqLZywA3GcxmORVXwmK11odoUNIP8LH+OA6K N7zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uwo40ct7uzVjK8NcMtTbNQmNhWXoxMbACC3WJlaa3jg=; b=iMUxcE9Yz3znO0aunZEAQJtKKN0J1hn4Qtt/E3tUmlHcFRklsSCYslcEBA+7MHw0h6 Ug8QYUcmWJy6EihMqvvazIqTZoqW0KvOtTnkeobeLW0rx4gZ/Q9oVdPOPvsbB38zl/Qs 7QLz04dOgeFdvo9XGUaMdEd7IXnqh4H66RnorVsf/o7lS961RbttNOg1WmTtnAMIBvsT HzDw6MoYt/GlJniABH73odck9K6tD1ZzhkNas5+sPqa1GM93WefXchkoHmFtu3xbLvBr CM+G60eynQPGFyWrJ5SJ+k5lOjs1N1FiUrrxfXI7gut8MGpGPg9p6P+8O04jGj4Qy/hP mqrA== X-Gm-Message-State: AOAM530Vv2239hBfRgBDJPDKACNsmfd+8cLK9FwKZnNnMlBGhWPuposh SK/8x2U2OvE38nkC1BI1cRY= X-Google-Smtp-Source: ABdhPJywWT2KX2/NpHZqqBSNZJnlsUYYQZ/FulwF+aZ9Tt2BgrZXxoPU8LPfCPWHRve1aUtV0yOF+Q== X-Received: by 2002:a17:902:76c8:b029:dc:183d:60cf with SMTP id j8-20020a17090276c8b02900dc183d60cfmr1981987plt.15.1610022627661; Thu, 07 Jan 2021 04:30:27 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:27 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 07/19] crypto: ccree: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:32 +0530 Message-Id: <20210107122944.16363-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073033_272910_0CFFE804 X-CRM114-Status: GOOD ( 14.05 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ccree/cc_fips.c | 8 ++++---- drivers/crypto/ccree/cc_request_mgr.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/ccree/cc_fips.c b/drivers/crypto/ccree/cc_fips.c index 702aefc21447..c1d03d99e3c3 100644 --- a/drivers/crypto/ccree/cc_fips.c +++ b/drivers/crypto/ccree/cc_fips.c @@ -8,7 +8,7 @@ #include "cc_driver.h" #include "cc_fips.h" -static void fips_dsr(unsigned long devarg); +static void fips_dsr(struct tasklet_struct *tsk); struct cc_fips_handle { struct tasklet_struct tasklet; @@ -109,9 +109,9 @@ void cc_tee_handle_fips_error(struct cc_drvdata *p_drvdata) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void fips_dsr(unsigned long devarg) +static void fips_dsr(struct tasklet_struct *tsk) { - struct cc_drvdata *drvdata = (struct cc_drvdata *)devarg; + struct cc_drvdata *drvdata = from_tasklet(drvdata, tsk, tasklet); u32 irq, val; irq = (drvdata->irq & (CC_GPR0_IRQ_MASK)); @@ -143,7 +143,7 @@ int cc_fips_init(struct cc_drvdata *p_drvdata) p_drvdata->fips_handle = fips_h; dev_dbg(dev, "Initializing fips tasklet\n"); - tasklet_init(&fips_h->tasklet, fips_dsr, (unsigned long)p_drvdata); + tasklet_setup(&fips_h->tasklet, fips_dsr); fips_h->drvdata = p_drvdata; fips_h->nb.notifier_call = cc_ree_fips_failure; atomic_notifier_chain_register(&fips_fail_notif_chain, &fips_h->nb); diff --git a/drivers/crypto/ccree/cc_request_mgr.c b/drivers/crypto/ccree/cc_request_mgr.c index 33fb27745d52..ec0f3bf00d33 100644 --- a/drivers/crypto/ccree/cc_request_mgr.c +++ b/drivers/crypto/ccree/cc_request_mgr.c @@ -70,7 +70,7 @@ static const u32 cc_cpp_int_masks[CC_CPP_NUM_ALGS][CC_CPP_NUM_SLOTS] = { BIT(CC_HOST_IRR_REE_OP_ABORTED_SM_7_INT_BIT_SHIFT) } }; -static void comp_handler(unsigned long devarg); +static void comp_handler(struct tasklet_struct *t); #ifdef COMP_IN_WQ static void comp_work_handler(struct work_struct *work); #endif @@ -140,8 +140,7 @@ int cc_req_mgr_init(struct cc_drvdata *drvdata) INIT_DELAYED_WORK(&req_mgr_h->compwork, comp_work_handler); #else dev_dbg(dev, "Initializing completion tasklet\n"); - tasklet_init(&req_mgr_h->comptask, comp_handler, - (unsigned long)drvdata); + tasklet_setup(&req_mgr_h->comptask, comp_handler); #endif req_mgr_h->hw_queue_size = cc_ioread(drvdata, CC_REG(DSCRPTR_QUEUE_SRAM_SIZE)); @@ -611,11 +610,12 @@ static inline u32 cc_axi_comp_count(struct cc_drvdata *drvdata) } /* Deferred service handler, run as interrupt-fired tasklet */ -static void comp_handler(unsigned long devarg) +static void comp_handler(struct tasklet_struct *t) { - struct cc_drvdata *drvdata = (struct cc_drvdata *)devarg; struct cc_req_mgr_handle *request_mgr_handle = - drvdata->request_mgr_handle; + from_tasklet(request_mgr_handle, t, comptask); + struct cc_drvdata *drvdata = container_of((void *)request_mgr_handle, + typeof(*drvdata), request_mgr_handle); struct device *dev = drvdata_to_dev(drvdata); u32 irq; From patchwork Thu Jan 7 12:29:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003869 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F416C43331 for ; Thu, 7 Jan 2021 12:30:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FC592335A for ; Thu, 7 Jan 2021 12:30:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1FC592335A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yusFzoICyuk5eGr49Kgwpm8trZ0Nsna4xEDGxLiVCW4=; b=jsDzoOhoWwCkN2QvPrAGMxuwA 3TE7yogP9AxMtuc5/qlXZV3+2HNukgEPIsDj3XYa3/i3jJf+ZZztZiq2bXtiRUHZzIKs5fIrQQTWi LuSV+KuFVoq2Mn3mDol13TSt61pX54ntDV1QInWeb1feji1HnFyne+cw3U6rykTk30XHA8eoe5xP1 ICPaJqIp6T/hSvDfKma7Ax/uJxMhYhre20LzTIK8ROyIN//7R0AoJ+RdcIpcE/DYa7p2ePwpd5WFr HXoIq9ZypmThuHTHK1dQTL68WB0deXE5aIwqRGmZ4AUFSMVlTDmE1/JB+WJiSEs0v6zVg8lnlOSP6 aCIqNrCeQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUR7-0004C5-QZ; Thu, 07 Jan 2021 12:30:41 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUR5-0004AA-08; Thu, 07 Jan 2021 12:30:39 +0000 Received: by mail-pg1-x529.google.com with SMTP id i5so4757410pgo.1; Thu, 07 Jan 2021 04:30: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=IcYiMBsXjgXqsCUOACpj4n3qnT1OSjGqlWhB/zIbApI=; b=q1b14DkzpJRGPgQ2ngw61EBHyRojXOhmeARI7hubXPHWZuJ3ZbCQfQzA+Vg00Ji7oN eglKJajT/phzHNQdYRWyowE60icmapabNDIYHLcMsSGODXVR4fpdciDdCrO9q5WR2NbU Q9p/jU8+M97ZgPsiDx95fcTwUWO7Aj8NfhkPCmfEjaAehVV0TfU+lG8hYT0bH6zWhp0v e7EmYHPq+Pm8eCmjsyO8DmmO+Mp3YYK+9dT08gsLBSU8uvzy2wozGxVK4R+1O5tmkmvN VZSAcN/R5jx/0FmSw+VwcZ3O8gih4wxKUiKLLMVFbDRo19UMdcyq/Mc6JLZ8zr2v9UtP BmLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IcYiMBsXjgXqsCUOACpj4n3qnT1OSjGqlWhB/zIbApI=; b=HBBJg8PL4UqbF5XpUw9uO/PvwgYbc/OFWhDaNU2uW36EQCRyPA0/C9BPd4kfrPXhaX 1sktt6O43v9VDojAfvxyrBUFg9gX932ZlzrG59q1GMkmv9HH+At7KRwFIBd22ts3ANQc WbUPnPzCH8mSm7lkjIYraCFjbV+biuGru4AdoH7YkNMjsh+732/x0uUQdd9TPkv88xvi bvYJ720XqhcqsQuS5CWqWYHCdwtXyrwtdlGcGZK3VF4wbu0l3QsuwnNvQed7SHVGDRFI qtr6bjYtijZCuBlydHm14czfxkjOGo0jh7OJ2ctFZ53g64tKXJxcuebJp9kV0iL4ammi fPvA== X-Gm-Message-State: AOAM530geFmNGiT+Op931SQ1Rw3XJQiOVY2uIMLpPQS4JQ3HpAgkhRyu NaxKBuwzfyMrYJjyRDlT9Rk= X-Google-Smtp-Source: ABdhPJwRdfOyuDoYxkXBo3Lx4+KPzBzDxEcsdT+IBiU4+pw8wU/dgoW9f8IkVaCL9kQ9AK1QuLGQMg== X-Received: by 2002:a63:605:: with SMTP id 5mr1620892pgg.144.1610022636869; Thu, 07 Jan 2021 04:30:36 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:36 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 08/19] crypto: hifn_795x: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:33 +0530 Message-Id: <20210107122944.16363-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073039_066198_2BA328C8 X-CRM114-Status: GOOD ( 12.64 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/hifn_795x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index 7e7a8f01ea6b..47f7bb43477e 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c @@ -2445,9 +2445,9 @@ static int hifn_register_alg(struct hifn_device *dev) return err; } -static void hifn_tasklet_callback(unsigned long data) +static void hifn_tasklet_callback(struct tasklet_struct *t) { - struct hifn_device *dev = (struct hifn_device *)data; + struct hifn_device *dev = from_tasklet(dev, t, tasklet); /* * This is ok to call this without lock being held, @@ -2533,7 +2533,7 @@ static int hifn_probe(struct pci_dev *pdev, const struct pci_device_id *id) pci_set_drvdata(pdev, dev); - tasklet_init(&dev->tasklet, hifn_tasklet_callback, (unsigned long)dev); + tasklet_setup(&dev->tasklet, hifn_tasklet_callback); crypto_init_queue(&dev->queue, 1); From patchwork Thu Jan 7 12:29:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003871 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1023DC433E6 for ; Thu, 7 Jan 2021 12:31:05 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB20923358 for ; Thu, 7 Jan 2021 12:31:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB20923358 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fOWvJIiVCmL5/ou1gu4rc43qqTNvvk5I9n821vt/wsU=; b=pNE40ejMZ51w4cMISkrdjIn+1 c1wQorYjy9lbR+xbHY3UXsLCq4mbHSD+miG99e8erQI5DbBLYLni+It6b4WXah41qD/CclKW3bH6q /sMNXthuv2UC7Yw4k2UVxFIe+Z8Qq3bLXKXKWZLLb89gEJ1+//WGCAyeUxvzd0lRTiFmazNTTT3ud yvofu5rVjYoxBzmNSbotxHZ0MX1y2bmYP0idRtXhcPMb8N8q/2TPEm6bkx0EkjSb7bek7nuknuxe4 f8Y4HRIC2ffXM6vQ2ZNIjZFQYfmlVDsVZsskH0N8px0ojZifwhVrpHVQRNOCbpNTAeegC0HsX7KaT MQt94f3dg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURF-0004G2-S5; Thu, 07 Jan 2021 12:30:50 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURD-0004E2-H2; Thu, 07 Jan 2021 12:30:48 +0000 Received: by mail-pf1-x430.google.com with SMTP id w6so3779961pfu.1; Thu, 07 Jan 2021 04:30:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=r/Samj46HFOW22YwxxLKb7kXMfMJZkv+fNvz018vr4h6HXcjxcSKw5uY/aUxVaNcbo KH5B6prk28ejw3y5Ryfrz5Km9447Lb354jWKYqAmIXuoiCXbzseR9s1/hc3Pbu5madIw 59WJV5JdKd1D4B2VAz5IGa35TZtVnrMQxgNLe8wD/s24o3Ejm29SxHAcxFG+Ca8yfayr h8FI+MQ4no59/kwrzdc6usou78p/m/y4ubf8AfkQjlVGHlk2s6QUG3oeuyzU/5xbvqNE 7UJCTmQ2GQvzKNskROlUCWNiGtQyjcl4p1atnUflE1tNsKbjAVTJ2X+FzPOGqWR6xn5K Cktw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=DvrdXcBSEpPYIFiZgURZEig76A625XtNfpHUjF7fK8qehFSUn+J7rh5J6wg5b0gySj RKzMqHDSMOfVm1sgT4eYkNrpmgHuORwg8m3PI65h1C87mgtPyD8JMckTQMtIKrbXZX5h Sbjgh/3CcLTmAsOrqulIubZkm+s16LNA6KJeYko3fg3e6piqDgcOc4U1y58FFxEi+8t+ rkHrlvMWNAjTnreEqghtTx5yLxcC4qVM5zZKjtp7YOdm/Wex65jfG95M8U2eRb4ZUigO 9FfuFohVp27OIQLXlxz+eMB5jYiUsXPksoVfPnfUIO9JpJqOy8mn6CveaqEbKdX2IpY5 lLnw== X-Gm-Message-State: AOAM532cPvNidK5W0/+0cP9/N7BTo1db7vYzCYqvnPMVtkH7TPrEzLiZ +Ba/Sp72pdXhwDeN48brJnU= X-Google-Smtp-Source: ABdhPJwyAj4F5Fhuw4gMLL7mw2TuD871TGVzFmlexoKSH7il+8JqllUpDbrl6cfZ8d+zKs+UvJn9zw== X-Received: by 2002:a63:3549:: with SMTP id c70mr1607262pga.361.1610022645408; Thu, 07 Jan 2021 04:30:45 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:44 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:34 +0530 Message-Id: <20210107122944.16363-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073047_611869_F30BA6B4 X-CRM114-Status: GOOD ( 12.98 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/img-hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index e813115d5432..72b65cdff856 100644 --- a/drivers/crypto/img-hash.c +++ b/drivers/crypto/img-hash.c @@ -355,9 +355,9 @@ static int img_hash_dma_init(struct img_hash_dev *hdev) return 0; } -static void img_hash_dma_task(unsigned long d) +static void img_hash_dma_task(struct tasklet_struct *t) { - struct img_hash_dev *hdev = (struct img_hash_dev *)d; + struct img_hash_dev *hdev = from_tasklet(hdev, t, dma_task); struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req); u8 *addr; size_t nbytes, bleft, wsend, len, tbc; @@ -887,9 +887,9 @@ static int img_unregister_algs(struct img_hash_dev *hdev) return 0; } -static void img_hash_done_task(unsigned long data) +static void img_hash_done_task(struct tasklet_struct *t) { - struct img_hash_dev *hdev = (struct img_hash_dev *)data; + struct img_hash_dev *hdev = from_tasklet(hdev, t, done_task); int err = 0; if (hdev->err == -EINVAL) { @@ -954,8 +954,8 @@ static int img_hash_probe(struct platform_device *pdev) INIT_LIST_HEAD(&hdev->list); - tasklet_init(&hdev->done_task, img_hash_done_task, (unsigned long)hdev); - tasklet_init(&hdev->dma_task, img_hash_dma_task, (unsigned long)hdev); + tasklet_setup(&hdev->done_task, img_hash_done_task); + tasklet_setup(&hdev->dma_task, img_hash_dma_task); crypto_init_queue(&hdev->queue, IMG_HASH_QUEUE_LENGTH); From patchwork Thu Jan 7 12:29:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003873 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CE0AC433E9 for ; Thu, 7 Jan 2021 12:31:13 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3B00F23356 for ; Thu, 7 Jan 2021 12:31:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B00F23356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=x/rPnw1R0eH1nc+MYZy1FdsgONCWnnmGkwB5ZjLryX4=; b=VN3r60rbI5o+mQmdBtCdCWuv2 3tedNP0c5HkPdxqBVGdxEh9CDo/c8znYt/hJhWBOd4M61iGYExKpm0HNn1K3l7rJJs0XgJgI0ANhk P20mLvep6PfnDLgNZh5hOoEXL9sGobcB+SrwthO7MpuaiEpVKzIPUQQlW2FLFxlcgVW+nnqSnZqbo pNlRedASyByzVUUAabDZHhJgUnZT1d+Hjr+JjpaEOiWiWGpaDy5wWHJ71XIa5lFH+eUommK1i6GHo UEx+hfI5/Uy8trH+8PTETYnO2TzI+3enyGDTTFZzr/zsitPT0LWlRVEayJOkvmcZAVZjeJoIze49W VWo36OEqw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURN-0004KT-Na; Thu, 07 Jan 2021 12:30:57 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURM-0004J4-DL; Thu, 07 Jan 2021 12:30:57 +0000 Received: by mail-pl1-x631.google.com with SMTP id x12so3395375plr.10; Thu, 07 Jan 2021 04:30:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1e1njK4JCLyF4BWRntmeMNLMXKX/535/WykRDF+9nqU=; b=hbZxd8GMbWMwunv97wfH2Jf1oJf/8UcNY6xBKZcNSEUqzpSUI65LKuKQrxS91lf3JW Bupw/mebNEqeQTlLLVwWk16hsX081CmCeM3mCGPFqAIt6Y15WaGH/KwDFlvfhr1Hgg9Z XmJtwwBRs5RusKIVtDfejCw5hq1vLWEe1lHia/3otyEyWTKYI3bUsoZQF2D5pI0ztNQy 0/6+Z3Om5i4sHkVm60WuZFrh8e9eyF3U8Mo1nCSfMgurTh2MkeWCP5UWfGjtMH2pbNlQ Pt9JtbYllg2QWQaoR9nfEhdPC6MM/gw25S4hDUm222XYCSreZw2frFc8N124MrS997zA oqyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1e1njK4JCLyF4BWRntmeMNLMXKX/535/WykRDF+9nqU=; b=H4Q8bIghNhlF2ik/X26OCemF2S6AfvtYcBrrGwla1LcDZFuIyhxc3xIfBzMSOXfsYR IDX5ZFhtho7BHSq9p45KtxlMrIy4QZowG+m4X4GarpQTbaxPpiJ0h8tUq78VBn28R1Q3 ZNFtmQTkDgwUIq9mI66UxiTnPuNI7f8F37PwPJWG1urFodf6YkDgDCkWh3JlZ/Ud61Zo shenDnIPYllrwgzA2oPEZgk2glpAzXqjMcVWJqsU88Fmc1xTlyEbcGS8SWwE9+hOf3EK tuOvtCFEWuuuoiEYmP5ajIBeT6FzvCtP1SFoZtyfV7ItgMKfxgutL819BGfCzcewNfNZ ObfA== X-Gm-Message-State: AOAM532ajqxwbQh/UK+RD+7APl02d0TZJFibHxeYVVGKaHuNVWVEW475 a9L3BkvK7ONW5Bb5bwM9tZs= X-Google-Smtp-Source: ABdhPJxNswk3UqAPRQFOECWMZZXKETLsDLgMohWjq2tJwnnMR19IXzXOUsAVBJnz8yZ5/DQIIMxoDA== X-Received: by 2002:a17:90a:b90c:: with SMTP id p12mr8705424pjr.135.1610022654721; Thu, 07 Jan 2021 04:30:54 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:30:54 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 10/19] crypto: ixp4xx: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:35 +0530 Message-Id: <20210107122944.16363-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073056_481625_3891FFB6 X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/ixp4xx_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 8b0f17fc09fb..b783ab58d718 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -414,7 +414,7 @@ static void irqhandler(void *_unused) tasklet_schedule(&crypto_done_tasklet); } -static void crypto_done_action(unsigned long arg) +static void crypto_done_action(struct tasklet_struct *unused) { int i; @@ -497,7 +497,7 @@ static int init_ixp_crypto(struct device *dev) goto err; } qmgr_set_irq(RECV_QID, QUEUE_IRQ_SRC_NOT_EMPTY, irqhandler, NULL); - tasklet_init(&crypto_done_tasklet, crypto_done_action, 0); + tasklet_setup(&crypto_done_tasklet, crypto_done_action); qmgr_enable_irq(RECV_QID); return 0; From patchwork Thu Jan 7 12:29:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003875 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DB29C433E0 for ; Thu, 7 Jan 2021 12:31:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 05D9123356 for ; Thu, 7 Jan 2021 12:31:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05D9123356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a1ikyffmIxAmYHW9jTJhkJ4tnx9WBK8cxJi17hHH+WQ=; b=eZUQ2j/CD/4JmEabByDmaZreW UcqVgDxmstPRtYGujhas/kr+/HTE8Dm1zZtNLv2g4ZMylDL/UKKF9xloAEv6yDm71xinI/XDhm6To THJoZGrTm7Q5LNXbF2BKwKFDJZaqjfF9Y9a4qO6rqQFTQeu5m2USkyg1mXe2qRHYrYMnM4IAB8P2x +OrcnIB2Hj+Tk97T78bVYgrBRIePAulPSEmNfM3RFzq2FJ3Q2jtbPu29u11tyLteJhgOStyVBdZjW fXwdT7nRWGbIN603skZSPAnAwMVQgyFXGkoDa/6J+6Wd1f+xvA7ht4E9582sG9rTfeZvpJ5iITkUh YEB+c99XQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURY-0004PC-A6; Thu, 07 Jan 2021 12:31:08 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURV-0004NX-IV; Thu, 07 Jan 2021 12:31:06 +0000 Received: by mail-pl1-x62d.google.com with SMTP id x12so3395549plr.10; Thu, 07 Jan 2021 04:31: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=gZKtlD6nuAorTKG2PqNJjMaym8CBQGfY80Jr0aK5tbM=; b=ihmAn+zhB1dzY9ajMP9IqgYOfjz+RGnTRZG3ZHOZ7FR3EX0CffunXSTZFlwhb/jg74 0einqhCTxWXZj162rkBnw8DvPuXXz3qvhmtmL792PQcZo5zNZmobateQCGnaHzE3jgfl 0h186ObJTgRQwFLdyIBnVCChDjxYQ1bwKRDumLKF8R2sKu6Mq2Fkxla28spaFNoADkzA DUHOgK4ljuMEEEq7OUZH1Di001wUApJUP2A/LomsTXsIrtHP7ihBn/2Ey9uljy9W1vIv kPO5n28M+SeevCEJoq0/c4ZoAlq3JTnzBRPo7vdB83VGqKgWNFq8sLk9qCKQpFesCYvk mxhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gZKtlD6nuAorTKG2PqNJjMaym8CBQGfY80Jr0aK5tbM=; b=UGSdh6lKNHNaOl+xw4VnbQgwNSy4+7jyKHZuDD3x9XK4Allhl3ACWX159tHMJrs4tj khixB6PLPSNAQ8DLbWjhyYv5ik+njR8aZMYFs0qvo/yXgnzkCkCgbxrAzeLVXXbdGwYr rCmzAzAmb47ZHYI6zHFARBVT48q8IhOAESdOQL8wUDF7y2ml6fo55dXqAgS+gpKi37It 9af/ehxatnDrPuhmZa7Np9DEMGdc4uUmnW+O6Afv/UapmyTcJWwfADN7OzM/P7j0tb4i ah1IeE7y5ch2upBrRygV9njQU+7k+kGfHDgj1ybCEF8pU9yfqSEYBXDekTCIooSBLd5M glOA== X-Gm-Message-State: AOAM533vJWdLa2Upa+L2QUWXQ7UBQ03sjg7voE1BW+XiYr3CLAab2RIn C5o9z4557aml1erVgy8OK5c= X-Google-Smtp-Source: ABdhPJwNTDU7LUvvKiGzSLC1OK86iDlb1JeAhrXE/2gnq2C7Hehi2vNtCbMVLadxVc8HcEVvoIRCkw== X-Received: by 2002:a17:902:44e:b029:da:b944:b798 with SMTP id 72-20020a170902044eb02900dab944b798mr9099679ple.6.1610022663537; Thu, 07 Jan 2021 04:31:03 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:02 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 11/19] crypto: mediatek: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:36 +0530 Message-Id: <20210107122944.16363-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073105_787288_34278EFF X-CRM114-Status: GOOD ( 12.81 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/mediatek/mtk-aes.c | 14 ++++++-------- drivers/crypto/mediatek/mtk-sha.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/mediatek/mtk-aes.c b/drivers/crypto/mediatek/mtk-aes.c index 7323066724c3..fa49bb5b043b 100644 --- a/drivers/crypto/mediatek/mtk-aes.c +++ b/drivers/crypto/mediatek/mtk-aes.c @@ -1080,16 +1080,16 @@ static struct aead_alg aes_gcm_alg = { }, }; -static void mtk_aes_queue_task(unsigned long data) +static void mtk_aes_queue_task(struct tasklet_struct *t) { - struct mtk_aes_rec *aes = (struct mtk_aes_rec *)data; + struct mtk_aes_rec *aes = from_tasklet(aes, t, queue_task); mtk_aes_handle_queue(aes->cryp, aes->id, NULL); } -static void mtk_aes_done_task(unsigned long data) +static void mtk_aes_done_task(struct tasklet_struct *t) { - struct mtk_aes_rec *aes = (struct mtk_aes_rec *)data; + struct mtk_aes_rec *aes = from_tasklet(aes, t, done_task); struct mtk_cryp *cryp = aes->cryp; mtk_aes_unmap(cryp, aes); @@ -1142,10 +1142,8 @@ static int mtk_aes_record_init(struct mtk_cryp *cryp) spin_lock_init(&aes[i]->lock); crypto_init_queue(&aes[i]->queue, AES_QUEUE_SIZE); - tasklet_init(&aes[i]->queue_task, mtk_aes_queue_task, - (unsigned long)aes[i]); - tasklet_init(&aes[i]->done_task, mtk_aes_done_task, - (unsigned long)aes[i]); + tasklet_setup(&aes[i]->queue_task, mtk_aes_queue_task); + tasklet_setup(&aes[i]->done_task, mtk_aes_done_task); } /* Link to ring0 and ring1 respectively */ diff --git a/drivers/crypto/mediatek/mtk-sha.c b/drivers/crypto/mediatek/mtk-sha.c index f55aacdafbef..c241762aa23b 100644 --- a/drivers/crypto/mediatek/mtk-sha.c +++ b/drivers/crypto/mediatek/mtk-sha.c @@ -1164,16 +1164,16 @@ static struct ahash_alg algs_sha384_sha512[] = { }, }; -static void mtk_sha_queue_task(unsigned long data) +static void mtk_sha_queue_task(struct tasklet_struct *t) { - struct mtk_sha_rec *sha = (struct mtk_sha_rec *)data; + struct mtk_sha_rec *sha = from_tasklet(sha, t, queue_task); mtk_sha_handle_queue(sha->cryp, sha->id - MTK_RING2, NULL); } -static void mtk_sha_done_task(unsigned long data) +static void mtk_sha_done_task(struct tasklet_struct *t) { - struct mtk_sha_rec *sha = (struct mtk_sha_rec *)data; + struct mtk_sha_rec *sha = from_tasklet(sha, t, done_task); struct mtk_cryp *cryp = sha->cryp; mtk_sha_unmap(cryp, sha); @@ -1219,10 +1219,8 @@ static int mtk_sha_record_init(struct mtk_cryp *cryp) spin_lock_init(&sha[i]->lock); crypto_init_queue(&sha[i]->queue, SHA_QUEUE_SIZE); - tasklet_init(&sha[i]->queue_task, mtk_sha_queue_task, - (unsigned long)sha[i]); - tasklet_init(&sha[i]->done_task, mtk_sha_done_task, - (unsigned long)sha[i]); + tasklet_setup(&sha[i]->queue_task, mtk_sha_queue_task); + tasklet_setup(&sha[i]->done_task, mtk_sha_done_task); } /* Link to ring2 and ring3 respectively */ From patchwork Thu Jan 7 12:29:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003877 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41481C433E0 for ; Thu, 7 Jan 2021 12:31:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DF6F22337F for ; Thu, 7 Jan 2021 12:31:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF6F22337F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MQRqxZiR+9jUkWavPiWaO+m7wFqR00wRwYuYQkD/+Js=; b=BAcnZfJP8mC8pOxL1EuD+H8yW N/4WCqXfys1seJaRiKA+bt/GlXeoxkVFcAfetMYnAWAl1+Qo9BAhO+hAkPF0gJUnk0Exw+Ou/LWkt teEAVksBBFmpFhm09dIHda+DI5n44HJACmUljQY5AJtIDmP2fSk18xlRoUwjhmZqhKQwf61OIU1wt aByUOmN86EwUgsMIELFyNFXq+fYMDTGuSHGHiGYibAoJtpKiZftYQsQwUtqw6R7pXxuwGy4rNRQAG YAcwu9rUziQXI/aVdiC79xXqAwwTYlVBW8/lJD193HxNGcVdYyxXYxwIX4v3JNRQ+RvpBvWL9P2Ti ro7rRF/SA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURh-0004TP-FD; Thu, 07 Jan 2021 12:31:17 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURf-0004S5-A0; Thu, 07 Jan 2021 12:31:16 +0000 Received: by mail-pg1-x52b.google.com with SMTP id n25so4754761pgb.0; Thu, 07 Jan 2021 04:31:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+2LJpncxdzSbb/JP/0XuErEHxZj6Pmh4iBBisr0kOG4=; b=RlLJQVTb/kJ2X/lk0UVDdHmWxXHFiudcMeEXcsJX48HfFWnkK2hHHDH4jbREnvdpq8 A7IDy/033Eb3hTMMjGOFVHTSHBtQff01avXlNN1c7j0Fk6uknAbCwzIFtI/kiXZpf7tl vRVWRmhkyL/7onpnKGQYZWqiuHfbIyphWsW1qxzs0PdJfPvymDEmOVAoo5UXPmkQYvse pr0smwosREu0XdbylCI8QYiZxCP759e3aDdrrA2z+uBjD3A0Hm8TORviR7q09Cq9s2dw oxQIwJCLr3+OCa7cOP6Cb8TuqoPkvQb8G+Z1C65Me9HV0JKrSCPR/Ew8IriwvGvpDc/r jbog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+2LJpncxdzSbb/JP/0XuErEHxZj6Pmh4iBBisr0kOG4=; b=NYbUYN5WqddmY+kQjUrAfKejHrT1c638s4S9aa8diTKju2xUMMcciXdrV2VnCJ1v1t BbCbyhton7hUOi+Xw5PM3HQqD06g3wLEZP22MW/XdrVtew/mFaP5WLnwFfg1TD/AKCKZ Lfu3J2kzRfBKaQwnv/rFcuBATu4/NzUcJ4ow8rRen9lbcgNX7XzwASnpUzzGSVVb7OAU 5vZ0KsRYTGBLMKSHwahgf98cdjwCfQ93Xhjn2R+Gs5J5Nkow/77aYI/TnrX+4rDhViDU Rvj5lcQyo3CfBgaTHtpoU4RkWSkiHj/arYqYdjChH8ZMGGu4ay6NU935ORmyyzAFhy43 yvOg== X-Gm-Message-State: AOAM531MlNu2Tx/G7KucX6nPM4fIupFyFk8Cs9UGVKs7IVJ9A0Rk7uM5 8OYgomwYrda9ePNhgUl0uQs= X-Google-Smtp-Source: ABdhPJxuLJz16UeeguipMy8mp+65DdLPSfon9Rh/9LTN6jawH7dFlJSH+Q4qIn8TgHF6oV/ygT09nw== X-Received: by 2002:a63:d141:: with SMTP id c1mr1618625pgj.75.1610022673261; Thu, 07 Jan 2021 04:31:13 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:12 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 12/19] crypto: omap: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:37 +0530 Message-Id: <20210107122944.16363-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073115_444677_90F8914B X-CRM114-Status: GOOD ( 13.61 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/omap-aes.c | 6 +++--- drivers/crypto/omap-des.c | 6 +++--- drivers/crypto/omap-sham.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index a45bdcf3026d..7e4223716620 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -503,9 +503,9 @@ static void omap_aes_copy_ivout(struct omap_aes_dev *dd, u8 *ivbuf) ((u32 *)ivbuf)[i] = omap_aes_read(dd, AES_REG_IV(dd, i)); } -static void omap_aes_done_task(unsigned long data) +static void omap_aes_done_task(struct tasklet_struct *t) { - struct omap_aes_dev *dd = (struct omap_aes_dev *)data; + struct omap_aes_dev *dd = from_tasklet(dd, t, done_task); pr_debug("enter done_task\n"); @@ -1151,7 +1151,7 @@ static int omap_aes_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_aes_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_aes_done_task); err = omap_aes_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-des.c b/drivers/crypto/omap-des.c index c9d38bcfd1c7..fddcfc3ba57b 100644 --- a/drivers/crypto/omap-des.c +++ b/drivers/crypto/omap-des.c @@ -594,9 +594,9 @@ static int omap_des_crypt_req(struct crypto_engine *engine, return omap_des_crypt_dma_start(dd); } -static void omap_des_done_task(unsigned long data) +static void omap_des_done_task(struct tasklet_struct *t) { - struct omap_des_dev *dd = (struct omap_des_dev *)data; + struct omap_des_dev *dd = from_tasklet(dd, t, done_task); int i; pr_debug("enter done_task\n"); @@ -1011,7 +1011,7 @@ static int omap_des_probe(struct platform_device *pdev) (reg & dd->pdata->major_mask) >> dd->pdata->major_shift, (reg & dd->pdata->minor_mask) >> dd->pdata->minor_shift); - tasklet_init(&dd->done_task, omap_des_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_des_done_task); err = omap_des_dma_init(dd); if (err == -EPROBE_DEFER) { diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index ae0d320d3c60..5dc7e23879a5 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1725,9 +1725,9 @@ static struct ahash_alg algs_sha384_sha512[] = { }, }; -static void omap_sham_done_task(unsigned long data) +static void omap_sham_done_task(struct tasklet_struct *t) { - struct omap_sham_dev *dd = (struct omap_sham_dev *)data; + struct omap_sham_dev *dd = from_tasklet(dd, t, done_task); int err = 0; dev_dbg(dd->dev, "%s: flags=%lx\n", __func__, dd->flags); @@ -2084,7 +2084,7 @@ static int omap_sham_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dd); INIT_LIST_HEAD(&dd->list); - tasklet_init(&dd->done_task, omap_sham_done_task, (unsigned long)dd); + tasklet_setup(&dd->done_task, omap_sham_done_task); crypto_init_queue(&dd->queue, OMAP_SHAM_QUEUE_LENGTH); err = (dev->of_node) ? omap_sham_get_res_of(dd, dev, &res) : From patchwork Thu Jan 7 12:29:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003879 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1176BC433E0 for ; Thu, 7 Jan 2021 12:31:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C082123356 for ; Thu, 7 Jan 2021 12:31:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C082123356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=q2u0m/ByZBlwGZbS55aiAoDw/ZbqAew+knuzjeExeT4=; b=TKzRoWZ5BdTyDfFpcoS1CG8no mknU2YWMo5WpW1sm8pZ82QPNcSPXWswb/SbQB7yM/3SLUv2Csweoh8t3PbutKzsKDkjhz5Voc2xiT QUdVVZGgFhbLAMk7t6K6sRP5aQxnLsj6SQn+14RRWM+D7W4CCxFAiQ6BZMWdNTqp2ND/3MkNwZ6D5 HMfRHN0VO3FbvlIwJamvXEV9wbWUKxi2i2LgjV9hP1CdT4BesCbp0Ui2UBRnu7oDP3na6pbNLgWxI uUrqXa54eW7jI90rwhFHVmN1mzwAvm1pT5sJqpxYLaowrgfiZL6vJjuIhQ6++x0zbkxd/9QPeoI7A JvSTy463Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURr-0004YH-0R; Thu, 07 Jan 2021 12:31:27 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURo-0004WL-Bq; Thu, 07 Jan 2021 12:31:25 +0000 Received: by mail-pj1-x1036.google.com with SMTP id z12so1345215pjn.1; Thu, 07 Jan 2021 04:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u19NxDApfMXx+Y8pGP/iF30yq+dZf2FG4hiZfFrFBcE=; b=V1vfZ4x5Wfxkd5zVPqFj8CmcX2UJQPnL4eVh0PHLtBP/O+bnLI8npKqfe0WWNSSjtp jVxjrpT9ITx0wMYv5LWSNWZS3ShZSAfyxkkqN24COtQArayItJ6AlxcqJCy+ovUEPBUm UuCmlzpkQ9XvyBl5Xmaf5dx1rxyduiiXh76svNgHpxKfPWF2l+KPWbirwAsIO6vB+NC9 K7mzRzbHYU4rIdO8dK7KhWZE5raGjBY0ImjknQ0UlJsw1JelcWm+BkAaVDsd9YEK7A/d R9xWE7pg8dyRY6eSOAX9g3uHebqMlbowmSLLwePMyuXP/C8SOj69hIypk8SXS7IW/M1k g/NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u19NxDApfMXx+Y8pGP/iF30yq+dZf2FG4hiZfFrFBcE=; b=dMNpykf56kzns6ILDpn3DA7RaKWdFBbPkXJpyU599T5YHlXla1ifxCO1eqIHxwvhoN 6CSvXCBKzymN8QODbtyEZAr010PGinCyGOik1Wrn4oiPeBX0EU9yLKg2Rw1hLWf7jpdP fxmjj8J6yj1S0rGA16LBmKOgyvGqw8OjFtBEYryPv3MTixv3lZhbtmEwhk8Vl8xFoCLX lvI2BP2R3pMSOicvy6qLKq+sWHgk5e9kmU8g6WdQbdy9dkPLS6BcIdn+UYLnwDoNNwAd bDrPlb8pQPGXBcl3t97rA2ygMBM1RVBTvQPJOA6/E21PRCJwRP4cdao8K/ze8hFerYXW 7nWg== X-Gm-Message-State: AOAM533C+hol7kJmvUHZB4VqYXZpnCnDGWrGdLAyeQ7yC8ZgxyQuJ1qu JkQLl2nRTFvB6BeXxM1epHo= X-Google-Smtp-Source: ABdhPJxoWvVixLhb4AqWe/Ovm28z3v0vAZuqSGnKpO54YLN6o9l6jNS4i24bVdxlg+M1aNnBhG8Cfg== X-Received: by 2002:a17:90a:aa85:: with SMTP id l5mr8154475pjq.230.1610022682199; Thu, 07 Jan 2021 04:31:22 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:21 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 13/19] crypto: picoxcell: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:38 +0530 Message-Id: <20210107122944.16363-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073124_439796_4421B56F X-CRM114-Status: GOOD ( 11.91 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/picoxcell_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index 84f9c16d984c..e64fa3e22521 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c @@ -1137,9 +1137,9 @@ static int spacc_req_submit(struct spacc_req *req) return spacc_ablk_submit(req); } -static void spacc_spacc_complete(unsigned long data) +static void spacc_spacc_complete(struct tasklet_struct *t) { - struct spacc_engine *engine = (struct spacc_engine *)data; + struct spacc_engine *engine = from_tasklet(engine, t, complete); struct spacc_req *req, *tmp; unsigned long flags; LIST_HEAD(completed); @@ -1649,8 +1649,7 @@ static int spacc_probe(struct platform_device *pdev) return -ENXIO; } - tasklet_init(&engine->complete, spacc_spacc_complete, - (unsigned long)engine); + tasklet_setup(&engine->complete, spacc_spacc_complete); ret = devm_add_action(&pdev->dev, spacc_tasklet_kill, &engine->complete); From patchwork Thu Jan 7 12:29:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003881 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ED3CC433E0 for ; Thu, 7 Jan 2021 12:31:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36F1023356 for ; Thu, 7 Jan 2021 12:31:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36F1023356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zJM9NsBtUDwSg9Tgwmzh3Gwi1MhmGlRJzPKOhx2KpRQ=; b=WAZ54XPYczCVp9xJfrCNXNo6U m66G7kPZBtZ0WOBJfLu0vNkvFXS9EvHjS4yO388hSVqqUrADiytqK/k+KszUgW/n039gWVXWh14Hh Ga10J4ISXpVVTzgy3wpugpEXa/L4tq88s7BRy3NID4Os5AkqGNXPbFiJZSVEbEaaMgT7YhkxrUFM2 gApEoG8cvuQlInhtitLDkPvpKVa26WQsJcGdwaRjnnxa9awc1kZrfxdUmUHQaJbnv1rSG/JryFfiq K+acKMse6vt0jJfJ8pmjX2JL0GlhPD30+PF0GePq4wuQhP19u884HoYEn3Wjqjw94J5Ich427arPC xa8tAUSJg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUS1-0004dV-K1; Thu, 07 Jan 2021 12:31:37 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxURx-0004b2-5q; Thu, 07 Jan 2021 12:31:35 +0000 Received: by mail-pf1-x435.google.com with SMTP id c12so3757313pfo.10; Thu, 07 Jan 2021 04:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OtP2Q83ql8pOj4Inc9JGr9jKNcuTQBZobhx5BHnHH/g=; b=AkfzBEI+UUoMh9Ko+yd3VvH5E3bzqEZ2e0iKWIz8ydxDQb2KcdrVyzFf/SnFuoM40B /BxU8yejC7FVGA/xoJy8SGY8xibYBMKUvufTewNI+jI1xY72bEzIlms+naGSt4PDDskE 9IYlm8Pvh0cybTCTXNmJ3F1nw6w5k4vgoAp1hSsxvOGskwItPxDji0rj4nci9aqKIGk3 bjLqEALX/8HTXLMunS1zH+VicqiE7hJX9yl6K/PnxaQeZTCQgWAV4qDEJSpfxVnBE6IB 44vEV4/WUgTYK7uV7GIhIw4XfjkPOQfMyTL7s7WmXv7zVapcY8WjEqV8/X4zR3JTRopE PHjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OtP2Q83ql8pOj4Inc9JGr9jKNcuTQBZobhx5BHnHH/g=; b=bi1N2Bs5gRpVRNrnDYx1WReWbdHp3RokZF40xQ8S2XqX/vgl3m1BF8Bjgqqf8gDl3+ WczyXoyDyQTV6pr/tCfzdk0+vCoiQrviJvVWCRuFPfUE5lkpMM4jUqcc9kfXS+Z1qr00 RbMxpoISqt4hu7UGlFxw9DaECtRVjFyOuc0sV2LiXFI+G854ccYJyfbBKrjlZ7rN8NWo uop89ME7XGvLV6axiUIfewK+hX9MdkQR7IuntT9dmqvbKo2zP4HonnWhk8ci0V0G1Yzx GttAVQ5xI2uo2GQBZWeG5Z08LOWesFwed3tPkbBVlbOiZG0amPEh6o5ewo3y1ahworfb BRFA== X-Gm-Message-State: AOAM533m2zi6M7jnG9U59iQV+OvEZTSwrAyXQrY9nVtQSBEFxxciEEs+ ff8JvYTZilLxoe/z714j15s= X-Google-Smtp-Source: ABdhPJz2YO0tbVqsWC+LMReB1B53opOdDT4noQnSd0XMYLIq3t0pRPywkvmF8DRHn/bzgAR09QGlXA== X-Received: by 2002:aa7:85d8:0:b029:19e:610e:1974 with SMTP id z24-20020aa785d80000b029019e610e1974mr8620522pfn.21.1610022691084; Thu, 07 Jan 2021 04:31:31 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:30 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 14/19] crypto: qat: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:39 +0530 Message-Id: <20210107122944.16363-11-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073133_320674_FCF39ECA X-CRM114-Status: GOOD ( 16.07 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/qat/qat_common/adf_isr.c | 5 ++--- drivers/crypto/qat/qat_common/adf_sriov.c | 10 +++++----- drivers/crypto/qat/qat_common/adf_transport.c | 4 ++-- .../crypto/qat/qat_common/adf_transport_internal.h | 2 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 11 +++++------ 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_isr.c b/drivers/crypto/qat/qat_common/adf_isr.c index c45853463530..bb5251d587eb 100644 --- a/drivers/crypto/qat/qat_common/adf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_isr.c @@ -244,9 +244,8 @@ static int adf_setup_bh(struct adf_accel_dev *accel_dev) int i; for (i = 0; i < hw_data->num_banks; i++) - tasklet_init(&priv_data->banks[i].resp_handler, - adf_response_handler, - (unsigned long)&priv_data->banks[i]); + tasklet_setup(&priv_data->banks[i].resp_handler, + adf_response_handler); return 0; } diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c index 8c822c2861c2..591537399edb 100644 --- a/drivers/crypto/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/qat/qat_common/adf_sriov.c @@ -24,9 +24,10 @@ static void adf_iov_send_resp(struct work_struct *work) kfree(pf2vf_resp); } -static void adf_vf2pf_bh_handler(void *data) +static void adf_vf2pf_bh_handler(struct tasklet_struct *t) { - struct adf_accel_vf_info *vf_info = (struct adf_accel_vf_info *)data; + struct adf_accel_vf_info *vf_info = + from_tasklet(vf_info, t, vf2pf_bh_tasklet); struct adf_pf2vf_resp *pf2vf_resp; pf2vf_resp = kzalloc(sizeof(*pf2vf_resp), GFP_ATOMIC); @@ -52,9 +53,8 @@ static int adf_enable_sriov(struct adf_accel_dev *accel_dev) vf_info->accel_dev = accel_dev; vf_info->vf_nr = i; - tasklet_init(&vf_info->vf2pf_bh_tasklet, - (void *)adf_vf2pf_bh_handler, - (unsigned long)vf_info); + tasklet_setup(&vf_info->vf2pf_bh_tasklet, + adf_vf2pf_bh_handler); mutex_init(&vf_info->pf2vf_lock); ratelimit_state_init(&vf_info->vf2pf_ratelimit, DEFAULT_RATELIMIT_INTERVAL, diff --git a/drivers/crypto/qat/qat_common/adf_transport.c b/drivers/crypto/qat/qat_common/adf_transport.c index 5a7030acdc33..03dcbeac25d7 100644 --- a/drivers/crypto/qat/qat_common/adf_transport.c +++ b/drivers/crypto/qat/qat_common/adf_transport.c @@ -324,9 +324,9 @@ static void adf_ring_response_handler(struct adf_etr_bank_data *bank) adf_handle_response(&bank->rings[i]); } -void adf_response_handler(uintptr_t bank_addr) +void adf_response_handler(struct tasklet_struct *t) { - struct adf_etr_bank_data *bank = (void *)bank_addr; + struct adf_etr_bank_data *bank = from_tasklet(bank, t, resp_handler); struct adf_hw_csr_ops *csr_ops = GET_CSR_OPS(bank->accel_dev); /* Handle all the responses and reenable IRQs */ diff --git a/drivers/crypto/qat/qat_common/adf_transport_internal.h b/drivers/crypto/qat/qat_common/adf_transport_internal.h index 501bcf0f1809..aaec7b2bc220 100644 --- a/drivers/crypto/qat/qat_common/adf_transport_internal.h +++ b/drivers/crypto/qat/qat_common/adf_transport_internal.h @@ -46,7 +46,7 @@ struct adf_etr_data { struct dentry *debug; }; -void adf_response_handler(uintptr_t bank_addr); +void adf_response_handler(struct tasklet_struct *t); #ifdef CONFIG_DEBUG_FS #include int adf_bank_debugfs_add(struct adf_etr_bank_data *bank); diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common/adf_vf_isr.c index 38d316a42ba6..1d0ff58fd9b5 100644 --- a/drivers/crypto/qat/qat_common/adf_vf_isr.c +++ b/drivers/crypto/qat/qat_common/adf_vf_isr.c @@ -68,9 +68,10 @@ static void adf_dev_stop_async(struct work_struct *work) kfree(stop_data); } -static void adf_pf2vf_bh_handler(void *data) +static void adf_pf2vf_bh_handler(struct tasklet_struct *t) { - struct adf_accel_dev *accel_dev = data; + struct adf_accel_dev *accel_dev = from_tasklet(accel_dev, t, + vf.pf2vf_bh_tasklet); struct adf_hw_device_data *hw_data = accel_dev->hw_device; struct adf_bar *pmisc = &GET_BARS(accel_dev)[hw_data->get_misc_bar_id(hw_data)]; @@ -138,8 +139,7 @@ static void adf_pf2vf_bh_handler(void *data) static int adf_setup_pf2vf_bh(struct adf_accel_dev *accel_dev) { - tasklet_init(&accel_dev->vf.pf2vf_bh_tasklet, - (void *)adf_pf2vf_bh_handler, (unsigned long)accel_dev); + tasklet_setup(&accel_dev->vf.pf2vf_bh_tasklet, adf_pf2vf_bh_handler); mutex_init(&accel_dev->vf.vf2pf_lock); return 0; @@ -216,8 +216,7 @@ static int adf_setup_bh(struct adf_accel_dev *accel_dev) { struct adf_etr_data *priv_data = accel_dev->transport; - tasklet_init(&priv_data->banks[0].resp_handler, adf_response_handler, - (unsigned long)priv_data->banks); + tasklet_setup(&priv_data->banks[0].resp_handler, adf_response_handler); return 0; } From patchwork Thu Jan 7 12:29:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003883 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DD65C433DB for ; Thu, 7 Jan 2021 12:31:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0AF1D23358 for ; Thu, 7 Jan 2021 12:31:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AF1D23358 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cDVXssKcVGrz5Ux5CJ3jqS7skXAh6mJGKWwlJy9xgj4=; b=s7Pv++bnDATJtyHD9G5q/p7x8 Nc6kKcjdeL7uOEeWQJU7LrCCBdYDg1J4HlUiFvB7iFOYQ/BYNnHmkg7JKAUe+2bv88z/7eNmQFRu1 IeSMvHmwyMFwBptt8T9b1gC3PmORugvIAsguMN9xrYJPlp0nK9NBvjbW/udrDSmcGBDLiuV8hyqaY xCNjgrbQbR4ckFMvpE9gwglxQmPu2noz8Tsk8Ld2v8oqsowkT0VbFJ/mOW5qZLBzCS7Gnu4uDPpWd XDfbAouEdz9fo6buksoT2xSLJuWVKrJ1cS6ydpdQdo+go2q4DDFMVuPr9h40UAGjj08AAjRzwOFs+ jfc53F52w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUS7-0004gn-Vt; Thu, 07 Jan 2021 12:31:44 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUS5-0004et-FC; Thu, 07 Jan 2021 12:31:42 +0000 Received: by mail-pg1-x52c.google.com with SMTP id v19so4707990pgj.12; Thu, 07 Jan 2021 04:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gQh2IwNxftbR34HfI9l3nT7vPGQ8lmvW4dX0b9EAc7Y=; b=dGL5mWBcvHj+vnm8AjPqTntimPrEpTab2oHNsQsqlAP4yzhRCgol10ddlQIvkn9d82 MLJ0MLh7mDWgvRyIEPRVqdGXqg7s9ab3x42Fsln6gs+5WzcEecWA6SVU8egl/Fb2FKtK sZgzq5Dvj7PqobU9umm8h3OyP0xgxLanlAv4AbOpuarLKRGZshQtqEJWHWPQKNeQF/o6 w7D2oDO2FZrhKFjEgJP/vrw/Rtvr3F0Tpd0nty03wEGe9bmOK3jWo5pFcuiWAlMDsRco vmlzTBAnx4s/Krb3Di3bXmQ+yBl+I7KYs9ytlPK4k0aGmu3GCSerCTNwmgEFjr9h8Woz 66Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gQh2IwNxftbR34HfI9l3nT7vPGQ8lmvW4dX0b9EAc7Y=; b=IRJ3RV0uT6HgYXjEggecmEDR3+fLYu2Y5VmXA8hYOEbJbtUX9C2RgkJYqaSHirDozP D061nklSsN0xRC9zCclei3c9ckANtO6nShhfE/J+LpHKhXcROuLFTLtxD9dOedPl3X8G MQjupTIEbBAmuFepmahDO5NdxfDX9GRfdy6H98g6RPAuR+MbdMtQBA9GiktuQgZbQcs1 1UVyes+LU8Ol54YaqH6it4M2wuzmalOI7GKHTDzx8NXm7Sr6PwXoPc1AVRk5maWtR7qp 4sKmqYKRW5pZ+z0itrQgmyGP1JT6SMrG5QvLI2c6+0+jhQGhwXfeiiM6bRdjuKIs22Jx ruNQ== X-Gm-Message-State: AOAM532NuD1roGvUnFuM91Zzo0W9azS66jHPPT5N2HmHC2DVZ3BrtiDb qso48epKsTXMf3OtDuJEsEA= X-Google-Smtp-Source: ABdhPJz2CQX6v8/ZMQe6yTXb9e0CjOlBzYMMgjcHw7ulFh1JTqqcMFPoU5EF0ZbAkB/+YlsC8YdOFA== X-Received: by 2002:a62:874a:0:b029:19e:6e03:cfc3 with SMTP id i71-20020a62874a0000b029019e6e03cfc3mr8250704pfe.67.1610022699768; Thu, 07 Jan 2021 04:31:39 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:39 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 15/19] crypto: qce: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:40 +0530 Message-Id: <20210107122944.16363-12-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073141_545937_2F14B03C X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/qce/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 80b75085c265..374281e9d6b9 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -116,9 +116,9 @@ static int qce_handle_queue(struct qce_device *qce, return ret; } -static void qce_tasklet_req_done(unsigned long data) +static void qce_tasklet_req_done(struct tasklet_struct *t) { - struct qce_device *qce = (struct qce_device *)data; + struct qce_device *qce = from_tasklet(qce, t, done_tasklet); struct crypto_async_request *req; unsigned long flags; @@ -235,8 +235,7 @@ static int qce_crypto_probe(struct platform_device *pdev) goto err_clks; spin_lock_init(&qce->lock); - tasklet_init(&qce->done_tasklet, qce_tasklet_req_done, - (unsigned long)qce); + tasklet_setup(&qce->done_tasklet, qce_tasklet_req_done); crypto_init_queue(&qce->queue, QCE_QUEUE_LENGTH); qce->async_req_enqueue = qce_async_request_enqueue; From patchwork Thu Jan 7 12:29:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003885 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 385C3C433DB for ; Thu, 7 Jan 2021 12:32:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAA2D23359 for ; Thu, 7 Jan 2021 12:32:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAA2D23359 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rJP5koJsJquP++hadgJwaQqhBtG6NV3PjK1j6Uji/80=; b=We5Ymj4thr8zir8Z1Y3L9N0pt TqVAhnzusKQAyACXadCGzoURW6wlbFk/VfoVDkOuTaxh0e9zgQq7H/Z8bec+ujC03RuQE1aafSlTt 2BZFTySxgWzJAZfcnb5nOBheyGGDEW7XZnkCqZfmzXmBpUIcvR3Tg+QfgwnKoxWmu3aILS+XGCTOv 3/HlXERE61JJ+VlOGaoO4hG2bKqIqMGoAnBw81VlQQK5Jh4MR9QNt6YY+IAshJLMccq32MUipM25U 5uELcsOL3fhQPif8QQdKM0fOLr+NvT8Ue7LOFKx0ZV5UT7HSpy117HJqU+wp22wdmqzKpOuknloNV CoIoAwmrw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUSI-0004mt-Gv; Thu, 07 Jan 2021 12:31:54 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUSF-0004kb-1A; Thu, 07 Jan 2021 12:31:52 +0000 Received: by mail-pf1-x42c.google.com with SMTP id c12so3757811pfo.10; Thu, 07 Jan 2021 04:31: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=JRk8t1M4XXjPEk7oyhWaY6rs5Sl9RScV/nWFL0Tu+/w=; b=kYC9dTtWAXY4xKQ/GQ4YLzK0W3XwA/v9tBfEw1XfRdYS2voXTYlj42FmwN8IFu5Bfv JMQMpaQ36VXpv66DlJg3QqoQ4lJ+w6o9RUwX+2gf4WQEnAXnLa9yv0AeaaGapgFX2Wzu 42oR762tRp1x4BgfjO0MazixRgcE8XcydZMOucaAGjhtcrfEgRHl4cZBdtKpVxddNwhf 180qtNIApokfroeh0cNuMVn2VZs98TX8E2dpqj2a/osygcmHAKUg+WWTqLpmffGLDfJG TBBo2IvbLVQVcBx23WQBH5JTqhtWgYwZBLt55qL3vLmVL+PDq7Su3mMWiJhIjVlfCTLN zLDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JRk8t1M4XXjPEk7oyhWaY6rs5Sl9RScV/nWFL0Tu+/w=; b=nyZCyu3Jw0cODS60TSKLruhRBSEHQmAeOgX2gm3ZSVk75atLmJzcDzQUUrTK6zThRO mNSaC7EjDKnNBsWjjywvdd017H1CD8OuZsApjE/TnpVx8FUaxoZO/uM0U4jRAMiviCH3 VvayDnttXTlmCmgpKcCDe7fIMCocvG54cGT2DgMuLi+pbUFMJLg4j4U4e2Y/2dPoRmbF H4N9+IbjfDD7GEXp6KXZlMKXxEIdflqQosmaZcEr26maEcD9iVEcbZLLxiXVxiGZ2qzw J9FIbJNSxgHSj3KGwuT2xze23D00Aps5X+WCI5x46IB4xmw37UZNrLzoGsafVIdCGDaV R0WA== X-Gm-Message-State: AOAM5326nPbYlRcUpTQPcoKU0zATnoSY/t0OB2GIViI7P2V9G2tXL3oS qW6xgx8y6TiBuPFKyEDZBoA= X-Google-Smtp-Source: ABdhPJyu3WtVMoxBM4D25J3ONFDYaaGBZCccHMGw5dFAMa5AazfuQ4DJ1h3Q7vYBYDehN21EQTwdfw== X-Received: by 2002:a65:6152:: with SMTP id o18mr1641272pgv.392.1610022709048; Thu, 07 Jan 2021 04:31:49 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:48 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 16/19] crypto: rockchip: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:41 +0530 Message-Id: <20210107122944.16363-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073151_798909_839D6FD1 X-CRM114-Status: GOOD ( 13.15 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/rockchip/rk3288_crypto.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c index 35d73061d156..af6ad9f49009 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -201,9 +201,9 @@ static int rk_crypto_enqueue(struct rk_crypto_info *dev, return ret; } -static void rk_crypto_queue_task_cb(unsigned long data) +static void rk_crypto_queue_task_cb(struct tasklet_struct *T) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, queue_task); struct crypto_async_request *async_req, *backlog; unsigned long flags; int err = 0; @@ -231,9 +231,9 @@ static void rk_crypto_queue_task_cb(unsigned long data) dev->complete(dev->async_req, err); } -static void rk_crypto_done_task_cb(unsigned long data) +static void rk_crypto_done_task_cb(struct tasklet_struct *t) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, done_task); if (dev->err) { dev->complete(dev->async_req, dev->err); @@ -389,10 +389,8 @@ static int rk_crypto_probe(struct platform_device *pdev) crypto_info->dev = &pdev->dev; platform_set_drvdata(pdev, crypto_info); - tasklet_init(&crypto_info->queue_task, - rk_crypto_queue_task_cb, (unsigned long)crypto_info); - tasklet_init(&crypto_info->done_task, - rk_crypto_done_task_cb, (unsigned long)crypto_info); + tasklet_setup(&crypto_info->queue_task, rk_crypto_queue_task_cb); + tasklet_setup(&crypto_info->done_task, rk_crypto_done_task_cb); crypto_init_queue(&crypto_info->queue, 50); crypto_info->enable_clk = rk_crypto_enable_clk; From patchwork Thu Jan 7 12:29:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003887 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=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2828C433E6 for ; Thu, 7 Jan 2021 12:32:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5CF5923356 for ; Thu, 7 Jan 2021 12:32:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CF5923356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4jgdqrOaJqmaVDMJA0oyda160MEZGMSK0iYxrEatOLM=; b=1Ay1zdIAagoHTaue/jjclIX1w 5mTopDqquTFXv2DPX70a8aEQKSrdU5Tz24SjAvTdh2AKyoFqSL3hPCzz1IaImIq3VVImyXCgng6XW 0I02folmEaP15HrIRwL1hIYZ9WzoHHFmW1HYV5O4kMU0dhaDqYJQvE8cLN3QtqTpPw6S3T2KtUaUv yWw3m8GBZ2D2ZU2ZWldPL5YfMT0S9ORpTLhMhQR9bVnstieTIBL2zpiEcFWZNeYbzkQdvEOP/cOVo rhnwcPAukoysbuyogehbOn6LwhAcQtjQWb7HUWMrDlweICi2hPSHZ+klc/KzBAGUO2PQoKl5SXeUU mw+bByclA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUSR-0004s0-SZ; Thu, 07 Jan 2021 12:32:03 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUSO-0004ph-AN; Thu, 07 Jan 2021 12:32:01 +0000 Received: by mail-pj1-x1029.google.com with SMTP id iq13so1339614pjb.3; Thu, 07 Jan 2021 04:31: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=hdFxs07OBJ0o+UoENy6opg4NHXCcbJpiwkpmIdQiwws=; b=dQn+QrXHQpOycT6rbO+tf/VR/2QMy4WJQF4X1T/636no6mAkXVAUjrvWMo2nT3dhFS MRRo62EKaGJGptO13DIwa9Vfw1/KvufSuLeEwv0p+z6zizrGznfJEWjEMmUYfoKXa5av vaNh0FRL0qWbKfl2tWLS12tIf0FIF9NcCzWZmVgwNXTNPnU+q7TYDy8xjYu6yqUln3Xu consEYNhfD0raTk6uE5r5k4ZmRqPEPFhYDR3tmSOElpVw4P6ZDKVtdlw8DoACyY0M+dK D++6FYanSQwP8nPSDOjL1iy35Zd3R1kjHN7FknwJFVRwqmtIFwRRYb5R8MOuyUqhU4O2 2GbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hdFxs07OBJ0o+UoENy6opg4NHXCcbJpiwkpmIdQiwws=; b=IoQxm08pm/H36eXTV4FGKuM0aMRWlgOsBJGBGwIWRicHF2QAPVnqiizyhRraTh6J9S uzfW6ZWSbUHa/ywg8y9j1Zbf+ygYotFTb7yZpDDp7IAOGOaWbXUzMG2uzk2HmtrciW/m BBus9+T6qTsGO1bPMRSCm86vwAzVnULwUINzqESN7rDbAbw+KfrtsOLk4BnCPQr45J+8 o6/5jM6z3vRLXK2HsK9uq3f8YEQ74Iurdu9sZ4Rs20zpMatA2qkEMQbt7GlNTAoq+omM EjM1D9fa1pGd1nomodac36HbF0nbr66Ux8oJnkS2M9vNgzIXWDw8DB1kpOHBhA76BXdk R9Nw== X-Gm-Message-State: AOAM531foHunGrqlhr1/A1MPfhfoQNqzos8Wx4Lzm3QlmIVH25l2klUp YXqMo3khYiICw8Z/T8dzzhw= X-Google-Smtp-Source: ABdhPJzM7buCkj+xCGO+fl9i/Vq0V/mCKApgwiynjVFCmVMVTl6IZTP5hTcXLXfj7QsK6v7+eTgE8g== X-Received: by 2002:a17:902:c195:b029:db:c725:2522 with SMTP id d21-20020a170902c195b02900dbc7252522mr8855200pld.83.1610022718182; Thu, 07 Jan 2021 04:31:58 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:31:57 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 17/19] crypto: s5p: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:42 +0530 Message-Id: <20210107122944.16363-14-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073200_375014_EE8EF164 X-CRM114-Status: GOOD ( 13.56 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Acked-by: Krzysztof Kozlowski Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/s5p-sss.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index 682c8a450a57..128512a365e1 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -1445,9 +1445,9 @@ static int s5p_hash_handle_queue(struct s5p_aes_dev *dd, * s5p_hash_tasklet_cb() - hash tasklet * @data: ptr to s5p_aes_dev */ -static void s5p_hash_tasklet_cb(unsigned long data) +static void s5p_hash_tasklet_cb(struct tasklet_struct *t) { - struct s5p_aes_dev *dd = (struct s5p_aes_dev *)data; + struct s5p_aes_dev *dd = from_tasklet(dd, t, hash_tasklet); if (!test_bit(HASH_FLAGS_BUSY, &dd->hash_flags)) { s5p_hash_handle_queue(dd, NULL); @@ -1975,9 +1975,9 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode) s5p_aes_complete(req, err); } -static void s5p_tasklet_cb(unsigned long data) +static void s5p_tasklet_cb(struct tasklet_struct *t) { - struct s5p_aes_dev *dev = (struct s5p_aes_dev *)data; + struct s5p_aes_dev *dev = from_tasklet(dev, t, tasklet); struct crypto_async_request *async_req, *backlog; struct s5p_aes_reqctx *reqctx; unsigned long flags; @@ -2258,7 +2258,7 @@ static int s5p_aes_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pdata); s5p_dev = pdata; - tasklet_init(&pdata->tasklet, s5p_tasklet_cb, (unsigned long)pdata); + tasklet_setup(&pdata->tasklet, s5p_tasklet_cb); crypto_init_queue(&pdata->queue, CRYPTO_QUEUE_LEN); for (i = 0; i < ARRAY_SIZE(algs); i++) { @@ -2268,8 +2268,7 @@ static int s5p_aes_probe(struct platform_device *pdev) } if (pdata->use_hash) { - tasklet_init(&pdata->hash_tasklet, s5p_hash_tasklet_cb, - (unsigned long)pdata); + tasklet_setup(&pdata->hash_tasklet, s5p_hash_tasklet_cb); crypto_init_queue(&pdata->hash_queue, SSS_HASH_QUEUE_LENGTH); for (hash_i = 0; hash_i < ARRAY_SIZE(algs_sha1_md5_sha256); From patchwork Thu Jan 7 12:29:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003889 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D53AC433DB for ; Thu, 7 Jan 2021 12:32:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5B7E23356 for ; Thu, 7 Jan 2021 12:32:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5B7E23356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NHkTi8TLCQ5Bud5Ntiusm1lqGaH5XQrdqZB4eykbafA=; b=uT+qrsgMBIW3ezTh3mxVIZaQb 0sLgdpW/8ep45x2C5+w9okQ4bpIDb3pc3OVVfM1pMvZExVtpjVdUAtZlDIloSeNPEpodJDbvI7kEG 4Pl9UfIePpfPDB9hLOmBJ2SiIGLGYb8QHWHPDGE+V/KrWYGeqEFVlXuHsnBjtCeydOXC/BixPucJS IigbZ1rwNdLiAwTRYW8PWRIBMsimWWW9lDyHriZTvdv79ky5JzLAWNpUnl6PR3C+VPohfGg2gbcz7 lcE/eAmgEGUDKkEb4iX0zyjuil3cE2IiexR0rEOlYRqvo8rP6dMKXWNf5Vmimu5MZbELA23v5BmQo dO+pkIfnw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUSb-0004ws-Pz; Thu, 07 Jan 2021 12:32:13 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUSY-0004uJ-2r; Thu, 07 Jan 2021 12:32:11 +0000 Received: by mail-pg1-x533.google.com with SMTP id i5so4759801pgo.1; Thu, 07 Jan 2021 04:32:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FGU6XdrM5ip9qPogsEZz38Pcqw7Ofqtd00r2eJGcshk=; b=lYk3ZavHMJgM8Ipk8OB7Ok0ZGlnIVM/LIbC6sQ27jQ08uw235EsHYU3NCmQQh64oic LZapX+bK6uFsiDAhbqGoeYXVQj0mpyRmaSCFyzvFBZPJn8dpl6ox5aYut2p10n6K3RZf z83CbGkfr2xLxUXj+o4nXiEWQGyqqkkEEBxIsQweg4H2SHQuimMbEg4t0m8qNoXqB18Z FOYQfY4pZdrCQc5jrwNEe7+q0FUmtkhA5IeSfK2WeQWAHPiCZQ6X+8uDfdI2QMZcN2e4 7Ae7rB46jMewbimo9JzWtX4Wc6fCsZm0gRoo/+K0pXvr48PuIasJpcErYSjrGpNmGv/o g00g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FGU6XdrM5ip9qPogsEZz38Pcqw7Ofqtd00r2eJGcshk=; b=eLSdxD7AYMvqOCfVVccFUNPQXljtpQ3zI5Y9mVLodGPEBC4jRrAIaWZbd0CXiZJxS5 lVhE+48dZ2FklWiOsv42tBzlX/ScWJBMAoK3BMtq/oZm9LQL3XDyTZ/K0hGUlK4gHVkP wbkDAwe4sVM/rFPVX0n/+ViuMHV/GZT2paq5fLAzHxk3rEA1J0E95wBukoXgNiUUcevF ws15UhR4ESUNvy992Tk4gzv/sX/QyCsq/UGilflgeM346KPHOkAsJAMEDBAsFhu2xu/3 UMihZf7h5pSs0M4bjodoLG5WDWgdvCh6bIxiGdXIzKkc8CfmgjtF0zFTYwGDEOJQ7+Mb QwbQ== X-Gm-Message-State: AOAM530lgNRkWRuMIpXgOiNxnvoIy5Qra53btVIgiNALdiE9vhcD5Bz0 SHu/ogDUZ7nOQ23YMiHut88= X-Google-Smtp-Source: ABdhPJylju+uMXysoljSokY20FN0SxpzIZsNXLjSsMk0NvlXPGCGvW2caIXxbPVqNspfC8frkKm4nw== X-Received: by 2002:a63:f044:: with SMTP id s4mr1585524pgj.355.1610022727745; Thu, 07 Jan 2021 04:32:07 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:32:07 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 18/19] crypto: talitos: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:43 +0530 Message-Id: <20210107122944.16363-15-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073210_231940_1E72D91E X-CRM114-Status: GOOD ( 14.61 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, Romain Perier , davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/crypto/talitos.c | 42 ++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 4fd85f31630a..be4f7dd810fd 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -403,10 +403,11 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch) * process completed requests for channels that have done status */ #define DEF_TALITOS1_DONE(name, ch_done_mask) \ -static void talitos1_done_##name(unsigned long data) \ +static void talitos1_done_##name(struct tasklet_struct *t) \ { \ - struct device *dev = (struct device *)data; \ - struct talitos_private *priv = dev_get_drvdata(dev); \ + struct talitos_private *priv = from_tasklet(priv, t, \ + done_task[0]); \ + struct device *dev = priv->dev; \ unsigned long flags; \ \ if (ch_done_mask & 0x10000000) \ @@ -429,11 +430,12 @@ static void talitos1_done_##name(unsigned long data) \ DEF_TALITOS1_DONE(4ch, TALITOS1_ISR_4CHDONE) DEF_TALITOS1_DONE(ch0, TALITOS1_ISR_CH_0_DONE) -#define DEF_TALITOS2_DONE(name, ch_done_mask) \ -static void talitos2_done_##name(unsigned long data) \ +#define DEF_TALITOS2_DONE(name, ch_done_mask, tasklet_idx) \ +static void talitos2_done_##name(struct tasklet_struct *t) \ { \ - struct device *dev = (struct device *)data; \ - struct talitos_private *priv = dev_get_drvdata(dev); \ + struct talitos_private *priv = from_tasklet(priv, t, \ + done_task[tasklet_idx]); \ + struct device *dev = priv->dev; \ unsigned long flags; \ \ if (ch_done_mask & 1) \ @@ -453,10 +455,10 @@ static void talitos2_done_##name(unsigned long data) \ spin_unlock_irqrestore(&priv->reg_lock, flags); \ } -DEF_TALITOS2_DONE(4ch, TALITOS2_ISR_4CHDONE) -DEF_TALITOS2_DONE(ch0, TALITOS2_ISR_CH_0_DONE) -DEF_TALITOS2_DONE(ch0_2, TALITOS2_ISR_CH_0_2_DONE) -DEF_TALITOS2_DONE(ch1_3, TALITOS2_ISR_CH_1_3_DONE) +DEF_TALITOS2_DONE(4ch, TALITOS2_ISR_4CHDONE, 0) +DEF_TALITOS2_DONE(ch0, TALITOS2_ISR_CH_0_DONE, 0) +DEF_TALITOS2_DONE(ch0_2, TALITOS2_ISR_CH_0_2_DONE, 0) +DEF_TALITOS2_DONE(ch1_3, TALITOS2_ISR_CH_1_3_DONE, 1) /* * locate current (offending) descriptor @@ -3386,23 +3388,17 @@ static int talitos_probe(struct platform_device *ofdev) if (has_ftr_sec1(priv)) { if (priv->num_channels == 1) - tasklet_init(&priv->done_task[0], talitos1_done_ch0, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos1_done_ch0); else - tasklet_init(&priv->done_task[0], talitos1_done_4ch, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos1_done_4ch); } else { if (priv->irq[1]) { - tasklet_init(&priv->done_task[0], talitos2_done_ch0_2, - (unsigned long)dev); - tasklet_init(&priv->done_task[1], talitos2_done_ch1_3, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_ch0_2); + tasklet_setup(&priv->done_task[1], talitos2_done_ch1_3); } else if (priv->num_channels == 1) { - tasklet_init(&priv->done_task[0], talitos2_done_ch0, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_ch0); } else { - tasklet_init(&priv->done_task[0], talitos2_done_4ch, - (unsigned long)dev); + tasklet_setup(&priv->done_task[0], talitos2_done_4ch); } } From patchwork Thu Jan 7 12:29:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 12003891 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5EC8C433E0 for ; Thu, 7 Jan 2021 12:32:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6590423356 for ; Thu, 7 Jan 2021 12:32:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6590423356 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ME7Yq/zxXxsNyBhjFZcp5qBCa29Hn1uMQdP0Uh6c08c=; b=KfItfue2CBKaDTBezDyS2FTcE m3Q2yVkN8ZQV1mn1vgCYgDpSggDBZsyba0d6Xd5JgPK02uZrYQHejDCAWEsn3zCQpClMstfnj2day ozmGE6LuftzwpiJSQhwsI4ztsIvutqdAkRt+9SPbdYakb1hv/cotqqJS9wA2vJSbxJzH7SEj4KGvB NHOvoNoiilHiQJmGsaJbQtbhUokaFzq5YLUU7SWZwJyyRFta1qFjgTeveM+As474L9eVbWLPMk2gv +2zCr6MsqPCTnMUwuf6XHsRGd14qWwh+iCu4XG3/+ZZ+BXUEkqB8MUHFbtkLAg2tDoNLp9lxJd6cG EGUsL1+BQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUSl-000537-Q2; Thu, 07 Jan 2021 12:32:23 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxUSh-0004zI-OA; Thu, 07 Jan 2021 12:32:20 +0000 Received: by mail-pl1-x62f.google.com with SMTP id q4so3406645plr.7; Thu, 07 Jan 2021 04:32:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nmGD8HgPe/79+tkqFpZtuKTtNUxMt+0Wii+rdB2TPJ0=; b=S4LNIh9R6yyfuQUC+97w6+ddLUmLZts28spXG4s3H2FtN63hu9uKU4xyqyNAaURVtl MrEoseabVLnbPwm4szc+NBo3o6mQ6oNDvq79kNnzMzf+eSGD3U53lSioAf2cU0sTVx6d f3DTuXE5WYhBTPbycCxa6p3Em5hFNd/hzmb8ZOvDpGBmqzWZNyCnHDqqjt72U4HtEQ2h 9lkZqR+IabZBTkSqHXDQqAaLkI0A/EPMfO0SUQutv1gLXBlPX5KENzoKX5gxKHYGxuvY Rs0TWa9WbyQmSdqmJsJ5qlA9aTFN+w2bppat+Roha+o29T2fcaL0dmRWmf/sBmG9IbnS TGmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nmGD8HgPe/79+tkqFpZtuKTtNUxMt+0Wii+rdB2TPJ0=; b=m8rxYt8+PggVaRh8oqUT3xjbyoCoaKKXHANjBNvOF4TyNDbvmJ8gp0NVDmC9AMaCHp fB1S+nHJ/7cM1lw5nTbqUgM68sWXEN36C+gl3p+hOj/yRf0oEkbLs6GgTrPWliGWxJ4P eSXzm/F4B6Z5P8laP9BNEdi8x2o5DoH6zj6aaqIgVdEUu5/XyfMxFvkSjdyKVrBQIC2b ORyd+KSRSguwD4T/HDchmdgEnPL+7sAnCqEK/L42+gLkL1h/pUhKkBw6uxJ9335lGrKA wrBjDBjcM68eQOTxgxdlDO/4v5JDAt26KA0BhEtBFTbmzirJJt94dSUa5yqUIv07DZNq Bbbw== X-Gm-Message-State: AOAM531MTp3sfcOHILAxo0eamdJiqVKjDbPYJKK7SfPcsLd+L23mfpxd EkBRWZbGOHPoo461cQid5z8= X-Google-Smtp-Source: ABdhPJwUHfulHl4CVzwuW48JZr7yc4B+TDj4yp3uEqLNhqwdi5LQG75OesrunlT96l85jZk7PELY/A== X-Received: by 2002:a17:90b:815:: with SMTP id bk21mr8954482pjb.21.1610022737613; Thu, 07 Jan 2021 04:32:17 -0800 (PST) Received: from localhost.localdomain ([49.207.216.201]) by smtp.gmail.com with ESMTPSA id h12sm6356014pgk.70.2021.01.07.04.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 04:32:16 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v2 19/19] crypto: octeontx: convert tasklets to use new tasklet_setup() API Date: Thu, 7 Jan 2021 17:59:44 +0530 Message-Id: <20210107122944.16363-16-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210107122944.16363-1-allen.lkml@gmail.com> References: <20210107122944.16363-1-allen.lkml@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_073219_832867_CA723558 X-CRM114-Status: GOOD ( 13.25 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: giovanni.cabiddu@intel.com, alexandre.belloni@bootlin.com, aymen.sghaier@nxp.com, heiko@sntech.de, qat-linux@intel.com, jamie@jamieiles.com, jesper.nilsson@axis.com, linux-samsung-soc@vger.kernel.org, horia.geanta@nxp.com, k.konieczny@samsung.com, schalla@marvell.com, krzk@kernel.org, linux-rockchip@lists.infradead.org, ludovic.desroches@microchip.com, thomas.lendacky@amd.com, arno@natisbad.org, vz@mleia.com, gilad@benyossef.com, gcherian@marvell.com, linux-mediatek@lists.infradead.org, lars.persson@axis.com, matthias.bgg@gmail.com, Allen Pais , john.allen@amd.com, bbrezillon@kernel.org, nicolas.ferre@microchip.com, linux-crypto@vger.kernel.org, davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Allen Pais --- drivers/crypto/marvell/octeontx/otx_cptvf_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c index c076d0b3ad5f..831550123719 100644 --- a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c +++ b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c @@ -17,11 +17,12 @@ #define DRV_NAME "octeontx-cptvf" #define DRV_VERSION "1.0" -static void vq_work_handler(unsigned long data) +static void vq_work_handler(struct tasklet_struct *t) { - struct otx_cptvf_wqe_info *cwqe_info = - (struct otx_cptvf_wqe_info *) data; - + struct otx_cptvf_wqe *cwqe = from_tasklet(cwqe, t, twork); + struct otx_cptvf_wqe_info *cwqe_info = container_of(cwqe, + typeof(*cwqe_info), + vq_wqe[0]); otx_cpt_post_process(&cwqe_info->vq_wqe[0]); } @@ -41,8 +42,7 @@ static int init_worker_threads(struct otx_cptvf *cptvf) } for (i = 0; i < cptvf->num_queues; i++) { - tasklet_init(&cwqe_info->vq_wqe[i].twork, vq_work_handler, - (u64)cwqe_info); + tasklet_setup(&cwqe_info->vq_wqe[i].twork, vq_work_handler); cwqe_info->vq_wqe[i].cptvf = cptvf; } cptvf->wqe_info = cwqe_info;