crypto: convert tasklets to use new tasklet_setup API()
Subsystems (14)
v5 cover crypto: convert tasklets to use new tasklet_setup API()
From: Allen Pais <[email protected]>
Commit 12cc923f1ccc ("tasklet: Introduce new initialization API") introduced a new tasklet initialization API. This series converts all the crypto modules to use the new tasklet_setup() API
The series is based on v5.11-rc4 (19c329f68089)
v5:
- Fix amcc build failure.
v4:
- added acks
- fixed checkpatch errors(Giovanni Cabiddu)
v3:
- fixed rockchip driver(Emil Renner Berthing)
v2:
- added acks
- addressed comments [Krzysztof and Gilad]
Allen Pais (19):
crypto: amcc: convert tasklets to use new tasklet_setup() API
crypto: atmel: convert tasklets to use new tasklet_setup() API
crypto: axis: convert tasklets to use new tasklet_setup() API
crypto: caam: convert tasklets to use new tasklet_setup() API
crypto: cavium: convert tasklets to use new tasklet_setup() API
crypto: ccp: convert tasklets to use new tasklet_setup() API
crypto: ccree: convert tasklets to use new tasklet_setup() API
crypto: hifn_795x: convert tasklets to use new tasklet_setup() API
crypto: img-hash: convert tasklets to use new tasklet_setup() API
crypto: ixp4xx: convert tasklets to use new tasklet_setup() API
crypto: mediatek: convert tasklets to use new tasklet_setup() API
crypto: omap: convert tasklets to use new tasklet_setup() API
crypto: picoxcell: convert tasklets to use new tasklet_setup() API
crypto: qat: convert tasklets to use new tasklet_setup() API
crypto: qce: convert tasklets to use new tasklet_setup() API
crypto: rockchip: convert tasklets to use new tasklet_setup() API
crypto: s5p: convert tasklets to use new tasklet_setup() API
crypto: talitos: convert tasklets to use new tasklet_setup() API
crypto: octeontx: convert tasklets to use new tasklet_setup() API
drivers/crypto/amcc/crypto4xx_core.c | 10 ++--- drivers/crypto/atmel-aes.c | 14 +++---- drivers/crypto/atmel-sha.c | 14 +++---- drivers/crypto/atmel-tdes.c | 14 +++---- drivers/crypto/axis/artpec6_crypto.c | 7 ++-- drivers/crypto/caam/jr.c | 9 ++-- 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 +- drivers/crypto/ccp/ccp-dev-v3.c | 9 ++-- drivers/crypto/ccp/ccp-dev-v5.c | 9 ++-- drivers/crypto/ccp/ccp-dmaengine.c | 7 ++-- drivers/crypto/ccree/cc_fips.c | 8 ++-- drivers/crypto/ccree/cc_request_mgr.c | 12 +++--- drivers/crypto/hifn_795x.c | 6 +-- drivers/crypto/img-hash.c | 12 +++--- drivers/crypto/ixp4xx_crypto.c | 4 +- .../crypto/marvell/octeontx/otx_cptvf_main.c | 12 +++--- drivers/crypto/mediatek/mtk-aes.c | 14 +++---- drivers/crypto/mediatek/mtk-sha.c | 14 +++---- drivers/crypto/omap-aes.c | 6 +-- drivers/crypto/omap-des.c | 6 +-- drivers/crypto/omap-sham.c | 6 +-- drivers/crypto/picoxcell_crypto.c | 7 ++-- 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 +- .../qat/qat_common/adf_transport_internal.h | 2 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 11 +++-- drivers/crypto/qce/core.c | 7 ++-- drivers/crypto/rockchip/rk3288_crypto.c | 14 +++---- drivers/crypto/s5p-sss.c | 13 +++--- drivers/crypto/talitos.c | 42 +++++++++---------- 34 files changed, 154 insertions(+), 182 deletions(-)
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 1/19 crypto: amcc: convert tasklets to use new tasklet_setup() API
From: Allen Pais <[email protected]>
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.
--- drivers/crypto/amcc/crypto4xx_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/crypto/amcc/crypto4xx_core.c +5 -5
@@ -1072,10 +1072,11 @@ 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 crypto4xx_core_device *core_dev =dev_get_drvdata (dev); +struct crypto4xx_core_device *core_dev =from_tasklet (core_dev, t, + tasklet); +struct device *dev = core_dev->device;struct pd_uinfo *pd_uinfo;struct ce_pd *pd;u32 tail = core_dev->dev->pdr_tail;
@@ -1452,8 +1453,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) {
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Herbert Xu
maintainerRe: [PATCH v5 01/19] crypto: amcc: convert tasklets to use new tasklet_setup() API
Quoted 7 lines · Allen Pais
From: Allen Pais <[email protected]>
In preparation for unconditionally passing the struct
tasklet_structpointer to all tasklet callbacks, switch to using the newtasklet_setup()andfrom_tasklet()to pass the tasklet pointer explicitly.
Quoted 5 lines
Signed-off-by Romain Perier <[email protected]>Signed-off-by Allen Pais <[email protected]>--- drivers/crypto/amcc/crypto4xx_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
This introduces a compiler warning with C=1 W=1.
Cheers,
Signature · 8 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Re: [PATCH v5 01/19] crypto: amcc: convert tasklets to use new tasklet_setup() API
Quoted 7 lines
Quoted 7 lines
In preparation for unconditionally passing the struct
tasklet_structpointer to all tasklet callbacks, switch to using the newtasklet_setup()andfrom_tasklet()to pass the tasklet pointer explicitly.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Romain Perier <[email protected]>Signed-off-by Allen Pais <[email protected]>--- drivers/crypto/amcc/crypto4xx_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)This introduces a compiler warning with C=1 W=1.
Okay. I will check and send out a fix.
Thanks.
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 2/19 crypto: atmel: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- 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(-)
drivers/crypto/atmel-aes.c +6 -8
@@ -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 );
drivers/crypto/atmel-sha.c +6 -8
@@ -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 );
drivers/crypto/atmel-tdes.c +6 -8
@@ -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 );
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 3/19 crypto: axis: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/axis/artpec6_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/crypto/axis/artpec6_crypto.c +3 -4
@@ -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 );
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 4/19 crypto: caam: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/caam/jr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/crypto/caam/jr.c +5 -4
@@ -9,6 +9,7 @@#include <linux/of_irq.h> #include <linux/of_address.h> +#include <linux/interrupt.h> #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,
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 5/19 crypto: cavium: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- 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(-)
drivers/crypto/cavium/cpt/cptvf_main.c +4 -5
@@ -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; }
drivers/crypto/cavium/nitrox/nitrox_common.h +1 -1
@@ -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,
drivers/crypto/cavium/nitrox/nitrox_isr.c +5 -8
@@ -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 ;
drivers/crypto/cavium/nitrox/nitrox_reqmgr.c +2 -2
@@ -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;
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 6/19 crypto: ccp: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- 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(-)
drivers/crypto/ccp/ccp-dev-v3.c +4 -5
@@ -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 */
drivers/crypto/ccp/ccp-dev-v5.c +4 -5
@@ -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 */
drivers/crypto/ccp/ccp-dmaengine.c +3 -4
@@ -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);
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 7/19 crypto: ccree: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/ccree/cc_fips.c | 8 ++++---- drivers/crypto/ccree/cc_request_mgr.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-)
drivers/crypto/ccree/cc_fips.c +4 -4
@@ -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);
drivers/crypto/ccree/cc_request_mgr.c +6 -6
@@ -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;
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 8/19 crypto: hifn_795x: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/hifn_795x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/hifn_795x.c +3 -3
@@ -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 );
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 9/19 crypto: img-hash: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/img-hash.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/img-hash.c +6 -6
@@ -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 );
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 10/19 crypto: ixp4xx: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/ixp4xx_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/crypto/ixp4xx_crypto.c +2 -2
@@ -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 ;
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 11/19 crypto: mediatek: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/mediatek/mtk-aes.c | 14 ++++++-------- drivers/crypto/mediatek/mtk-sha.c | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-)
drivers/crypto/mediatek/mtk-aes.c +6 -8
@@ -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 */
drivers/crypto/mediatek/mtk-sha.c +6 -8
@@ -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 */
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 12/19 crypto: omap: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- 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(-)
drivers/crypto/omap-aes.c +3 -3
@@ -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 ) {
drivers/crypto/omap-des.c +3 -3
@@ -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 ) {
drivers/crypto/omap-sham.c +3 -3
@@ -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) :
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 13/19 crypto: picoxcell: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/picoxcell_crypto.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/crypto/picoxcell_crypto.c +3 -4
@@ -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);
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 14/19 crypto: qat: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- 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(-)
drivers/crypto/qat/qat_common/adf_isr.c +2 -3
@@ -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 ; }
drivers/crypto/qat/qat_common/adf_sriov.c +5 -5
@@ -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,
drivers/crypto/qat/qat_common/adf_transport.c +2 -2
@@ -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 */
drivers/crypto/qat/qat_common/adf_transport_internal.h +1 -1
@@ -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 <linux/debugfs.h> int adf_bank_debugfs_add (struct adf_etr_bank_data *bank);
drivers/crypto/qat/qat_common/adf_vf_isr.c +5 -6
@@ -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 ; }
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 15/19 crypto: qce: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/qce/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/crypto/qce/core.c +3 -4
@@ -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;
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 16/19 crypto: rockchip: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/rockchip/rk3288_crypto.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/crypto/rockchip/rk3288_crypto.c +6 -8
@@ -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;
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 17/19 crypto: s5p: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/s5p-sss.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/crypto/s5p-sss.c +6 -7
@@ -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);
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 18/19 crypto: talitos: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/talitos.c | 42 ++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-)
drivers/crypto/talitos.c +19 -23
@@ -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); } }
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
PATCH v5 19/19 crypto: octeontx: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/crypto/marvell/octeontx/otx_cptvf_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/crypto/marvell/octeontx/otx_cptvf_main.c +6 -6
@@ -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;
Signature · 7 lines
2.25.1 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Quoted 8 lines
From: Allen Pais <[email protected]>
Commit
12cc923f1ccc("tasklet: Introduce new initialization API") introduced a new tasklet initialization API. This series converts all the crypto modules to use the newtasklet_setup()APIThe series is based on v5.11-rc4 (
19c329f68089)
I missed updating this bit. The series is based on
v5.11-rc7 (92bf22614b21).
Thanks.
Quoted 62 lines
v5:
- Fix amcc build failure.v4:
- added acks
- fixed checkpatch errors(Giovanni Cabiddu)v3:
- fixed rockchip driver(Emil Renner Berthing)v2:
- added acks
- addressed comments [Krzysztof and Gilad]Allen Pais (19):
crypto: amcc: convert tasklets to use newtasklet_setup()API
crypto: atmel: convert tasklets to use newtasklet_setup()API
crypto: axis: convert tasklets to use newtasklet_setup()API
crypto: caam: convert tasklets to use newtasklet_setup()API
crypto: cavium: convert tasklets to use newtasklet_setup()API
crypto: ccp: convert tasklets to use newtasklet_setup()API
crypto: ccree: convert tasklets to use newtasklet_setup()API
crypto:hifn_795x: convert tasklets to use newtasklet_setup()API
crypto: img-hash: convert tasklets to use newtasklet_setup()API
crypto: ixp4xx: convert tasklets to use newtasklet_setup()API
crypto: mediatek: convert tasklets to use newtasklet_setup()API
crypto: omap: convert tasklets to use newtasklet_setup()API
crypto: picoxcell: convert tasklets to use newtasklet_setup()API
crypto: qat: convert tasklets to use newtasklet_setup()API
crypto: qce: convert tasklets to use newtasklet_setup()API
crypto: rockchip: convert tasklets to use newtasklet_setup()API
crypto: s5p: convert tasklets to use newtasklet_setup()API
crypto: talitos: convert tasklets to use newtasklet_setup()API
crypto: octeontx: convert tasklets to use newtasklet_setup()APIdrivers/crypto/amcc/crypto4xx_core.c | 10 ++--- drivers/crypto/atmel-aes.c | 14 +++---- drivers/crypto/atmel-sha.c | 14 +++---- drivers/crypto/atmel-tdes.c | 14 +++---- drivers/crypto/axis/artpec6_crypto.c | 7 ++-- drivers/crypto/caam/jr.c | 9 ++-- 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 +- drivers/crypto/ccp/ccp-dev-v3.c | 9 ++-- drivers/crypto/ccp/ccp-dev-v5.c | 9 ++-- drivers/crypto/ccp/ccp-dmaengine.c | 7 ++-- drivers/crypto/ccree/cc_fips.c | 8 ++-- drivers/crypto/ccree/cc_request_mgr.c | 12 +++--- drivers/crypto/hifn_795x.c | 6 +-- drivers/crypto/img-hash.c | 12 +++--- drivers/crypto/ixp4xx_crypto.c | 4 +- .../crypto/marvell/octeontx/otx_cptvf_main.c | 12 +++--- drivers/crypto/mediatek/mtk-aes.c | 14 +++---- drivers/crypto/mediatek/mtk-sha.c | 14 +++---- drivers/crypto/omap-aes.c | 6 +-- drivers/crypto/omap-des.c | 6 +-- drivers/crypto/omap-sham.c | 6 +-- drivers/crypto/picoxcell_crypto.c | 7 ++-- drivers/crypto/qat/qat_common/adf_isr.c | 5 +-- drivers/crypto/qat/qat_common/adf_sriov.c | 10 ++---
Quoted 9 lines
drivers/crypto/qat/qat_common/adf_transport.c | 4 +- .../qat/qat_common/adf_transport_internal.h | 2 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 11 +++-- drivers/crypto/qce/core.c | 7 ++-- drivers/crypto/rockchip/rk3288_crypto.c | 14 +++---- drivers/crypto/s5p-sss.c | 13 +++--- drivers/crypto/talitos.c | 42 +++++++++---------- 34 files changed, 154 insertions(+), 182 deletions(-)
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip