[PATCH 2/2] nvme: convert metadata mapping to dma iter
kernel test robot
lkp at intel.com
Thu Jun 26 06:55:20 PDT 2025
Hi Keith,
kernel test robot noticed the following build errors:
[auto build test ERROR on axboe-block/for-next]
[also build test ERROR on next-20250626]
[cannot apply to linux-nvme/for-next hch-configfs/for-next linus/master v6.16-rc3]
[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/Keith-Busch/nvme-convert-metadata-mapping-to-dma-iter/20250626-044623
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link: https://lore.kernel.org/r/20250625204445.1802483-2-kbusch%40meta.com
patch subject: [PATCH 2/2] nvme: convert metadata mapping to dma iter
config: i386-buildonly-randconfig-002-20250626 (https://download.01.org/0day-ci/archive/20250626/202506262128.hNOOLoxM-lkp@intel.com/config)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250626/202506262128.hNOOLoxM-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506262128.hNOOLoxM-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/nvme/host/pci.c:1023:7: error: call to undeclared function 'blk_rq_integrity_dma_map_iter_start'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1023 | if (!blk_rq_integrity_dma_map_iter_start(req, dev->dev, &iter))
| ^
drivers/nvme/host/pci.c:1023:7: note: did you mean 'blk_rq_dma_map_iter_start'?
include/linux/blk-mq-dma.h:21:6: note: 'blk_rq_dma_map_iter_start' declared here
21 | bool blk_rq_dma_map_iter_start(struct request *req, struct device *dma_dev,
| ^
>> drivers/nvme/host/pci.c:1041:11: error: call to undeclared function 'blk_rq_integrity_dma_map_iter_next'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1041 | } while (blk_rq_integrity_dma_map_iter_next(req, dev->dev, &iter));
| ^
drivers/nvme/host/pci.c:3336:41: warning: shift count >= width of type [-Wshift-count-overflow]
3336 | dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
| ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:73:54: note: expanded from macro 'DMA_BIT_MASK'
73 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
| ^ ~~~
1 warning and 2 errors generated.
vim +/blk_rq_integrity_dma_map_iter_start +1023 drivers/nvme/host/pci.c
1012
1013 static blk_status_t nvme_pci_setup_meta_sgls(struct request *req)
1014 {
1015 struct nvme_queue *nvmeq = req->mq_hctx->driver_data;
1016 struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
1017 struct nvme_dev *dev = nvmeq->dev;
1018 struct nvme_sgl_desc *sg_list;
1019 struct blk_dma_iter iter;
1020 dma_addr_t sgl_dma;
1021 int i = 0;
1022
> 1023 if (!blk_rq_integrity_dma_map_iter_start(req, dev->dev, &iter))
1024 return iter.status;
1025
1026 sg_list = dma_pool_alloc(nvmeq->descriptor_pools.small, GFP_ATOMIC,
1027 &sgl_dma);
1028 if (!sg_list)
1029 return BLK_STS_RESOURCE;
1030
1031 iod->meta_descriptor = sg_list;
1032 iod->meta_dma = sgl_dma;
1033
1034 iod->cmd.common.flags = NVME_CMD_SGL_METASEG;
1035 iod->cmd.common.metadata = cpu_to_le64(sgl_dma);
1036
1037 sgl_dma += sizeof(*sg_list);
1038
1039 do {
1040 nvme_pci_sgl_set_data(&sg_list[++i], &iter);
> 1041 } while (blk_rq_integrity_dma_map_iter_next(req, dev->dev, &iter));
1042
1043 nvme_pci_sgl_set_seg(sg_list, sgl_dma, i);
1044 iod->nr_meta_descriptors = i;
1045 return BLK_STS_OK;
1046 }
1047
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-nvme
mailing list