[PATCH v2] tpm: ibmvtpm: Make use of dma_alloc_noncoherent()
kernel test robot
lkp at intel.com
Sat Nov 13 04:12:23 AEDT 2021
Hi Cai,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.15 next-20211112]
[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]
url: https://github.com/0day-ci/linux/commits/Cai-Huoqing/tpm-ibmvtpm-Make-use-of-dma_alloc_noncoherent/20211012-112627
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-r026-20211027 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/8ef2c12d78e4782c08edad107067859612cdb39e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cai-Huoqing/tpm-ibmvtpm-Make-use-of-dma_alloc_noncoherent/20211012-112627
git checkout 8ef2c12d78e4782c08edad107067859612cdb39e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
drivers/char/tpm/tpm_ibmvtpm.c: In function 'tpm_ibmvtpm_remove':
>> drivers/char/tpm/tpm_ibmvtpm.c:359:62: error: 'crq_q' undeclared (first use in this function)
359 | dma_free_noncoherent(ibmvtpm->dev, CRQ_RES_BUF_SIZE, crq_q->crq_addr,
| ^~~~~
drivers/char/tpm/tpm_ibmvtpm.c:359:62: note: each undeclared identifier is reported only once for each function it appears in
drivers/char/tpm/tpm_ibmvtpm.c: In function 'tpm_ibmvtpm_probe':
>> drivers/char/tpm/tpm_ibmvtpm.c:690:51: error: 'struct ibmvtpm_crq_queue' has no member named 'crq_dma_handle'
690 | crq_q->crq_dma_handle, DMA_BIDIRECTIONAL);
| ^~
vim +/crq_q +359 drivers/char/tpm/tpm_ibmvtpm.c
336
337 /**
338 * tpm_ibmvtpm_remove - ibm vtpm remove entry point
339 * @vdev: vio device struct
340 *
341 * Return: Always 0.
342 */
343 static void tpm_ibmvtpm_remove(struct vio_dev *vdev)
344 {
345 struct tpm_chip *chip = dev_get_drvdata(&vdev->dev);
346 struct ibmvtpm_dev *ibmvtpm = dev_get_drvdata(&chip->dev);
347 int rc = 0;
348
349 tpm_chip_unregister(chip);
350
351 free_irq(vdev->irq, ibmvtpm);
352
353 do {
354 if (rc)
355 msleep(100);
356 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
357 } while (rc == H_BUSY || H_IS_LONG_BUSY(rc));
358
> 359 dma_free_noncoherent(ibmvtpm->dev, CRQ_RES_BUF_SIZE, crq_q->crq_addr,
360 crq_q->crq_dma_handle, DMA_BIDIRECTIONAL);
361
362 if (ibmvtpm->rtce_buf)
363 dma_free_noncoherent(ibmvtpm->dev,
364 ibmvtpm->rtce_size, ibmvtpm->rtce_buf,
365 ibmvtpm->rtce_dma_handle, DMA_BIDIRECTIONAL);
366
367 kfree(ibmvtpm);
368 /* For tpm_ibmvtpm_get_desired_dma */
369 dev_set_drvdata(&vdev->dev, NULL);
370 }
371
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 41371 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20211113/4bf5e671/attachment-0001.gz>
More information about the Linuxppc-dev
mailing list