From patchwork Tue Jan 12 01:46:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012039 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37A44C433E0 for ; Tue, 12 Jan 2021 01:47: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 E9E1C22E01 for ; Tue, 12 Jan 2021 01:47:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9E1C22E01 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-rockchip-bounces+linux-rockchip=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=vLqNjLmhbao33ZQ4shriXubKlJVnQ16rm2nnw+EyeCU=; b=h+l+qcdJy5KMLbPoBNQorLM2V h2uDATGDzteh3/TKIB+SHgc7tdVdlLxWkIl1zljPCRgWCbi5QTGDkacI/8hDtD0NuIwpfuHJOgAjm kPbXdV3Bm6zEhPTLgPwtAl8cXftW2LTFok986LbgXyuk1fxy/YleFqfANHNGmbgMd0ZA4CHH+FdcK xKFI6+1/LtpVqy5tZ2nJZZojuK/VzCzEMCIUedGG5oMWp2p/POCpPowOi3AKJc441FJUbp8bwwD5n /lQc67PDXeUpgFUY8Bo8DYg5U63ACkou6abMKZ5PMUbf64skUJZkewJpME9nMKDHquPEtdiQtGHRq SJVTmhRXQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8mH-0002w4-Dl; Tue, 12 Jan 2021 01:47:21 +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 1kz8mE-0002uA-GF; Tue, 12 Jan 2021 01:47:19 +0000 Received: by mail-pl1-x62d.google.com with SMTP id j1so529390pld.3; Mon, 11 Jan 2021 17:47: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=H63y7TytVzVANKOVA7sdCA6vVgUHNtSjJ0nN8hlQEHDbjOF4g5m8MJRGfQkutbNkX0 QqecOfP6JEf05JZm1qT88AeNGR2IleB6D0vIhRITllMtZ44HM5F3SbrJlWL0phqLac3J 3q6Wz5eIKCj5xza64orBo519XLAkn0icn82vDvA/tKr9AfQYigPbbNNTMgDF2Wk38Bjl ZYKEGf+1pjClpaJTY3CbQAb3YW2Lzvc1IXAThCVLdrJ07knO+CP5u9k2ssAFWC95H36o sKJZj3sKgDIvwYyrq9NQR0yx/wUmlS7zN9d0wcjrKifHQDvv+nOMQ2sEJUV+IEIsJQFR Ct4A== 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=QX7Qv6TT0Tv4UzHBfbNziZk+HPWTSMSn9K4MHzqd5pJ9vAaufd2rmpt7RkTakmMjN6 M7Y++r1SEAKlqUVzAYRqIsxTk01OBwFFh2H9nN8SMFRoZhcu1ZxgCX/a6DLPbUEJSVaO IxTMqq7FCj118JbK/iO1ACs/+6oEQitLmQRxQxtkoQVjOxWzE/Ys/lQXf0Cr1eX+26Du koUgJNf7euSULCUPQWb10TkDAEh/gFEG2+gNtmYLXrPa3kKQ8vLAoBspMUyKAND6HyYT jDvkqhWmk+TjERym7V8XnSOluNPeFIpyL4s0y2YVAcDadQBaUJ0YmA/ImL5QF4kWYFPN ANBw== X-Gm-Message-State: AOAM532Zi0IFdgxESuS7NGDXklJ6v7TVXw3o4qRUE2/XSWfKllqMhL+c sXROT1ilU1V5bs0maBCRLOu/gVtEix8= X-Google-Smtp-Source: ABdhPJwwk0s1+U0eEIms8qHWr9weNGl7FRq+v0mFtEWayniloff6bmrtW7bVMClYALWDK/at4Reeqw== X-Received: by 2002:a17:90b:3907:: with SMTP id ob7mr218173pjb.18.1610416036496; Mon, 11 Jan 2021 17:47:16 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:47:15 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 01/19] crypto: amcc: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:32 +0530 Message-Id: <20210112014650.10887-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204718_607608_81C10243 X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012045 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3608AC433E0 for ; Tue, 12 Jan 2021 01:47: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 E543422D6D for ; Tue, 12 Jan 2021 01:47:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E543422D6D 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-rockchip-bounces+linux-rockchip=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=IP5CUfujy4IRE+OPNX1gArMdvHoeoaPFwDntgFhiGm0=; b=L5cE9ILUrm+hp1niDeXu2WHL4 q7nzusLwqgLxFFWMdT+XsoL96H6VOPd4+2rwH2uogAC7b/TfjyoRP997Xl8yK+vwNy4Q3hr216TK1 D+f/IzZ2/Yia6QVuGu5r5pIW4vPpgGeBK1PVs1t3tGaFoRhXpp+bGHn3S5/DVbfEqH92gKGvpBm+W 8Qt6uIqvCo5UMnCHK65wDptZuPeGfRdkznWVF4Qae9Kj1KMAJI4zHWFaOiOHXQZj/LlNKTfA0sUGt JJbj8gzhSXecoA/lqmOJtEWs4KpWt8FG18Q7Gcb21dQUsGwdTkqDZ9Folhl2VQcNlmgZFSmVSvLRU b4UqL2RSA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8mT-00032M-A5; Tue, 12 Jan 2021 01:47:33 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8mO-0002zJ-SK; Tue, 12 Jan 2021 01:47:29 +0000 Received: by mail-pl1-x632.google.com with SMTP id j1so529565pld.3; Mon, 11 Jan 2021 17:47: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=RYSaLX3smbgMQ2kmuvHaJq7ENFLks+en0J0GnwJ8FTSDFjQ+/0Gb32NQdJUZMLlJ3w WFZEC4v2ZXKkBrZ0yfhiqDX/NDD3hHq2l4oaPmJQvOp56/d+1fHdcpNLI1O/hl0T1EGl QRCzc2wkcRsQzq92HgSwsHBRxZefhVrP67mpkY/lffkM6opoUCt5QnjeS741b2+UmiMm qRQFlxcXl09SnqT3r62mnSZYM4wbYhn+DGn/cC3ce0WuY/pUp2B3chQF3cyoQcVu/R+C e5eMG8v5vjwaUPBijRx1ZsFVnk0JRdFSV5RXAoQNVoEa33O/Qm+rPT3JaFYh0/iQi9gl cgXA== 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=RRu/vScovUqx65n/r+fXjxRXb2tuOoPjQY7n1i6Z75h4LQyTQC4/4CGDbBD0tAuttv 22EAlO22rTBCZaAXJsKjl0lYJ0aQdaAoAkl09pdmUOREWwshb6cmJZQjI7KSH/daFKdt GuftyZiLhZXFKopskHgbuGWMwyKbMTDnqTl+FR+Ff/9aHoINIu01/ni48daFuIc+uDxG NQy8VPnmsn45ewbeAbbo4ZfFj87Sm3zel6ASnmGtuXDu9dqx4h1hRaCCYIlGImN3agOZ 7XtB+HtE81cfPrl0b18BoG175zKKPQ+Zd2S0ZaM7BcpZCopMHMK0J1t77SQXmvbQH6xD FOvw== X-Gm-Message-State: AOAM532DQptHi+v+ISb9MIjqsPJn6tmj66XlGLOS/9iL3k+38wfWl4Zd fn1D+fUQFRaPsmvv0SCb+HU= X-Google-Smtp-Source: ABdhPJzqOxZ6B37o373whWA3MSGWCb5q/RbLoGCJckn9Iusqnes9v8N227oqvX2+UH18HMFwlO+syQ== X-Received: by 2002:a17:902:9682:b029:db:f9ef:40f5 with SMTP id n2-20020a1709029682b02900dbf9ef40f5mr2187619plp.23.1610416046602; Mon, 11 Jan 2021 17:47:26 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:47:26 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 02/19] crypto: atmel: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:33 +0530 Message-Id: <20210112014650.10887-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204728_973795_E310376B X-CRM114-Status: GOOD ( 13.10 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012047 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88C2FC433DB for ; Tue, 12 Jan 2021 01:47:47 +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 4C13B22D6D for ; Tue, 12 Jan 2021 01:47:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C13B22D6D 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-rockchip-bounces+linux-rockchip=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=JWalHDVxpsKrX8T1ZAzgyAuxf1xc61tTvVQZxqOmFHc=; b=2gbt+2x8kwA8FzV+ziC8wKYS0 Wpsqmxfp3K/SCFYG9qoUM2toNfoZxAKZr9W0g8ahzOZk8yLDj46FZc+j4mH1MYmSJnfKRcMB0HWLs ihyPwOoGhN5Cyf5ADuwDDj82WeslZT2hcpnz26fmLkHAuBffVKqtNlB2e/49UG/zQrxGFUlBZ1BHz OxJRMq57LG7q7fogIi1k+nAsam8aExECGhvd5v4c3TnMLEwWlHm7PowCNg51Cn4/LwzVSMhdWXu81 RxUd36ZwxCCWcplszG+Jkx4C4KHfMnZhRCWRtpc49/imOvs7Rr1O3VOciiXz0vievK2w6athmBsum +p5AyHzmQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8me-00037w-5G; Tue, 12 Jan 2021 01:47:44 +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 1kz8mY-00034Y-BM; Tue, 12 Jan 2021 01:47:39 +0000 Received: by mail-pg1-x529.google.com with SMTP id n7so383512pgg.2; Mon, 11 Jan 2021 17:47: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=dyLRtXDjB67vS15RLsmqGSUOvPPoOTHemszDDXF+TlQiAEsteD0YrxcYZwJDoUvbct uVNXnzERBcj0usi04XikK3DYBQ2KUn0Hm1BE9dC2/+cLnoSaPcw0nVTsEHjr0x0JNdW/ zIEds6h0gVNU+76UE6+PGWSQXvNol7Gpue6C4enyaob+C3OhekAd3dIHXw0vGzclsXOi hUsxcAGxXZRjr/SKWpj6+GreRS3oI+OVtMpQF6aTu5ZFDHfjE5rG8//Rd+ejNrUN2FDB TpZG/to2TcodizTeA+CJTupytQCv1XwZIQuSjSUpkQZaZ++4KZgLAypg9ns8fciwU7CR H4lw== 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=eVjqFS9o2JCvmIPpLZyuDNrtDrxGGYIZmc8nufe14876BIdttxzkqDDWovmXk3yHZb /QmfPkKAazHhAsyeZz/+OzllQ4jgib92XZQu9OKC0be308xQI9rg7YXIIgyNx8VnkG6X cZ9ERaNBe1N8SjnMPQ2PoFekZga252HGg8DRmhWkBSYhw+3Zu0sfA5q0qHaocJIzqOwZ HwNnQ/kgMWnBP+HsA+Bmf6PU2kSdQqUoDh3fyYaNtOpFxrNsmjOxD0IBih5be3WTHPei SJf6ndfOnrIoLlV7rt0fJ1zo8KN0qIBJMGAaEiTjOy4gCR2xQE6D/hBy+OjVWC5NbYSk APcQ== X-Gm-Message-State: AOAM531758hrtT32weOZXEgpSsAm3LX8JSsldbNU6WgonGvgdCiSHXE/ yoZ/RT6aO4k5DR8w1QjOFyo= X-Google-Smtp-Source: ABdhPJwnfmBvyejGqi0Tb2J3Dw3X+mlfmegsFTEcZ+clarKrFxuo2IsTMEoXTWC+GHMQHQp1daHk1Q== X-Received: by 2002:aa7:8506:0:b029:19e:95:f75f with SMTP id v6-20020aa785060000b029019e0095f75fmr2142115pfn.7.1610416056325; Mon, 11 Jan 2021 17:47:36 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.47.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:47:35 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 03/19] crypto: axis: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:34 +0530 Message-Id: <20210112014650.10887-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204738_419595_5B75FB48 X-CRM114-Status: GOOD ( 11.91 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012049 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E94A8C433E0 for ; Tue, 12 Jan 2021 01:47: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 A45E122D6D for ; Tue, 12 Jan 2021 01:47:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A45E122D6D 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-rockchip-bounces+linux-rockchip=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=PxW8f37orsk++3uoGYhypovZFAJ7NBuueOOQbiHCHIg=; b=MUM7sdaZMinGur/YFL8S/+Sq9 xWXYdlKWZzX47KgeXZafOxtN6CkmviV8td7vvHKeuhn4x7JjqxpcuPwFNlwQOU67P+LE7H7pUjvnm gbsDgKxfFiZkXyyOrO0YpdcXgVbj2WI+h6rvWxsfcAwSH1Np3YMAj2oed8qWijlbhCnx1Eigry2GW bMmz4dehpjwr8v96zGs5iz+uU6O5CeRlyThRX4jvZNwu5m2O29I6aaoZDq1Q5sDaRttMoqMlOkHI1 EhiSwiAa/c6Ad5SS+NzK099GcKIA9wObvNoYV2rlOO5gidqpmCdpDj9X1DpEJyX7he2DTd+znhoUn 1pzIchswg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8mm-0003CR-3n; Tue, 12 Jan 2021 01:47:52 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8mi-000393-Am; Tue, 12 Jan 2021 01:47:49 +0000 Received: by mail-pl1-x630.google.com with SMTP id y8so514797plp.8; Mon, 11 Jan 2021 17:47:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=RJUuJ34gzSSXgEmLEMH6F9Sgq+AjXpRBfq9uOyNbGeEVo9Zni8GVwIioC+KBKuBUwb 3Hz2ntdsMokLeu0TtA4u6cWnxJVq1h7CHSCNXhh7wxMdZKrASnNYYuAQ68EvklLWwsRK Zl+cGIFjCy1cN9ZKNf9Ejtz5nWCTPakILZUVFEh4+j0jeTMCMe/0jSJHwiWtZDwB3Z98 ITpyOO2Xzhx0Fv9X9F+ZlzFPoeMTosFBNzkNH8p/Hyba4vxN1fuiHVkTt7i4BaOtOSoB ivGOKO+FZtDra7bSh1vZH6CArjuKeKOfVdsThHZoD0dqACAhgIhIHq0E35mjkk75NJkQ 3fDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JIfhZma4t7M0QhjqQIwVj37Q6U0ytCyWa6sVJ86x3+E=; b=ks7Js1jgY2/Ug4nqbrFh49EuEhAamk46pfN2EmVYd4W9KpqHsfRFoIA89qSGdCgrz2 oZTecko/ujx4hor3EJHfK0cpGEUiWNyrNDhw7FH3HOMh06SsSx1sOQS+ai/hSoxdIO0s f8DEtCPTqle11h4/aRQ5/T8K0ihzaLGgmzMJ4imBMXmRdDhykJkwh/9XlA9fOHf8RQk9 O2lhWquIWI6opTRTv/PBNUmtkIF8C2XmEu6u4MbvX1c27LqFPg2FlMPxfCv/6ycTbeGF KuBJp32Sc+hAweSARTXr3VaryLRvO2GMhO8KqGxIynkpCPgQ4kN7INORytisZgTqofTK W8lg== X-Gm-Message-State: AOAM530soSUXGSlu9H7KyMdtgF+2lV4Wj5TbkdxuowklbIJhDG73MrxP af9lB3qERYaQqrQjMfMphZc= X-Google-Smtp-Source: ABdhPJyTDsH0JvPVWAJSKCCZ0fNwYXHtd/8sbx45wvu+0Xfc9BHtL6tbRakBFNIyS/n2zR6vRE67nQ== X-Received: by 2002:a17:902:ed11:b029:da:3137:2695 with SMTP id b17-20020a170902ed11b02900da31372695mr2689863pld.1.1610416066062; Mon, 11 Jan 2021 17:47:46 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.47.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:47:45 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:35 +0530 Message-Id: <20210112014650.10887-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204748_387574_BB14B389 X-CRM114-Status: GOOD ( 14.18 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012051 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7B2BC43381 for ; Tue, 12 Jan 2021 01:48: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 9DB6622E01 for ; Tue, 12 Jan 2021 01:48:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DB6622E01 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-rockchip-bounces+linux-rockchip=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=ZBKZs0sQhexUn7GM9tLfpcFBEAfMAEwUgjBCMpj76bI=; b=JasXtyrfU9A0v3tmXe3JdjdBT K2gYXeEPrvWkMqbxrlwgkiEd2+z1fCBMulWIOxxJclTtloXNRG+dAyeWLbFRFyWbZyhNE5co8iMAC 1hdguv7sOPubsFIXAjzP01GGducqWjy35vvmhNC5BL1ay5Pslmm3qKy+oxI52U67NoUDrhl4YiN5U QgPkYFK6YfenrygwSlzLwFNr1RJ9fF8EPB0RcdZNIIg/myTiPNYqVERL3CyZXZdHm10a2GpdTt38d 68hQ0GmN08dtET0qeqiydHPAcuBE0WR6AkRPWVk41OQu1jfuZsC+pv7v92dVMkOWJCn+VM4JgS7J1 9wsrkso+Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8mw-0003Hi-KZ; Tue, 12 Jan 2021 01:48:02 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8ms-0003FA-H4; Tue, 12 Jan 2021 01:47:59 +0000 Received: by mail-pj1-x102a.google.com with SMTP id cq1so444457pjb.4; Mon, 11 Jan 2021 17:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qp9LBDTmnPZcn3zbp0ts8Zh1JyTpVMJr9nqNyHr6PFs=; b=RSu8kgmud6C/CFnjaf+JN3itxTEQmYvZ33pymbzdN6j1JYCsd94paPaqMJZPl4yKMX s6oOGxaPwpxA1kuBfyV3s6LgyypIFMO0Ku2pFgDkoO84VOMKp3KVkSUcK0Wuo91dYI3E Fla8Dc4St8NFlhx8unKmNsJJzERwQmzxMQdJP6LbKRiwu8LFAGGvoplzmhu2RmXS+20w q6NmQgGeybduoBzx+A+FNvKi+Z/HLN/1mej6KPrvfNeQyFSoa5oVZuhTG6DjUcoJcanq KYiEnVCT21negngCXTUR52EljQ91rVTDr4MaxNwaqo7z3Vzh2GCYhsMUS2PZ9xWL+JgF dN0w== 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=MR+sS8XaNCTYxYdUxiLBmj4K1GqVrSBnj247nCuHgDxgh8iCpWwRPIbM0l+pkwynA0 xuVK1TDpFsVOMieZZ6tvcF5Yw7kLXW10hX5iRpsd1uzc5kux7wURc4LPgbIrHa4gEH4e CZKbONsOtPS99vUAzbUTxn+Oqg69cX/5D6RNiA1i+NYKJqJPDcyoh2+q1+7mAaVt7c+X fat5Y2I1dQL8jB/v+eHEA3qw30YF5Mx1tmUj2n5hyOKjopfOgWRUUfeNC4srzUFHkFpV ZEqjsflWNh0+GVZYyBMMqCRS8Wx/RoG8UqW2A1+Lp+h7IkkE4PxMm5aDXhn1n5xJqiaO kyDw== X-Gm-Message-State: AOAM5323Yxrh5fvqgEhMkf3vq/qsK5PgnBcQpZ7jvDzU61XcK5jGsZxI YL9TPqbmM8jg2wlAtfkUC4s= X-Google-Smtp-Source: ABdhPJziTAtWqbi8fSkflnsG4p1kzAZdCqxrYnIkoerOvehnkgI2k1oWA/UzJaXm7HS7B/v0CUjW7g== X-Received: by 2002:a17:902:8c89:b029:dc:1e79:e74b with SMTP id t9-20020a1709028c89b02900dc1e79e74bmr2662422plo.58.1610416076491; Mon, 11 Jan 2021 17:47:56 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.47.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:47:55 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 05/19] crypto: cavium: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:36 +0530 Message-Id: <20210112014650.10887-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204758_592080_82DC35DD X-CRM114-Status: GOOD ( 15.40 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012053 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 610DBC433E0 for ; Tue, 12 Jan 2021 01:48:16 +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 282AD22D6D for ; Tue, 12 Jan 2021 01:48:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 282AD22D6D 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-rockchip-bounces+linux-rockchip=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=HtRu1Hyqnc9L8uO5oarvhfzJiRChBuiV5+10DFfQB+Y=; b=cvy3XMcCFqwUUV60w1Hm6WBiE MH0W5UEKbFKIeqAA73LgY585w8BkhC9UDDWmNX12Bp+KH2iLv8H7hGHK7EfXmg49RNGbQb7UdddsQ MZcKDiYfPT3/f2Z7K8gDwCSjrRx8Py4gsCt6qpgCmoaJ6j9qJDyp0CgZn0X9b7qLnbyvzDowAl9st GNFpKzYKxWxFNWg8EUj3SDM5SD3oV6GMwC77REz7AbUMuQplkz8fAJ3JaLpGl0jCuRmFlzsNXLC6N zkM6WdlaWigbk0EW9TaxP/YdC6qJXD1qyUVKEI3nYx9uQTdRKg6p1u66q+XiETH/cCKd2WF3DDu1U YYJW8hULA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8n5-0003MK-VH; Tue, 12 Jan 2021 01:48:12 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8n2-0003K7-LG; Tue, 12 Jan 2021 01:48:09 +0000 Received: by mail-pj1-x1032.google.com with SMTP id cq1so444667pjb.4; Mon, 11 Jan 2021 17:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X8fsop2xmYxltHA5D/rZSLD1hZ0w/2RK5zEw7HljbjI=; b=FJsJoSoto67Bz6URfcf3VxYXvuNUukF1ubVd0kNrx4uGAdzDI9ObCG0R1GZYD0jacn JZWM82zQ5evijkw1empC/X3ajLIRipd+KxjJjb9/i858M28t6qu8a7Hf35pKntTBIgpJ 9soI3eLZnM3G44pzWDqc5SJjsgI27WWYX1Z6pa2hUZaXcesIjlqlRoqD6nBSqPkkaNN1 +qBXrHRNgmCCT7tzcpExxTzckGa8S4hvh1ol+6jLc9P/TJlIGRcsrh8Ug6zD4Xq961Xa ew7PeqpzYrTCkn6etVm+PLLyzAheFDbmWZkKh8dwrtP9uZNe2+1DjRANUK73yp9oaJyD eSKg== 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=SXn31zthOWnaW9TNH3HUeOnk4h0ZIok2gE+gJkKD3Abc/62lTorMLErytb4PEoWw6e z59N0e0IFdDMlffwnPiG/Ruw952vP1RTdBKvEL9gYgZt08rYe8k75YSbfO7xk2iuyJzL N9FvhX23NN5fwNeHQWdjJ+BwFYXWPCvFSdBrXAY4yxWXYxyt4nF7xIpNULrkx1LTMWrK jUcMmeb7536tG9T+FGJeiNzzl4fdwb/W8Dxf8zLyZ628EEDdwA3G3mxzng1AmoFEy42e TYExKQ0VmKdvG/6CePG+xHQzzAWpkgjkJK8XocMFUwuBmoqzloysAv6KC38h55g54Tnk aLiw== X-Gm-Message-State: AOAM5306ycpihxF4+yx4hOziyhtDuxSQ6TS4hCoxB6jKbLphrtjPnHwf NLkOKN0s4rN7FRz0m+0IJh0= X-Google-Smtp-Source: ABdhPJxDHvtku7C1620pHFI9Yu42D/T+dfJYQvqLj3P5yFNOFqOPXqm3gj0v5Fn382ReKSGCh1hhDA== X-Received: by 2002:a17:90a:4208:: with SMTP id o8mr1812924pjg.224.1610416086514; Mon, 11 Jan 2021 17:48:06 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:48:05 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 06/19] crypto: ccp: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:37 +0530 Message-Id: <20210112014650.10887-7-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204808_720043_11180C32 X-CRM114-Status: GOOD ( 13.51 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Acked-by: John Allen --- 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 Tue Jan 12 01:46:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012055 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4303BC433E6 for ; Tue, 12 Jan 2021 01:48:25 +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 D6F9B22E02 for ; Tue, 12 Jan 2021 01:48:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D6F9B22E02 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-rockchip-bounces+linux-rockchip=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=FLSeCl7SR5d3ClcpiCi9Fome2yfZ5gM3di2d8kgvESk=; b=boK9m1WLkIdw8ZOLgQKs0JiNm C/BEhGZmQVxG/2VuxsYBrjq9UhZdoRlViJrhyLBE894E7f+ANYJXUgkrDe39EfoAMdKr+VxTqglMS JQH5EUT1ucHPbZxDc+hF9foZgLDZ4vhe53K7Zubfzf6IQ5WmLZy6GIKFr6rYkOC6V8jiGyNUUG1II z8XEEGv/KGNEJDcAnQgUxixOhNVZHI25OlCdJxwxb5ILObdI0h6vcrQ9H2O6gAv9I+KZTeTkgfkhC qnsrBNaT4oT6Ud5jtgevv6pSQTOslZAZyQKVRt2aKRwIvVvq6+VTaRFMKqBuhYll92KzOS2MoEOcQ kHVFlx7oQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nG-0003Rp-23; Tue, 12 Jan 2021 01:48:22 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nB-0003Om-TG; Tue, 12 Jan 2021 01:48:18 +0000 Received: by mail-pl1-x629.google.com with SMTP id b8so540929plx.0; Mon, 11 Jan 2021 17:48:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uwo40ct7uzVjK8NcMtTbNQmNhWXoxMbACC3WJlaa3jg=; b=pKexNpX1bBzbRnZUGxg408Gqkw5tg4eAJ6pRY8Pabc6ipJjVHyfjlTNKb/PFYtvw7e KRAbJ+M22xVYjik/G4uKnhk921h3vdP1KpTQkQ16K8UrxK/RoeBEUjGsxH9zoc2EGZxh GOUVDY3u1qDb8/vl/qeqGbvu9lTcjefWMXTm/jShvU+blvpgyIr8O+vD95gvnM9sqy7s pYBY069V/GAGN2LRTy7SAqZ40cQvDH7UJp9y5eR+k+yE72zwmBoBcv947UyR5ulCZ8gE Ta4qOqvQ4hi2CiSyq3939hUCVPwf2KRLcWHNExJmU/K8oEVldlJpg5ql8ec7W44notBz vBmw== 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=lZM2F8KDWxH3ihV9VD9y7QAc/yoGGt236MSB699Bgn7H7xL2bzKWYjcJe2vuRHYPbI o2hAKz3KkVpFsHMpwtNgyET/mVlE4Z/65W6yVsBnF8XxCgfFmY3Yj3F03nuBURrj207D rITT0tU6EUBn7/nlPNbtMQDpOLNJJrWT9xdRAYJR/AzMHlh46+/M32f3DmQpUsjSOEJ0 nFv3fLDXvsY8Pz4mloMBo4gBRXATu2N7ThjiHPCiAXoswJUhVVsTaBNWqEBlkKwors6M tsvXnKL5Wyng+I2KQybMm/nIsJ/VVDmhBNGQ0HFqmiw4FR9yZV1pw6rYr9nZYwvrrkyx wYbg== X-Gm-Message-State: AOAM531kfyT/aASuX4RCIescEY9cO0EoSZ2Q21l2xlAQJytiag4QOOe/ 68Yz7U5KY1cLzOzo3Ft6RHY= X-Google-Smtp-Source: ABdhPJxKfxYyRZKvkJqJWDpgtc33GAQmRzy1RvpnCgq6tSzlT4Mm+eaUDy8nXfA2sYDWvxbRP0VrUg== X-Received: by 2002:a17:90b:3907:: with SMTP id ob7mr222008pjb.18.1610416095924; Mon, 11 Jan 2021 17:48:15 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:48:15 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 07/19] crypto: ccree: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:38 +0530 Message-Id: <20210112014650.10887-8-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204817_991354_68AFFFF4 X-CRM114-Status: GOOD ( 14.21 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012057 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A37CDC433DB for ; Tue, 12 Jan 2021 01:48:35 +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 5EA8222D6D for ; Tue, 12 Jan 2021 01:48:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EA8222D6D 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-rockchip-bounces+linux-rockchip=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=ctm875QuCCaVzNaZOl42wyPqyPLjydddaPuoySGTxRo=; b=IBBMFjhCn/C5AABSJnSPO8uXU vB2+ky0RSu/edBhcfDqo8rXU6p21NWQ4pd/9HWUpQ3ZS72hAFY9yxkeI3d7OXgM2oPZ2TQkxIxnHn dSUzU2GLlTPbxVL/fjeYTtXtezhX43pdoedHrxtwSpV+Gs8eYwlyVzWe0rUpxznRVHYYaMVtCgTzX BciHlF8jfSYxZ36CWAyyEUpjCpBcAyP4xhBpEmeHF6uIXMo1kQ4ZD6P/R6jgEZx1tXHfpDqg9R+nj abQBz3tFqCwTKFkv8tEeC4jG+hCrOtiIE9dqT+AgdKRLL3OqAtU/QZ03iyjtHfqtVZ+CEyzlg8oUf PtrNxfdag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nP-0003XU-Of; Tue, 12 Jan 2021 01:48:31 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nL-0003UK-Ac; Tue, 12 Jan 2021 01:48:28 +0000 Received: by mail-pf1-x432.google.com with SMTP id b3so81198pft.3; Mon, 11 Jan 2021 17:48:26 -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=LEsRPUl3W7RrtlJCn/EYjcnFyXEEW56pYJRXcpibCLSs/FaVvKj+8jPsRbc8tCIufo u8JA5ti3/Ux5BF/nk87cbT3BFHaecGq9B5NV4obXhLeJihkhLhUqkXt+IFUo7Qu7O9CW BESrWTa2CrZgjderdqKn/y8VvF6He0j5l3t18fI3UPu6UBXKvDF1QCeSaw/3KrnpE8lV ELcX9dWNWAFhDewSF2lcwqTpB3daA4riRJjo8Kv73E1fYjTlSEDT32L8J44wYFM7wHxD gh4UICQ1hMRxgsiQtWev7pUTbRTnmj6Mq4wyAMw9VnnlU9ddDajMPiX6HPpdqygRC7sq AEzg== 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=aB3itEp4VEX1d0JUONRtcoMmXiU04hj6+cyyffpTkKGr/OTKPl/SSRuE0+YQ/a0HHm rK2eqO+yVOOidXujbylL0M5qOwwkVZ36vqh2pde1SHCxWFz6/R8mbLhp5FjYhSWoo7my rTWfeieVVF7rupr3YKi5ZCWKCM5rfzbnPn7jY4Bjf4yV52eIrpmhVYT51GtNET/UJM6t pw3ajPBBxiWIz9pNgCpiAZ5BpdPtfF0wxPo+zoTJ+zCidmzsU/36FDDrDMJFDyA2U/Xx A5kfqwFhKojel3UI/lytWKWesr/ed1k0ecrfQwLJxJptAOn+Ab6kr+KMQZf0H0CmvtYV 9o8w== X-Gm-Message-State: AOAM530e4B0863pKzN6D4QogCCZWBe0g9f9PO+96EhvKPpZ4SLs36TOM lDVaJN5I3i/mrqYSpF/CSGs= X-Google-Smtp-Source: ABdhPJzPX2YB9rom/mxYQLm3CNTkXAMDDEj/gkt391FUgLSnHxbf0yLblaNKx6qTICB2kx04ErzFMg== X-Received: by 2002:a62:17c3:0:b029:19d:ce3b:d582 with SMTP id 186-20020a6217c30000b029019dce3bd582mr2207512pfx.18.1610416105136; Mon, 11 Jan 2021 17:48:25 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:48:24 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 08/19] crypto: hifn_795x: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:39 +0530 Message-Id: <20210112014650.10887-9-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204827_418000_75E38CB9 X-CRM114-Status: GOOD ( 12.89 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012059 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3651DC433DB for ; Tue, 12 Jan 2021 01:48:46 +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 D559822D6D for ; Tue, 12 Jan 2021 01:48:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D559822D6D 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-rockchip-bounces+linux-rockchip=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=HVqiw+W3GLMaLRLoGbf08WbGWYwM0wF2RDwflbxr1PI=; b=ksz2qqKy3pRd7R7TlhnkVlsNm rUkMenx8g3corXUe1m+YtDJwZrxQWVhV+zS0W4Zfr2XjCDPB6uoP/qybA/5gwDuSRY7VSIAK6kQN3 kTpuYSoeDF88sqXJve5A5Qkp23gFslCvq7xjRMZBGb0Z9zg12/gd8/Ujz1iCU84EnTt49ryTz4wp4 B31adfPmAM8szJDkYM++9iL9ZjfjFIYPFIfGzwiqjYH14EFoD6Sh0P2fiazEgOZ0OMP6CP2RcBmKk pUpL+Dl3atho/iQuTDTQgh7JcTgMnt/TJ1FlbnoNLJ5Eyfs8Wgxr/ocBW2Ed7RNY762ZxuaUIWal+ XFUTrpaQA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8na-0003dV-GK; Tue, 12 Jan 2021 01:48:42 +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 1kz8nU-0003Zz-U3; Tue, 12 Jan 2021 01:48:37 +0000 Received: by mail-pj1-x1029.google.com with SMTP id y12so636832pji.1; Mon, 11 Jan 2021 17:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HNZLvmQAqbtAqMEvJP1wVGbLyEu2FmrY5NiRBOEZCk0=; b=M09HSCfSir62u5HnSP1MK9qS9FctY1quDgEXeJ1A71Ze53Dg116DP6MdpR1zxD11jl +Bw5eJOL62Jjuirn2yWCya47Zb6KUjtJk5GxF83xiDb3CC5sfgkg7oK1PlAV1SZRs7Bz P8FZO1zLaduEVlUgMcmJsW2UDQROJwWx/mCudXiCUdlQr0pQ4AVsKK/a8O7zRpODR8aS CoGH4WXD/V4ODiXwsnWpLtlgUJOfgKG83EvQXAxdPoPDDhXIgvbxNCXMfx4bZBMKvOnj SDJ7OSR69edLIZs1x7Bkbu+WcgLkiP6VFtrMRU3E2YIpQ1VHSjTqZ8aEMy76qzG2SwB3 VdVA== 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=W5GW5oDTXfbl/UV4e6X67uRvJ5z88HYisHO/OLTwq9tY7lXN5kANi6zllY/1GClsbA GgiWV2sU7Uom0ZxyZUymDihwElP22yIWI2ild2sQ8nMsYO8qrKX2ZXqQvcyPCtJzxn78 4CdsQWGrMU1Dtq9RahYaMWabiT/WRVaX28iUxx9D46YIdFNaInqy+ftcP2nZ1rOesJ0l Q3yRJYdhnURrxHek/msedSbshdnrmBFasw9gYj3y/q+vJsgGrp72uPYy+runEINflDgq 3wHg9Nll2Mc9j3kUc/qzAtojIDOLyPI6u9gYiTwr1a/l0ojLrqhV+OIgyKW0QRXVpPSg WBTw== X-Gm-Message-State: AOAM531sLL4biohYeeMhwVI9ltPyWxkQCh+wbPMHzYfj492N69l6PGZu 7LShcIue6qGJHtF8qFuXGjdXY1Dm6JI= X-Google-Smtp-Source: ABdhPJzQu/E/mY43VnJ/eXIQn39xOyztWpVic9U9RwF0peXg7JfTQosDtN7/RR1ZlInQT+sjJ1cYDg== X-Received: by 2002:a17:902:8ec1:b029:dc:8ae1:7a22 with SMTP id x1-20020a1709028ec1b02900dc8ae17a22mr2678535plo.6.1610416114971; Mon, 11 Jan 2021 17:48:34 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:48:34 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 09/19] crypto: img-hash: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:40 +0530 Message-Id: <20210112014650.10887-10-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204837_011807_4AE4C898 X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012061 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD9B6C43381 for ; Tue, 12 Jan 2021 01:49:03 +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 7DEF522D6D for ; Tue, 12 Jan 2021 01:49:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DEF522D6D 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-rockchip-bounces+linux-rockchip=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=26AGzmC4jO4BtZz+/jX5kM4urcUvtJ9k0wgR9Rzz9zE=; b=zz2NyK2rArNvDj7MAhu+YIXe0 lB94ehAofsWBeZ8VYA6AmPYBazq+IMrr+ZJ5AiqbMVzb7+z/z73vdpodYMD81ZjYh8ivNRn3mRsuf TQb7Tk90fLC1MiHxWPW2MbviVuco3VaBcKGckFDX7c2GvEvNW+yFexI9IesfJPlL3iRkvH9H/FSeF X0BIwmjkPA1L7GrhhyaftbBBjRxsuuCzAsNMG3NHUyp7fzfqmEbDm6UE41/aTiApzSpJji6xgjVEo 2/qhDnSuLQjLNfTAfp0yFA9ID50od2SPBwXD3CzYNMufHFjgOu30hd0ee8n2SsYK8cu0XIF+SlKbV 3S6oYPoyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nq-0003lD-Dh; Tue, 12 Jan 2021 01:48:58 +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 1kz8nl-0003fK-0n; Tue, 12 Jan 2021 01:48:54 +0000 Received: by mail-pf1-x436.google.com with SMTP id m6so413956pfm.6; Mon, 11 Jan 2021 17:48: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=1e1njK4JCLyF4BWRntmeMNLMXKX/535/WykRDF+9nqU=; b=PNTUCk6geY5InMoWegd4R/7ONBmdHbmTHWHsRBWkvZ3kJmCcHaJmJ5QQkV/yeBWyez WPGP2fHvqagetLt99OfbaVvv7Y79YL8mW2shYT7OQzNWTFGUu0mzMYKK/j9vPkPK1nG8 bY22R8x9E2Nw91rpxpQmIQ/uLbrsO9rvPP4cxl+Jghr6At5EXNPywimw+UJYhyOR7ViH t8SdsYEpKbgUC7ZL09cjpNxJeYQXxfjfDppZ+jWdZGZAwqanuz1bCiA/msIYOrCbvEy6 4PkDV3HDHmuB7J+PxTcreaYcavADyXQEo7Fhf03R/hRO/z3I9AGEnnCN2ye6+qQUweMd YmJw== 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=EXbFnIKDW0vpD/q32fu0FrH5XCN6QgcgDZdNV9woZPJNGL1SEZJnDnlp9PjYMbmy+E 5p2qSlLagV9ODg1s9VHzaoEb0aI6xYWoShyugUxVUYhznnQqy4d2HxW1CCFAYuvGsTQX xPvniAm2SIVeaKtrGOh1nOoqDabXZelo2hWkE8j8BW1S7A8QUdsPKWlhyNu7usDnSORA KwRNJOpzUBGoqdI6g/uL4ALWFKIEu8V+BBRAjD5Z6KSC5ge/XcjUtlXrcNHve0PYKpBS PCJ7verY3EQyO3ByHPrmVKH6NbnI7aXKd58NUwJhrNfiDAW9LHIphlDs56yrVb8E3nu1 pnxg== X-Gm-Message-State: AOAM531ZXpK3lMbD1YpPhsPn38clQN2+bmk00+ddE1uyBvDBjCjK2JJ5 LZWHJwoC1Byn4Oh9uvDx9Ss= X-Google-Smtp-Source: ABdhPJzT18hj26phenaIO8NQZKd+sXCJ37xFRYlpef8kLeq1OsoWxGXLH5LS5CCM+il2Kc/v6f9kjA== X-Received: by 2002:aa7:8c13:0:b029:1a1:e39e:dc29 with SMTP id c19-20020aa78c130000b02901a1e39edc29mr2438520pfd.64.1610416124911; Mon, 11 Jan 2021 17:48:44 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:48:44 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 10/19] crypto: ixp4xx: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:41 +0530 Message-Id: <20210112014650.10887-11-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204853_669987_BDC98DA2 X-CRM114-Status: GOOD ( 14.15 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012063 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 820FAC433E0 for ; Tue, 12 Jan 2021 01:49:08 +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 40C9422D6D for ; Tue, 12 Jan 2021 01:49:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40C9422D6D 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-rockchip-bounces+linux-rockchip=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=8Hp3QOWXTZl2nF26xk+FMsP5ic42gHs5mf1Ijy4ncLA=; b=ZEBUqpJcgi9KO55j3gavC/F38 mNFiqIRb/avAytFz7CS8u78kkWyELqWQqov4wA8Bm3Kg0+COxOn0IPTzUFYHMwpZXKEFI5PcmFzvv E1uTIKTFcvHVoZgjQaTwMjz+fzYGH53RBng+4bpa07JNq7wtnMeiDPe8aruceLPzXPkwoX4f0Hn1D H/S5gvJpcRzGB/hwNY+SQ+1Cj8tvl+hbDXhDkTKm+q8fpBAUku13fEM5QZMUSWKj8G4ZB/5DZxfa5 Ctep3c264mSNf2eqt9BVmdPJ6o9nh9IYuFa0EcVsnRhFXVUBJhIyHzmFZnppUZfQyHhvS523woq/V HYJFl57mg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nw-0003oA-Py; Tue, 12 Jan 2021 01:49:04 +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 1kz8np-0003jW-TN; Tue, 12 Jan 2021 01:48:59 +0000 Received: by mail-pj1-x1036.google.com with SMTP id w1so774418pjc.0; Mon, 11 Jan 2021 17:48:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gZKtlD6nuAorTKG2PqNJjMaym8CBQGfY80Jr0aK5tbM=; b=uzr/zKLeYZMdidkOpSJZb7/8jxDkz6BkwW+cadJzPmNoTkXAoVOC5WyrT6TCtQEsYK KiyxanAnVpYPpn65uLMiWZRCKPOLR301NedOSCSUD3TVAafnqVDs2aTORv9ShQfUbVoK 2vl2nt1XzMuIY8cA0r2SF+i1JRKGuv02oEMdd93KgUrSgvNv+hlE9szZHUcyG671qvYw xbB29kWdaWgha21K19/3C+gxs8D/jj3QwrYMCUzuVxf42m/57hZG2lPvL2lDTHhvx0UH yuRSVpDUWv1eoNvIbQTkfIplVOK1+xQDNNUm07YbZtCsHYZqTbuSPghXbPQ8QXu8cpsm u45Q== 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=nq3QMAtZzm1gTKOhyRUEJSZgJ7RbWldT64qVK/HPsDwKMqubRDak986uZoL6ruV9Vl RlOz6CPMgyn4IYw8MSixZUTiWCf0h7raE37L0OvzmL9DvVnr3ftA+ehvsVvEanfww+rB QugkCEP8fg8Xn+L0xguP3YadNNgjdGKiDQg8BYoQg4AsdILhSofqfPcI4vhA632Cwp/Z Q6msfF4gpql7uIXWkybZXdkuFt7YlvC49qZEtadJIIJ7z6ZAltaSiYzR3/w6vJMwZzek F2cvPXeki4z9+GS3SSnGi4uAngxZTjDopYfkZ7QjmaTtExBJibos9TJlc13er9hgtCSI 13Lg== X-Gm-Message-State: AOAM5301cegU209f/xXzC24KWhJQeTHAEPZY6RqFvcNutfV7ANlncWju Hb39iNsB7/Zre+5pNbffv9371H/P7iQ= X-Google-Smtp-Source: ABdhPJz4VMp0PXevYFN3QBu5Hi2o0Eo0R+Bd33MpKCTeqxJe4KDLVpBYm33t0ooJjb5a0kj36pCXHw== X-Received: by 2002:a17:90a:1050:: with SMTP id y16mr1812397pjd.181.1610416134181; Mon, 11 Jan 2021 17:48:54 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:48:53 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 11/19] crypto: mediatek: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:42 +0530 Message-Id: <20210112014650.10887-12-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204857_991934_6012F622 X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012065 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AF5EC433DB for ; Tue, 12 Jan 2021 01:49: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 4FAA422D6D for ; Tue, 12 Jan 2021 01:49:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FAA422D6D 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-rockchip-bounces+linux-rockchip=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=4Oh3bHaRYLgE2bX8gUTWwMWOlbLXu0W/OGQvp7cMifo=; b=Xhb0hfpzma9G+7UUjN8poZrNP XjwzftQI0R9lKo4TwhswZA1mHbEz1lNW/KeZwjAql+L6y654cDS+ZSA/hRymkGiB0WsTWX2bl05Id dPWcqqEJFwn8E5ItJc9L3gZc3eAVNHS3OY/ygcgVd3tVXWBtbUTSkpYH1THccf2LUOMTyxhmmtLwB k6IPOUwrQwqqP6j6sZROb8vAZMeaVHS02OEyjdJghQfZeDVK4xLQYP6m82OrdJZgSCTLgBYxaFkU9 W3jezwPLWWwNvp8iqWlFfGt98QSrpPb1/FK4GiB1fVSQZIbBwKoY7gZ6OgIsxAJaZnSlPyht5x4xo 7h+TYWGqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8o2-0003sA-9H; Tue, 12 Jan 2021 01:49:10 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8nx-0003nl-8T; Tue, 12 Jan 2021 01:49:06 +0000 Received: by mail-pf1-x433.google.com with SMTP id m6so428947pfk.1; Mon, 11 Jan 2021 17:49:04 -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=HmuAnrp1Otc9OjAqpif+aX+kkYFKS0Ir7QviklhzZ29YoEms4u10Ovm2XiE7pDImye /CYXpA3TYKw0n/zMCKi0n4aOdVE4tQmV/vQ0N9+Bd7TEA2Hk0uWFNMi82FoK7Hk+dvPb T+tQHYuEgVZdqj2dHocHnJitlKRxmizltWQWC99wQAV2a+DrmiGnWlrxlh+Iu1dSYncG EPxXmSoP0bbTqAOobAyT8KJHeAkIiRO1/doH9hlkMJVuPoTrzVUc6hxhAJUC2YYGEj8X +94OyAYBDk83//wonv/pxzBXkvrlIrt3/Y749csA1GdhgOqN4LVVD3phP4D4OL1cp7js 2YwQ== 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=s/LTkpZwMAnkg3+yCMd3ysLX4NeeSoSnBfFyNldnLRMxNpLYZ6uOCPtASp2xbapG65 RoPEuK9Lz/nnLOYxvKkuVGnF05oEjjzTiOY0+FNQVblfmYeGhQ651l5q4IM/XvRDsx0F Z0GveOoNYRgfOmxSvrkz++GUbRTz4ETzwzRDwPFGf1L9M4LeLt1ov+9a6gxIEuOgVqJZ nO5r7gisDvCvBP2vJNqMaja1LhZG3Ove9VGI/p3ZoGmRvZbZGUAy37U6J+2nasPj6Uy5 LWFMxyVVEFmLeOEcMP1U7kwkI7YS4GrnFL0kJsItqcEHMEhhJQ+lTPu2+JHdAHKWFuJ4 QLzg== X-Gm-Message-State: AOAM530XRaHcdLpYRL6s6zbqc2JuFp9oZ+BDVuNUvc3sQRNkZwV6Krru P/hoagiUhiLGvqd2NKNbvJQ= X-Google-Smtp-Source: ABdhPJwAVkTGU7VdKnWpjWrkka7l9NUTpAilXCO9WBxYiB3USQqO2rUoRU2hsywCWx8+oJRHIvI+tg== X-Received: by 2002:a63:ec4d:: with SMTP id r13mr2276375pgj.53.1610416143044; Mon, 11 Jan 2021 17:49:03 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.48.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:49:02 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 12/19] crypto: omap: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:43 +0530 Message-Id: <20210112014650.10887-13-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204905_365251_08950765 X-CRM114-Status: GOOD ( 13.85 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012067 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B17F5C433DB for ; Tue, 12 Jan 2021 01:49: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 6172922D6D for ; Tue, 12 Jan 2021 01:49:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6172922D6D 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-rockchip-bounces+linux-rockchip=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=XpItjKJ6Jgv2ekhbaykVS3Dy7nYIgf//ULOnWWT0eCg=; b=EILoFfzBRtIHS+X8b2b/QIRka HM5SUOc6811m/fl2/Cffa2OFfp5QOiuoWyE3vl91w0EmGK8PDXwgy9K2mKakCId+rozplNPs6q73L nSnD7q3W6h/wloieWH8o7XQ8lCb7xiVs2+u7TannbcDhPtgANxgQOWDOskw0ft7UxMzHuEIa+apE6 0s3pM5MIvRQoW0Lv3fxYdY8eNKJcQSVwNkhAzgNrdS/wQxT/1q8OidpqVl41Ozc2n5vTaermzwJia otMLAuC0ZD5XtqiNqBjZQ2Eo74laMFdHEVjQMDdcBQwBeR9F3QYQwJ3gbPaQ8uArFuHznJt8xpR1g pWpGBhEMA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8o9-0003xG-P5; Tue, 12 Jan 2021 01:49:17 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8o6-0003u3-CH; Tue, 12 Jan 2021 01:49:15 +0000 Received: by mail-pj1-x1031.google.com with SMTP id b5so675288pjl.0; Mon, 11 Jan 2021 17:49:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u19NxDApfMXx+Y8pGP/iF30yq+dZf2FG4hiZfFrFBcE=; b=r7tiML4ldoBRZewsCdlsIV37ZV7wOsjcdFkiCWIJlW4dJGMEnuIDE00L4+ytt5m+hX C/awc06j554FRO8V8FZYFZXYddwTZ3EGIqObWoYWePASAo882MdkP7AdNmTEONiZFoib 9rmfSsqtBxZZRKuoNt0YbNcdnYE9hoSUaHaU6Je0lQ+5q2XWrJZIBTrmokDu4kf33xgj jC0L9Pt5VoFOscfFs2gbhZGAdHSbdFn4/kU3qYPs9NZcK2U7JN6albjOgNUy0fzAJ08V 55zd1mlgI/34wcWNoR/S7NhMGvNuDGnl9VQcvtv8yTm1FuiRPP4mA4jFaos8rBgVRfjM mHoQ== 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=HEyI9SB20l+zykyuZ1EGYhL7cttbCx0GSRv9g72xg7GIT5/nW23Mla76m5/wiM0WA1 8knFzCJuQ6e/iiRqruM31/tRFkYew4RMyvOGL0/6UrNImWFAaVzkYfDnN2vk2RX2OvlQ zg1XLcjfR1T0sA5OlRVTO+Uk5Br+eU4m9/PZNmKaJQItJaDedilzqGR0SRUv8hqz7Y3i 11Wc7c26tjvvsO2Y3vQCVB9Fy47fE0G8onPdxKs9fA5MkPLrbc0gNIgiANhYWyCiTmLC 7crSHYu303k6ktuuTH/+B7WYErWu72uLjfzI6b8o/E3gEAFByr2xnZoLGVabiE8yzTao FuVQ== X-Gm-Message-State: AOAM530C7UKUq+uji/uu51EmjRKIhWjw12+arqwUu8CVU60+Az4jANS5 SEtaTGKAEKumFLazX+3zSR0= X-Google-Smtp-Source: ABdhPJwKgC3RH1nzB1/rKwmkmK9arutqt+9MvkjsAmm3hSY7v3qXi7pI9NIkUqME31+Bp+viPElEwQ== X-Received: by 2002:a17:90a:734c:: with SMTP id j12mr1747988pjs.201.1610416152388; Mon, 11 Jan 2021 17:49:12 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:49:11 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 13/19] crypto: picoxcell: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:44 +0530 Message-Id: <20210112014650.10887-14-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204914_482132_780584B0 X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012069 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B97AC433E0 for ; Tue, 12 Jan 2021 01:49: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 D316E22E01 for ; Tue, 12 Jan 2021 01:49:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D316E22E01 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-rockchip-bounces+linux-rockchip=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=3mnQE2PvBsd9nRqM2nl6JKlLfdaTOj4CQ6HIkN+lGPs=; b=lyXq8ONxDhWLMM7iLfGs3CGlJ nB18UKqcH963O+Mtk8TzkRY2AGjgVyxNoALmEvXmCDrYGJiqb7z9Dd10uyQaobL3O0ClbCZ6CSIOD Hgd7GpFVgjhwx+ofSgT7jbpL6UkMTOkxZ+miX/t0tSm5aDk/PclAjV58Wou+DnkW/TBadGbGTDjdg RJhPCWXFfxYluC4Kj/I4FAx/avEVyPFI6caziG1zYnd1LzaNFfWyb8+dRRAYpOuJGokfvawJTU8Ky 7UmrFBIXn0CBdSe9YgOhkWWhImFIxqb64brNaIKV1moEoeseCEVPreIxZeu1SqE2KoOpI7VrGfVMC Z03Ecy57w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8oO-00044z-Mz; Tue, 12 Jan 2021 01:49:32 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8oF-000401-JM; Tue, 12 Jan 2021 01:49:25 +0000 Received: by mail-pf1-x433.google.com with SMTP id q20so407081pfu.8; Mon, 11 Jan 2021 17:49: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=OtP2Q83ql8pOj4Inc9JGr9jKNcuTQBZobhx5BHnHH/g=; b=YBC1yQjH8TXjngxP/qOpGQOeT8UFI3EfWZf6v8+12cI+z8pgLG0+ii6bgWIYoBvYfq eyyK2D0PFMwsk0eeXU5NQjnsqV1lcHmI/SU+/JgDjHemst5DfX0AS/YjnlEXUGxHmnQF 3tt0ext4GTdJoV7nBRRS99AuKZHBvlzIYvBOLBzYyBqKQl/dQqThoiCYe50MH3NdAGcc 8hkI/sI/IC+phUcD5AFvguqO3eR7RSe1h0jEBd8vivFwCdJBYl79kNr0Q5MJbKAnzxdV xebj8hG5WiQ566cxHzDggzbIpIiA7PrzoAT7MQ8vGrR603pXUTE+aD+Q297yTRutBYWl 1r0g== 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=UYE2waZeeJMuoTY/41Y9ojHGDhDUAmptrDsxZkNxcXYvv+tVt6L+oVvybU9IIUJgju JsuycjkdDZ6ZJVPb6b0X1oeQWuWbe7GAtQpgxsYA02XDFtyXKL0h2FoDA8gSBppEwkCH IkF5dUt+nZozzxpuKGD4p5LgOnNb3PwtKY2SCCGzhqVZHD2KohtxhEqxE5WBjst12G+m Mdf5S8rHabKkKDII8/+TQo+ijYt0JXdbbEZs2g2nbTfoJwBQ2EWHXtep//t5Ao3zBQ4F vHOCor97E0gwla6STO/y5yh6C9lPjNozG7SU6GCmO9ldf29ZRYqv62rM66kWIJ/RaSUs Ti6w== X-Gm-Message-State: AOAM530whvmhUAQRENhd0F5clMIbPraEF48166GGkx3QW4msNOwE4neN 2a5ds1pSLI7OUGEDwhMMyVQ= X-Google-Smtp-Source: ABdhPJxWyRij3haa1spWTpg4Y2dOKAQzvgqWX9I/ALksySu/d/6UfpmZJDPTx8OGtFt6Z9FmNg1LHQ== X-Received: by 2002:aa7:8517:0:b029:19d:d70f:86ec with SMTP id v23-20020aa785170000b029019dd70f86ecmr2217270pfn.19.1610416161691; Mon, 11 Jan 2021 17:49:21 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:49:21 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 14/19] crypto: qat: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:45 +0530 Message-Id: <20210112014650.10887-15-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204923_694883_7DFCEC92 X-CRM114-Status: GOOD ( 16.31 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012071 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFFBCC433DB for ; Tue, 12 Jan 2021 01:49:39 +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 950C222E01 for ; Tue, 12 Jan 2021 01:49:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 950C222E01 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-rockchip-bounces+linux-rockchip=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=EsHkGLT/ybwAvpewk0bqS9BIUIWnudizR6j2cCdx6ks=; b=fhXFrHeJ7zM7JDYtbTLwwJlL2 0eomo1b0tG2v9hhaQUppTvt7Rha+AP5mlWRABFu7JyIdLUqvW7yWJTT0s1NoPUWob9PHVN8w6Ywjw ObUKzGRUfHy5rrG/nZccLcGYMrIs5a1VzlCxbmodkP6x22/GiWOJsoMns6leV3R4l+4ZUG0rjehe+ YVFPRvT8RF8u1IXBJpPNOM7otl3BdIYV1IcwCBeZhtPgO1w8y34xBnww09jAZt481RXOQQ+TovxNh 3yZzzlrrviwqprBYpORS5PwqqqLmX6r2PaWux14uLnKbxAQPDLQHmAs2pUVrw7zjT5ElmAtaE0f+d RnSAXLTkQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8oT-00047t-3z; Tue, 12 Jan 2021 01:49:37 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8oP-00044u-5g; Tue, 12 Jan 2021 01:49:34 +0000 Received: by mail-pl1-x629.google.com with SMTP id b8so542493plx.0; Mon, 11 Jan 2021 17:49: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=gQh2IwNxftbR34HfI9l3nT7vPGQ8lmvW4dX0b9EAc7Y=; b=vLF+0YKIHD+wGmKY0SoKMw0rAk9JDQg+HeCpWTOTEn6g1z7DwBlA2q6bHAc5CVXUKZ UcFLvngbyhZMclhG8HpkJo8jzPS1dPlFleIhsrlkKFBw/7XEEX4c6UkJoIxbFh71fYdn ikp6SJdofZ8MqY7WJQ4to3GVn6DEpl9Z7U7N5uQjzX2IMnbwUZBMBOVv95kMQ7Yd6u+P 3rjEm8QD0Fx1dPrjo6r20e3wZcDOf3k/0M1M128fGhhHm5fPzSDWow+cLM48vC65S/Jb mB9Y7pC+UPbldzDUSc5RKiZSxafKuXD3o3j80jmf6tLzR6tUeU58PSo01Km7fymI6UG1 N2zA== 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=m5TIiSBzyhhUnO/9o2/3ZHx36JeTRQROY7bTK3FaBmNMv3uMR9Jx5eR7Y7wfcCtyKR 24MtA3ZoQy3h0HaE5hC5TBK5tRT4TMiPWTq+gSf5SpGMwZpqImkK0/XFCUN8s/7sTiVX 2/QxKnHhxufJTcBx+Ap5uZGJvNQ/L+iAnFgojYPIHQpJRzkuzqUAVCO0VXbyyR2ZDRft VgrcWhUx/E/5Ku2ieeFXMT6x5xvYYXq7hEs2aaHhT6WfkZAmDv8Qc1x27qIFvReh+EbZ pLMpgGNbiikyppeb1zQ5RXNwDvq+pgaydn6phHM6JHTEU8QLOgucfdfQUWiJ1Lbe+w1e Bu9g== X-Gm-Message-State: AOAM532ZjTzzbkRRKEyiZ3e/2YOdjnvwlkzpn4dzmYldslP5Gwtk5DFe XHc7UyQW8vwAbtKtumOFKQ4= X-Google-Smtp-Source: ABdhPJyVBiLzaMU6e2OS0Djecxz6eUuTJelAmDYbc4kyrummQIG5Z07jUvLZwAFcWoD+PGSMTS79zA== X-Received: by 2002:a17:90b:346:: with SMTP id fh6mr1785782pjb.225.1610416171302; Mon, 11 Jan 2021 17:49:31 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:49:30 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 15/19] crypto: qce: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:46 +0530 Message-Id: <20210112014650.10887-16-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204933_253922_BD3FD253 X-CRM114-Status: GOOD ( 12.06 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012073 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E1ACC433DB for ; Tue, 12 Jan 2021 01:49:50 +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 03A5322E01 for ; Tue, 12 Jan 2021 01:49:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03A5322E01 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-rockchip-bounces+linux-rockchip=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=tiBDY6NFtkNg+5W/OEphzWjrPJ9MI3GDI86RFuTISEE=; b=FhXKMY7hcSYZYwnhOupP975qD HHh+dQZnJjGUIyYaYS0cFGsq4JdUb5TZ+UaB3YHybF/+/cBqy4L/rYTCRiZQgiUcFzlzq8H2KMPh6 +qfMXh4bVu2pKEkmfa3PDHm1nxDnWBu2JXkcyT395QI0aaOdbNuzvnnNDQ8Tn0LHyuRFll1oVswsU L9jSkM6t0AoDC6F6O/3BwKbpKTcst7NDvOdWkvE1T8wspVDT02q9s3MJlN+RahM4Lx4dvmsBtCUoN RZMdi5aKruXEIiQSSoYWtsmDisTX5CxSwpLuDkOc3wQ/DU3LYMkOxPJtrMUGhETAYG26gokPhUUxU qUmkAsC2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8oc-0004E5-7T; Tue, 12 Jan 2021 01:49:46 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8oX-0004AC-AP; Tue, 12 Jan 2021 01:49:42 +0000 Received: by mail-pj1-x1030.google.com with SMTP id my11so55168pjb.1; Mon, 11 Jan 2021 17:49:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YEPwpL8tIwFQ2pgUdTDSsmDRSKgoB9OQrqIbywK9g6k=; b=t/dea+HTFASqa+DkMZsvezWreLQct3An1am5aT7oeS9MCB7pE7WxwdqcAYpKjDnazl oozG5KS4nrETiFufl2+NAtyt8fONx5AyH2LnMK+GFXeTsO8GcEPBUOjPXAsPj1oveh8M UsxM2lHLkLGuTsSvHX+AXx7wvXVPnMH5fT6/RiO0ozm5VEqwZqvz7Co5GwHvh0x7kAiD 6RB2x7VuY3tetfpgrZ4L2kdF98h3Vo+i51d8SyDIMXRilqkgaU+xkyCn723kBgE2uxne YjtfOmBfd40b1aeiijI/tth2gf0ls+AkjiI/q7c3nyWh72C3BWawI85v6HEc0Rt5p62H /Jrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YEPwpL8tIwFQ2pgUdTDSsmDRSKgoB9OQrqIbywK9g6k=; b=p0Em0p+iYG71lznEXm3EXmpMrskyMxOqwcQZqLnDZ4MHgCpTcMenLJ0hEYWEUvbqeL yiqdjNBb9TDNu03j8tK/bHDYrYJpmuK4GzWJNwFc62Z1uGAtZzEeo5JUoyGexAS8Y6Ae AXoZY7Bkp2LRKcclE1QTDVmJrp0z/VpyCUnCUvWf133zz/SrUkG4mBJgmtxKRzVYbdN7 6CEnGHV/yeESNm2Yl0HnP/dnFmHJtzESCPW3h2eQj4KqCVJG3EjFWvO0+yfxvJEWW6JC J0Wow0UMExHzeyOKrqMgGIIgqIZbwQ29YzY9RO1c5PbpqRHZhuOuG8fyvTnTUveRk79u 5TYw== X-Gm-Message-State: AOAM530K62JNcJdfJWQz8cpb5lMM00r05oBWz/91jKceUOvloH0fN8rO jTXO58BPAVKYKMRyEiG23Zw= X-Google-Smtp-Source: ABdhPJxZnxaAWP/2FGAGT++lMvv0ZGP+Z9EPfAeWUgayCc+yEPQmbSAcWNVVlzBYfOxK+hgjl8fMQQ== X-Received: by 2002:a17:90a:6388:: with SMTP id f8mr1861750pjj.192.1610416179413; Mon, 11 Jan 2021 17:49:39 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:49:38 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 16/19] crypto: rockchip: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:47 +0530 Message-Id: <20210112014650.10887-17-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204941_569707_D98B2908 X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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..85f314c79734 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -201,9 +201,9 @@ static int rk_crypto_enqueue(struct rk_crypto_info *dev, return ret; } -static void rk_crypto_queue_task_cb(unsigned long data) +static void rk_crypto_queue_task_cb(struct tasklet_struct *t) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, queue_task); struct crypto_async_request *async_req, *backlog; unsigned long flags; int err = 0; @@ -231,9 +231,9 @@ static void rk_crypto_queue_task_cb(unsigned long data) dev->complete(dev->async_req, err); } -static void rk_crypto_done_task_cb(unsigned long data) +static void rk_crypto_done_task_cb(struct tasklet_struct *t) { - struct rk_crypto_info *dev = (struct rk_crypto_info *)data; + struct rk_crypto_info *dev = from_tasklet(dev, t, done_task); if (dev->err) { dev->complete(dev->async_req, dev->err); @@ -389,10 +389,8 @@ static int rk_crypto_probe(struct platform_device *pdev) crypto_info->dev = &pdev->dev; platform_set_drvdata(pdev, crypto_info); - tasklet_init(&crypto_info->queue_task, - rk_crypto_queue_task_cb, (unsigned long)crypto_info); - tasklet_init(&crypto_info->done_task, - rk_crypto_done_task_cb, (unsigned long)crypto_info); + tasklet_setup(&crypto_info->queue_task, rk_crypto_queue_task_cb); + tasklet_setup(&crypto_info->done_task, rk_crypto_done_task_cb); crypto_init_queue(&crypto_info->queue, 50); crypto_info->enable_clk = rk_crypto_enable_clk; From patchwork Tue Jan 12 01:46:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012075 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B6F2C433DB for ; Tue, 12 Jan 2021 01:49:59 +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 3585922E01 for ; Tue, 12 Jan 2021 01:49:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3585922E01 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-rockchip-bounces+linux-rockchip=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=Y/ZfnEHdMlP71vB1Rv5c3xFUewdAXU+o4m6HKCqXSMg=; b=tH324h55gEshlDlYJx35qXfnN y83reHn9BhmSKsAh4Q+McASymYfCwaJLnxZvKCyMseDLYcZWGBS/ozYZLwNOTMA9ItbKz3c2br18k 0z2+odST+O+V1k1gc/2xhLAwfuJB1gZMNrl43OayExlyprma4nZkOwUphKRlTm+19wV1pGAiDNaiE +0QX5UhSJNQFTN+UWjwEXQJjDKc7EFa+vWd8AORjjomnTZl8yZJdrW+aSe7nVR08+zWgWCkglEduO AHpoCmbYC63sqF9nt68cx89cglqAvObTEJ3/HYmThzxQWrE1wOsB9tNsK83YQ/yLTGe3GupNvE3Qz a+0d/4mjg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8ol-0004JZ-N7; Tue, 12 Jan 2021 01:49:55 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8og-0004G3-8f; Tue, 12 Jan 2021 01:49:51 +0000 Received: by mail-pg1-x52a.google.com with SMTP id n10so363017pgl.10; Mon, 11 Jan 2021 17:49:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hdFxs07OBJ0o+UoENy6opg4NHXCcbJpiwkpmIdQiwws=; b=FJdiFANvMr6hPlso1S2evd+zFtXBWgkIeiOXs8YUuvIMeBb0M9j3JNjt6b/T5byEgN ygaJTbhQVH19uvceTlN4Yofbl3VjYiq9X6MQ3AEf+J4YQy6YRWN8xxZYc/kZ0s8LiQZ6 UgYAhKso1lUl1n205tYzvNbDUHnoqdKFgjoSvYWVJjHZCF4UQ//9l8TzmLL5Ege34lvo BKXjr9JcVHQ9Z2MTw9DvFfBA2xol34OpzBZ5LuWnSjR1NSLa/AxzNTQ3oKsh+WWvv/lS cop6/a44/SDw06dT6B0SThOFN6JuMgeX9DpNzSjO+dB+dSqvDn6K2mIQC6EvASp3H5d5 c9bA== 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=hUmDSeV8K9ZdtOX8EXDpvxka/XK7PHTx7aJWleVYYa90y1FKRXk9B+yyTFIBaWgbyH euvjD/mn8s+Zrf7KyWCxHh4f3iLYgkcf+4HsBgSHWfcE1QITrm5Zjk21f/NKf+gTPhIM /MmDIosoZJ7NL19Hz3i3ctODpqRGUhTmEIpL9r2TWsK7s06npOhsBGXv/DWYEvMBqo4p P9ZXsPd7R5XtW5NjTvzmBinpkBPRdaqKwj50U1ZQtT9cjXZ2aNRdaVSvHvsw12gAWKNH A+wGh7XM1V64LJ+QdPvsIZAVCgVEZuPBN75nOQ+7X0U7fdoYYDQof0Jf3Tn3iBDM6Z9f zcgQ== X-Gm-Message-State: AOAM531yb9Xzfijdy+p4mbRQ15J1d/U5Ig8npnHFkOsoe5nt2yYLWWf9 1pQxs//1IMZgQajGBhGVDeI= X-Google-Smtp-Source: ABdhPJz2PBmKMYU/Dsu4VtrMyiTvF6rhR+M+Fm3V4NTKiKxfPTJd3CpJpe8t5OvauzLVcGA80CqhjQ== X-Received: by 2002:aa7:9848:0:b029:19d:c24b:1179 with SMTP id n8-20020aa798480000b029019dc24b1179mr2450075pfq.29.1610416188197; Mon, 11 Jan 2021 17:49:48 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:49:47 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 17/19] crypto: s5p: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:48 +0530 Message-Id: <20210112014650.10887-18-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_204950_347999_F25F0AC6 X-CRM114-Status: GOOD ( 13.80 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012077 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA703C433E0 for ; Tue, 12 Jan 2021 01:50:10 +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 A579E22E01 for ; Tue, 12 Jan 2021 01:50:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A579E22E01 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-rockchip-bounces+linux-rockchip=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=5j+VEug8yoJ8ucBhcno8LDQxJXtH5RoJF5TxAh5n41Q=; b=OihBG41FNjrICLnldJ946PiD7 CdAJSoVNSBJw3vrW6xU/dyVwLSVv0sNCRRd7lmoM9Az2sEPqoPY89cZysVPT1pVti3uEJBSt8RFSq zSIJ6IhL21RQ4HiIA2SxWhIJBZDqmj6VetYsp9MoslRUzYmVWF+kGbj0vKrdanrGTijswXABnfXNU LiaQgg7eA6iGrgbTG+53tqF+oMy+npw1+a7inZofIz9hmxTY+eCgs3ZqMSvqtPGfrCLxKei/ASOd2 1hfPTnsnkufnj/jv1AH9NWTRVv2WkQbrwmFledy+sFDYQn5sNkN51ussLRFed7kba1q02ItuIuvKl kE9z80kRw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8ox-0004QX-RY; Tue, 12 Jan 2021 01:50:07 +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 1kz8op-0004Ln-Tx; Tue, 12 Jan 2021 01:50:01 +0000 Received: by mail-pl1-x62d.google.com with SMTP id 4so525379plk.5; Mon, 11 Jan 2021 17:49: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=FGU6XdrM5ip9qPogsEZz38Pcqw7Ofqtd00r2eJGcshk=; b=JFWnMBvoV4KONNmA25ZyYVeBE8Iql7jwtsebx7WlKY/L52r+xcAbQUYfKrSVGw/UcH J2Dy1n3d+DscVP9xAjjnr2z2ghmH7UyaR7mhOeiceOKCOGAtIRBrUGTTeXP6BXxFttiQ yd0ru1wndG8+viHMvqV1xnoROYJDtjlQ8JkbmC+G7YSjpSt50SfrP2wDFDUpnBwY9srh jLj0GdAmiUdpZVeeSaFLXSE3UcvP7OeEQ3nDifZEgoANLTjyGMU/EPuBPBaqYi9PxsX/ TnA5jfD+SI7DYnTmyLcYahkZ+X1U46IrgdHd5R0fGgYLf4LktMZAO4UjEPuYc+HPISwE Smqw== 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=L/K+A9PTC7+ikKM025Xqg0D/nFymXoO46rybBHcFZoEbNILobkA7hTs4kg3vKN24jI plJU+tIGS35/mQXTS/BBE1g6AlVImpKEF21pzXnBv3Uc8XeNRPL1V2RflFQtKqglDm9d c0tk5exEbTyzJLUyoCovYcATMT8XzdtuTaXvjMIprykxxZ1qCjKK4wMMPqblM19FreOU j7QiiKcwm1L39xNg3z0ewe59233FwzVknOLNeSLHVMIbU2lJEJoIHuPqc3SSCxrDPz3s ATImHJSEoN2vwEivk9gQTv1vJ2FMtFFdQtlCG9SleFdLqmptHMsZQ1XjEfMoe8NX3k1m NaCg== X-Gm-Message-State: AOAM531o5nNVrvHYhlBsEJpmeoIargpnP2kmtlej1Td/uUQAf0Bw0+lt GfnrTx65DcJbQRIF2lAGuBs= X-Google-Smtp-Source: ABdhPJy0bdZeanBUbbWmlcTHHQbnEwK/exVUHRnRT0ardhrmFXFDgfk2NrcxH8xys4HCMVe9G6Encg== X-Received: by 2002:a17:90b:3596:: with SMTP id mm22mr1797272pjb.235.1610416197940; Mon, 11 Jan 2021 17:49:57 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:49:57 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 18/19] crypto: talitos: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:49 +0530 Message-Id: <20210112014650.10887-19-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_205000_206066_71CC02DA X-CRM114-Status: GOOD ( 14.85 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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 Tue Jan 12 01:46:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen Pais X-Patchwork-Id: 12012079 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=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67942C433E0 for ; Tue, 12 Jan 2021 01:50:16 +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 2175922E01 for ; Tue, 12 Jan 2021 01:50:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2175922E01 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-rockchip-bounces+linux-rockchip=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=vZUw7e0lOj1xd2Wh/BYhWi/rkzykNNRyk3wO+QAmY9w=; b=2SGilgQSNBHMSCFVLpnWDabB5 YYruTMKlkVHBGWUvf6BkQkFVoYCIbwe4RjNcrm5dzYHATSGzX5xLsicGlptL3XjeIGAQ5CsIAUSmW mlIlDTebnL7JIEY/giULnPVIp45zx3IK4N44tvxdKqK37FQT0dZmBCiF7dU2uUxnG/VfnwT6Hr9pl 1CqNyjl2CEqOBBD/FM3gWb+2Sff/2SkE77gDJHSj9PtDnULOCh10iSIZKjBmQ/mKADc8vd3aGIhSS 4L6HbP7zy8D1frVzsimtXPzwkL3H4aHQZZH6gwqVJK9bAVW7GoaBD+HS6effBZ1vcDPBlVF7zSXb4 8+29BFSQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8p3-0004U6-0X; Tue, 12 Jan 2021 01:50:13 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8oz-0004Qw-Gy; Tue, 12 Jan 2021 01:50:10 +0000 Received: by mail-pl1-x634.google.com with SMTP id x12so512012plr.10; Mon, 11 Jan 2021 17:50: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=nmGD8HgPe/79+tkqFpZtuKTtNUxMt+0Wii+rdB2TPJ0=; b=PIC7XupoDMn9piWQ69Bl0kSfEVHNzrMRig+EIc5OLLCmFuFRswvromgbiophGM4QYT ZD80Bj/rA5IwXoG1Cl7PFkQrgG8ZvvcmRUFgRGaEAdl1BXrb2dqQgY0ctp70w1+jPmRW T3saZ3Dv0NpvtYnvNIiL1rBjBb5Hsf9Ql6XGjKUxArWP/Jfx/JeApHqYds2TBZ1yA9Y/ rgZLAHIxgZDLeBV4ciOlD54q8dsDHuwxMT3U13i8N1WMOsTxZhI8Vjg4RzlUtZDe/tHp gb17/KPo4c3WJgDloV+1R6wCybnuniZnBEL8Usvu6/JR0PphWZ4dsgLcv7Gw7YJrLo4w 0CqA== 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=CGwD3yQx75Nz2gdNT12Ihx38SNQPAGg4xKuDnkLO/O5gAlsO/z1+LH5lHKBaza4Nvr 8HRttVLnL661zvzLYOUuCrcAougg/19l6fn6jmH4TvP7FgVC5P98xeuNkNqQfXeNYDDH Adsq84qqU6BWSINoBnjEGfVFP+Y+AIy9WK6K7S/eesmCJuerjHlw59X9czCBtE/WhxzB om7AVHHenA12jvvpEC8J6KZq4fxKDjkOeXSszLCZtJrtkLB/3HXw7bRJbkZSu13gGd1i v67XBPt15+WkVjCzOVLRsEgJzscIYYKGrtxdrvqNn6FXmutwwqY5mg33R4vfWDaRXImh UOjQ== X-Gm-Message-State: AOAM530j3gAx9YSqdscH0x/a8kogL8tHvmqDzRD0d2JvxNKLtgjPhK4J 6+sV+0obFYDc4pNcaGStIOs= X-Google-Smtp-Source: ABdhPJykt4ezhXe8itNyfcI61xbwIwZ6yNHylHi48PECxS7E18PCI0lpNxhryVnVn/naJ48zL6j5xg== X-Received: by 2002:a17:90a:49c5:: with SMTP id l5mr1833591pjm.116.1610416207445; Mon, 11 Jan 2021 17:50:07 -0800 (PST) Received: from localhost.localdomain ([49.207.194.207]) by smtp.gmail.com with ESMTPSA id 14sm904376pfy.55.2021.01.11.17.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jan 2021 17:50:06 -0800 (PST) From: Allen Pais To: herbert@gondor.apana.org.au Subject: [PATCH v3 19/19] crypto: octeontx: convert tasklets to use new tasklet_setup() API Date: Tue, 12 Jan 2021 07:16:50 +0530 Message-Id: <20210112014650.10887-20-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210112014650.10887-1-allen.lkml@gmail.com> References: <20210112014650.10887-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-20210111_205009_620055_75AF5D3D X-CRM114-Status: GOOD ( 13.49 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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;