From: Corentin Labbe <clabbe.montjoie@gmail.com> To: alexandre.torgue@st.com, davem@davemloft.net, herbert@gondor.apana.org.au, mcoquelin.stm32@gmail.com, mripard@kernel.org, wens@csie.org, iuliana.prodan@nxp.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com Cc: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@googlegroups.com, Corentin Labbe <clabbe.montjoie@gmail.com> Subject: [PATCH RFC 04/10] crypto: sun8i-ce: introduce the slot number Date: Tue, 14 Jan 2020 14:59:30 +0100 [thread overview] Message-ID: <20200114135936.32422-5-clabbe.montjoie@gmail.com> (raw) In-Reply-To: <20200114135936.32422-1-clabbe.montjoie@gmail.com> This patch adds the slot position, for choosing which task in the task list should be prepared/unprepared. The slot is for the moment is always 0 until the infrastructure will handle non 0 value. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 6 ++++-- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c index 401f39f144ea..9c1f6c9eaaf9 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c @@ -96,6 +96,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req int flow, i; int nr_sgs = 0; int nr_sgd = 0; + int slot = 0; int err = 0; algt = container_of(alg, struct sun8i_ce_alg_template, alg.skcipher); @@ -114,7 +115,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req chan = &ce->chanlist[flow]; - cet = chan->tl; + cet = &chan->tl[slot]; memset(cet, 0, sizeof(struct ce_task)); cet->t_id = cpu_to_le32(flow); @@ -301,11 +302,12 @@ static int sun8i_ce_cipher_unprepare(struct crypto_engine *engine, void *async_r unsigned int ivsize, offset; int nr_sgs = rctx->nr_sgs; int nr_sgd = rctx->nr_sgd; + int slot = 0; int flow; flow = rctx->flow; chan = &ce->chanlist[flow]; - cet = chan->tl; + cet = &chan->tl[slot]; ivsize = crypto_skcipher_ivsize(tfm); if (areq->src == areq->dst) { diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index e8bf7bf31061..bd355f4b95f3 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c @@ -120,7 +120,7 @@ int sun8i_ce_run_task(struct sun8i_ce_dev *ce, int flow, const char *name) /* Be sure all data is written before enabling the task */ wmb(); - v = 1 | (ce->chanlist[flow].tl->t_common_ctl & 0x7F) << 8; + v = 1 | (ce->chanlist[flow].tl[0].t_common_ctl & 0x7F) << 8; writel(v, ce->base + CE_TLR); mutex_unlock(&ce->mlock); -- 2.24.1
WARNING: multiple messages have this Message-ID (diff)
From: Corentin Labbe <clabbe.montjoie@gmail.com> To: alexandre.torgue@st.com, davem@davemloft.net, herbert@gondor.apana.org.au, mcoquelin.stm32@gmail.com, mripard@kernel.org, wens@csie.org, iuliana.prodan@nxp.com, horia.geanta@nxp.com, aymen.sghaier@nxp.com Cc: linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe <clabbe.montjoie@gmail.com>, linux-crypto@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH RFC 04/10] crypto: sun8i-ce: introduce the slot number Date: Tue, 14 Jan 2020 14:59:30 +0100 [thread overview] Message-ID: <20200114135936.32422-5-clabbe.montjoie@gmail.com> (raw) In-Reply-To: <20200114135936.32422-1-clabbe.montjoie@gmail.com> This patch adds the slot position, for choosing which task in the task list should be prepared/unprepared. The slot is for the moment is always 0 until the infrastructure will handle non 0 value. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 6 ++++-- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c index 401f39f144ea..9c1f6c9eaaf9 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c @@ -96,6 +96,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req int flow, i; int nr_sgs = 0; int nr_sgd = 0; + int slot = 0; int err = 0; algt = container_of(alg, struct sun8i_ce_alg_template, alg.skcipher); @@ -114,7 +115,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req chan = &ce->chanlist[flow]; - cet = chan->tl; + cet = &chan->tl[slot]; memset(cet, 0, sizeof(struct ce_task)); cet->t_id = cpu_to_le32(flow); @@ -301,11 +302,12 @@ static int sun8i_ce_cipher_unprepare(struct crypto_engine *engine, void *async_r unsigned int ivsize, offset; int nr_sgs = rctx->nr_sgs; int nr_sgd = rctx->nr_sgd; + int slot = 0; int flow; flow = rctx->flow; chan = &ce->chanlist[flow]; - cet = chan->tl; + cet = &chan->tl[slot]; ivsize = crypto_skcipher_ivsize(tfm); if (areq->src == areq->dst) { diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index e8bf7bf31061..bd355f4b95f3 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c @@ -120,7 +120,7 @@ int sun8i_ce_run_task(struct sun8i_ce_dev *ce, int flow, const char *name) /* Be sure all data is written before enabling the task */ wmb(); - v = 1 | (ce->chanlist[flow].tl->t_common_ctl & 0x7F) << 8; + v = 1 | (ce->chanlist[flow].tl[0].t_common_ctl & 0x7F) << 8; writel(v, ce->base + CE_TLR); mutex_unlock(&ce->mlock); -- 2.24.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-01-14 14:00 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-14 13:59 [PATCH RFC 00/10] crypto: engine: permit to batch requests Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-14 13:59 ` [PATCH RFC 01/10] crypto: sun8i-ce: move iv data to request context Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-14 13:59 ` [PATCH RFC 02/10] crypto: sun8i-ce: increase task list size Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-14 13:59 ` [PATCH RFC 03/10] crypto: sun8i-ce: split into prepare/run/unprepare Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe [this message] 2020-01-14 13:59 ` [PATCH RFC 04/10] crypto: sun8i-ce: introduce the slot number Corentin Labbe 2020-01-14 13:59 ` [PATCH RFC 05/10] crypto: engine: transform cur_req in an array Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-16 11:34 ` Iuliana Prodan 2020-01-16 11:34 ` Iuliana Prodan 2020-01-14 13:59 ` [PATCH RFC 06/10] crypto: engine: introduce ct Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-16 11:34 ` Iuliana Prodan 2020-01-16 11:34 ` Iuliana Prodan 2020-01-16 13:21 ` Corentin Labbe 2020-01-16 13:21 ` Corentin Labbe 2020-01-14 13:59 ` [PATCH RFC 07/10] crypto: sun8i-ce: handle slot > 0 Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-14 13:59 ` [PATCH RFC 08/10] crypto: engine: add slot parameter Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-14 13:59 ` [PATCH RFC 09/10] crypto: engine: permit to batch requests Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-16 11:34 ` Iuliana Prodan 2020-01-16 11:34 ` Iuliana Prodan 2020-01-17 16:13 ` Iuliana Prodan 2020-01-17 16:13 ` Iuliana Prodan 2020-01-14 13:59 ` [PATCH RFC 10/10] crypto: sun8i-ce: use the new batch mechanism Corentin Labbe 2020-01-14 13:59 ` Corentin Labbe 2020-01-16 11:33 ` [PATCH RFC 00/10] crypto: engine: permit to batch requests Iuliana Prodan 2020-01-16 11:33 ` Iuliana Prodan 2020-01-16 13:16 ` Corentin Labbe 2020-01-16 13:16 ` Corentin Labbe
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200114135936.32422-5-clabbe.montjoie@gmail.com \ --to=clabbe.montjoie@gmail.com \ --cc=alexandre.torgue@st.com \ --cc=aymen.sghaier@nxp.com \ --cc=davem@davemloft.net \ --cc=herbert@gondor.apana.org.au \ --cc=horia.geanta@nxp.com \ --cc=iuliana.prodan@nxp.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-crypto@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=linux-sunxi@googlegroups.com \ --cc=mcoquelin.stm32@gmail.com \ --cc=mripard@kernel.org \ --cc=wens@csie.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.