From: kernel test robot <lkp@intel.com>
To: Alexey Romanov <avromanov@salutedevices.com>,
neil.armstrong@linaro.org, clabbe@baylibre.com,
herbert@gondor.apana.org.au, davem@davemloft.net,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
krzk+dt@kernel.org, conor+dt@kernel.org, khilman@baylibre.com,
jbrunet@baylibre.com, martin.blumenstingl@googlemail.com,
vadim.fedorenko@linux.dev
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-crypto@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, kernel@salutedevices.com,
Alexey Romanov <avromanov@salutedevices.com>
Subject: Re: [PATCH v10 09/22] crypto: amlogic - Process more than MAXDESCS descriptors
Date: Sat, 9 Nov 2024 03:08:22 +0800 [thread overview]
Message-ID: <202411090235.a7vEgZQo-lkp@intel.com> (raw)
In-Reply-To: <20241108102907.1788584-10-avromanov@salutedevices.com>
Hi Alexey,
kernel test robot noticed the following build warnings:
[auto build test WARNING on herbert-cryptodev-2.6/master]
[also build test WARNING on next-20241108]
[cannot apply to herbert-crypto-2.6/master robh/for-next linus/master v6.12-rc6]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Alexey-Romanov/crypto-amlogic-Don-t-hardcode-IRQ-count/20241108-183503
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/20241108102907.1788584-10-avromanov%40salutedevices.com
patch subject: [PATCH v10 09/22] crypto: amlogic - Process more than MAXDESCS descriptors
config: x86_64-buildonly-randconfig-002-20241109 (https://download.01.org/0day-ci/archive/20241109/202411090235.a7vEgZQo-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241109/202411090235.a7vEgZQo-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411090235.a7vEgZQo-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/crypto/amlogic/amlogic-gxl-cipher.c:14:
In file included from include/crypto/scatterwalk.h:16:
In file included from include/linux/highmem.h:8:
In file included from include/linux/cacheflush.h:5:
In file included from arch/x86/include/asm/cacheflush.h:5:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/crypto/amlogic/amlogic-gxl-cipher.c:235:13: warning: variable 'new_iv_phys' set but not used [-Wunused-but-set-variable]
235 | dma_addr_t new_iv_phys;
| ^
2 warnings generated.
vim +/new_iv_phys +235 drivers/crypto/amlogic/amlogic-gxl-cipher.c
220
221 static int meson_kick_hardware(struct cipher_ctx *ctx)
222 {
223 struct meson_cipher_req_ctx *rctx = skcipher_request_ctx(ctx->areq);
224 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(ctx->areq);
225 struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm);
226 struct skcipher_alg *alg = crypto_skcipher_alg(tfm);
227 struct meson_alg_template *algt = container_of(alg,
228 struct meson_alg_template,
229 alg.skcipher.base);
230 struct meson_dev *mc = op->mc;
231 unsigned int ivsize = crypto_skcipher_ivsize(tfm);
232 unsigned int blockmode = algt->blockmode;
233 enum dma_data_direction new_iv_dir;
234 struct scatterlist *sg_head;
> 235 dma_addr_t new_iv_phys;
236 void *new_iv;
237 int err;
238
239 if (blockmode == DESC_OPMODE_CBC) {
240 struct scatterlist *sg_current;
241 unsigned int offset;
242
243 if (rctx->op_dir == MESON_ENCRYPT) {
244 sg_current = ctx->dst_sg;
245 sg_head = ctx->areq->dst;
246 offset = ctx->dst_offset;
247 new_iv_dir = DMA_FROM_DEVICE;
248 } else {
249 sg_current = ctx->src_sg;
250 sg_head = ctx->areq->src;
251 offset = ctx->src_offset;
252 new_iv_dir = DMA_TO_DEVICE;
253 }
254
255 if (ctx->areq->src == ctx->areq->dst)
256 new_iv_dir = DMA_BIDIRECTIONAL;
257
258 offset -= ivsize;
259 new_iv = sg_virt(sg_current) + offset;
260 new_iv_phys = sg_dma_address(sg_current) + offset;
261 }
262
263 if (blockmode == DESC_OPMODE_CBC &&
264 rctx->op_dir == MESON_DECRYPT) {
265 dma_sync_sg_for_cpu(mc->dev, sg_head,
266 sg_nents(sg_head), new_iv_dir);
267 memcpy(ctx->areq->iv, new_iv, ivsize);
268 }
269
270 reinit_completion(&mc->chanlist[rctx->flow].complete);
271 meson_dma_start(mc, rctx->flow);
272 err = wait_for_completion_interruptible_timeout(&mc->chanlist[rctx->flow].complete,
273 msecs_to_jiffies(500));
274 if (err == 0) {
275 dev_err(mc->dev, "DMA timeout for flow %d\n", rctx->flow);
276 return -EINVAL;
277 } else if (err < 0) {
278 dev_err(mc->dev, "Waiting for DMA completion is failed (%d)\n", err);
279 return err;
280 }
281
282 if (blockmode == DESC_OPMODE_CBC &&
283 rctx->op_dir == MESON_ENCRYPT) {
284 dma_sync_sg_for_cpu(mc->dev, sg_head,
285 sg_nents(sg_head), new_iv_dir);
286 memcpy(ctx->areq->iv, new_iv, ivsize);
287 }
288
289 ctx->tloffset = 0;
290
291 return 0;
292 }
293
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-11-08 19:09 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20241108102907.1788584-10-avromanov@salutedevices.com>]
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=202411090235.a7vEgZQo-lkp@intel.com \
--to=lkp@intel.com \
--cc=avromanov@salutedevices.com \
--cc=clabbe@baylibre.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=jbrunet@baylibre.com \
--cc=kernel@salutedevices.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh+dt@kernel.org \
--cc=vadim.fedorenko@linux.dev \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox