From: kernel test robot <lkp@intel.com>
To: Barry Song <21cnbao@gmail.com>,
catalin.marinas@arm.com, m.szyprowski@samsung.com,
robin.murphy@arm.com, will@kernel.org
Cc: v-songbaohua@oppo.com, zhengtangquan@oppo.com,
ryan.roberts@arm.com, anshuman.khandual@arm.com, maz@kernel.org,
llvm@lists.linux.dev, linux-kernel@vger.kernel.org,
iommu@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
surenb@google.com, ardb@kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/6] dma-mapping: Allow batched DMA sync operations if supported by the arch
Date: Sat, 20 Dec 2025 18:37:38 +0100 [thread overview]
Message-ID: <202512201836.f6KX6WMH-lkp@intel.com> (raw)
In-Reply-To: <20251219053658.84978-6-21cnbao@gmail.com>
Hi Barry,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on next-20251219]
[cannot apply to arm64/for-next/core v6.16-rc1]
[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/Barry-Song/arm64-Provide-dcache_by_myline_op_nosync-helper/20251219-195810
base: linus/master
patch link: https://lore.kernel.org/r/20251219053658.84978-6-21cnbao%40gmail.com
patch subject: [PATCH 5/6] dma-mapping: Allow batched DMA sync operations if supported by the arch
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251220/202512201836.f6KX6WMH-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251220/202512201836.f6KX6WMH-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/202512201836.f6KX6WMH-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/dma/direct.c:456:4: error: call to undeclared function 'dma_direct_unmap_phys_batch_add'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
456 | dma_direct_unmap_phys_batch_add(dev, sg->dma_address,
| ^
kernel/dma/direct.c:456:4: note: did you mean 'dma_direct_unmap_phys'?
kernel/dma/direct.h:188:20: note: 'dma_direct_unmap_phys' declared here
188 | static inline void dma_direct_unmap_phys(struct device *dev, dma_addr_t addr,
| ^
>> kernel/dma/direct.c:484:22: error: call to undeclared function 'dma_direct_map_phys_batch_add'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
484 | sg->dma_address = dma_direct_map_phys_batch_add(dev, sg_phys(sg),
| ^
2 errors generated.
vim +/dma_direct_unmap_phys_batch_add +456 kernel/dma/direct.c
439
440 /*
441 * Unmaps segments, except for ones marked as pci_p2pdma which do not
442 * require any further action as they contain a bus address.
443 */
444 void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sgl,
445 int nents, enum dma_data_direction dir, unsigned long attrs)
446 {
447 struct scatterlist *sg;
448 int i;
449 bool need_sync = false;
450
451 for_each_sg(sgl, sg, nents, i) {
452 if (sg_dma_is_bus_address(sg)) {
453 sg_dma_unmark_bus_address(sg);
454 } else {
455 need_sync = true;
> 456 dma_direct_unmap_phys_batch_add(dev, sg->dma_address,
457 sg_dma_len(sg), dir, attrs);
458 }
459 }
460 if (need_sync && !dev_is_dma_coherent(dev))
461 arch_sync_dma_batch_flush();
462 }
463 #endif
464
465 int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
466 enum dma_data_direction dir, unsigned long attrs)
467 {
468 struct pci_p2pdma_map_state p2pdma_state = {};
469 struct scatterlist *sg;
470 int i, ret;
471 bool need_sync = false;
472
473 for_each_sg(sgl, sg, nents, i) {
474 switch (pci_p2pdma_state(&p2pdma_state, dev, sg_page(sg))) {
475 case PCI_P2PDMA_MAP_THRU_HOST_BRIDGE:
476 /*
477 * Any P2P mapping that traverses the PCI host bridge
478 * must be mapped with CPU physical address and not PCI
479 * bus addresses.
480 */
481 break;
482 case PCI_P2PDMA_MAP_NONE:
483 need_sync = true;
> 484 sg->dma_address = dma_direct_map_phys_batch_add(dev, sg_phys(sg),
485 sg->length, dir, attrs);
486 if (sg->dma_address == DMA_MAPPING_ERROR) {
487 ret = -EIO;
488 goto out_unmap;
489 }
490 break;
491 case PCI_P2PDMA_MAP_BUS_ADDR:
492 sg->dma_address = pci_p2pdma_bus_addr_map(
493 p2pdma_state.mem, sg_phys(sg));
494 sg_dma_len(sg) = sg->length;
495 sg_dma_mark_bus_address(sg);
496 continue;
497 default:
498 ret = -EREMOTEIO;
499 goto out_unmap;
500 }
501 sg_dma_len(sg) = sg->length;
502 }
503
504 if (need_sync && !dev_is_dma_coherent(dev))
505 arch_sync_dma_batch_flush();
506 return nents;
507
508 out_unmap:
509 dma_direct_unmap_sg(dev, sgl, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC);
510 return ret;
511 }
512
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Barry Song <21cnbao@gmail.com>,
catalin.marinas@arm.com, m.szyprowski@samsung.com,
robin.murphy@arm.com, will@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
ada.coupriediaz@arm.com, anshuman.khandual@arm.com,
ardb@kernel.org, iommu@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, maz@kernel.org,
ryan.roberts@arm.com, surenb@google.com, v-songbaohua@oppo.com,
zhengtangquan@oppo.com
Subject: Re: [PATCH 5/6] dma-mapping: Allow batched DMA sync operations if supported by the arch
Date: Sat, 20 Dec 2025 18:37:38 +0100 [thread overview]
Message-ID: <202512201836.f6KX6WMH-lkp@intel.com> (raw)
In-Reply-To: <20251219053658.84978-6-21cnbao@gmail.com>
Hi Barry,
kernel test robot noticed the following build errors:
[auto build test ERROR on linus/master]
[also build test ERROR on next-20251219]
[cannot apply to arm64/for-next/core v6.16-rc1]
[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/Barry-Song/arm64-Provide-dcache_by_myline_op_nosync-helper/20251219-195810
base: linus/master
patch link: https://lore.kernel.org/r/20251219053658.84978-6-21cnbao%40gmail.com
patch subject: [PATCH 5/6] dma-mapping: Allow batched DMA sync operations if supported by the arch
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251220/202512201836.f6KX6WMH-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251220/202512201836.f6KX6WMH-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/202512201836.f6KX6WMH-lkp@intel.com/
All errors (new ones prefixed by >>):
>> kernel/dma/direct.c:456:4: error: call to undeclared function 'dma_direct_unmap_phys_batch_add'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
456 | dma_direct_unmap_phys_batch_add(dev, sg->dma_address,
| ^
kernel/dma/direct.c:456:4: note: did you mean 'dma_direct_unmap_phys'?
kernel/dma/direct.h:188:20: note: 'dma_direct_unmap_phys' declared here
188 | static inline void dma_direct_unmap_phys(struct device *dev, dma_addr_t addr,
| ^
>> kernel/dma/direct.c:484:22: error: call to undeclared function 'dma_direct_map_phys_batch_add'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
484 | sg->dma_address = dma_direct_map_phys_batch_add(dev, sg_phys(sg),
| ^
2 errors generated.
vim +/dma_direct_unmap_phys_batch_add +456 kernel/dma/direct.c
439
440 /*
441 * Unmaps segments, except for ones marked as pci_p2pdma which do not
442 * require any further action as they contain a bus address.
443 */
444 void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sgl,
445 int nents, enum dma_data_direction dir, unsigned long attrs)
446 {
447 struct scatterlist *sg;
448 int i;
449 bool need_sync = false;
450
451 for_each_sg(sgl, sg, nents, i) {
452 if (sg_dma_is_bus_address(sg)) {
453 sg_dma_unmark_bus_address(sg);
454 } else {
455 need_sync = true;
> 456 dma_direct_unmap_phys_batch_add(dev, sg->dma_address,
457 sg_dma_len(sg), dir, attrs);
458 }
459 }
460 if (need_sync && !dev_is_dma_coherent(dev))
461 arch_sync_dma_batch_flush();
462 }
463 #endif
464
465 int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
466 enum dma_data_direction dir, unsigned long attrs)
467 {
468 struct pci_p2pdma_map_state p2pdma_state = {};
469 struct scatterlist *sg;
470 int i, ret;
471 bool need_sync = false;
472
473 for_each_sg(sgl, sg, nents, i) {
474 switch (pci_p2pdma_state(&p2pdma_state, dev, sg_page(sg))) {
475 case PCI_P2PDMA_MAP_THRU_HOST_BRIDGE:
476 /*
477 * Any P2P mapping that traverses the PCI host bridge
478 * must be mapped with CPU physical address and not PCI
479 * bus addresses.
480 */
481 break;
482 case PCI_P2PDMA_MAP_NONE:
483 need_sync = true;
> 484 sg->dma_address = dma_direct_map_phys_batch_add(dev, sg_phys(sg),
485 sg->length, dir, attrs);
486 if (sg->dma_address == DMA_MAPPING_ERROR) {
487 ret = -EIO;
488 goto out_unmap;
489 }
490 break;
491 case PCI_P2PDMA_MAP_BUS_ADDR:
492 sg->dma_address = pci_p2pdma_bus_addr_map(
493 p2pdma_state.mem, sg_phys(sg));
494 sg_dma_len(sg) = sg->length;
495 sg_dma_mark_bus_address(sg);
496 continue;
497 default:
498 ret = -EREMOTEIO;
499 goto out_unmap;
500 }
501 sg_dma_len(sg) = sg->length;
502 }
503
504 if (need_sync && !dev_is_dma_coherent(dev))
505 arch_sync_dma_batch_flush();
506 return nents;
507
508 out_unmap:
509 dma_direct_unmap_sg(dev, sgl, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC);
510 return ret;
511 }
512
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-12-20 17:38 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 5:36 [PATCH 0/6] dma-mapping: arm64: support batched cache sync Barry Song
2025-12-19 5:36 ` Barry Song
2025-12-19 5:36 ` [PATCH 1/6] arm64: Provide dcache_by_myline_op_nosync helper Barry Song
2025-12-19 5:36 ` Barry Song
2025-12-19 12:20 ` Robin Murphy
2025-12-19 12:20 ` Robin Murphy
2025-12-21 7:22 ` Barry Song
2025-12-21 7:22 ` Barry Song
2025-12-19 5:36 ` [PATCH 2/6] arm64: Provide dcache_clean_poc_nosync helper Barry Song
2025-12-19 5:36 ` Barry Song
2025-12-19 5:36 ` [PATCH 3/6] arm64: Provide dcache_inval_poc_nosync helper Barry Song
2025-12-19 5:36 ` Barry Song
2025-12-19 12:34 ` Robin Murphy
2025-12-19 12:34 ` Robin Murphy
2025-12-21 7:59 ` Barry Song
2025-12-21 7:59 ` Barry Song
2025-12-19 5:36 ` [PATCH 4/6] arm64: Provide arch_sync_dma_ batched helpers Barry Song
2025-12-19 5:36 ` Barry Song
2025-12-19 5:36 ` [PATCH 5/6] dma-mapping: Allow batched DMA sync operations if supported by the arch Barry Song
2025-12-19 5:36 ` Barry Song
2025-12-20 17:37 ` kernel test robot [this message]
2025-12-20 17:37 ` kernel test robot
2025-12-21 5:15 ` Barry Song
2025-12-21 5:15 ` Barry Song
2025-12-21 11:55 ` Leon Romanovsky
2025-12-21 11:55 ` Leon Romanovsky
2025-12-21 19:24 ` Barry Song
2025-12-21 19:24 ` Barry Song
2025-12-22 8:49 ` Leon Romanovsky
2025-12-22 8:49 ` Leon Romanovsky
2025-12-23 0:02 ` Barry Song
2025-12-23 0:02 ` Barry Song
2025-12-23 2:36 ` Barry Song
2025-12-23 2:36 ` Barry Song
2025-12-23 14:14 ` Leon Romanovsky
2025-12-23 14:14 ` Leon Romanovsky
2025-12-24 1:29 ` Barry Song
2025-12-24 1:29 ` Barry Song
2025-12-24 8:51 ` Leon Romanovsky
2025-12-24 8:51 ` Leon Romanovsky
2025-12-25 5:45 ` Barry Song
2025-12-25 5:45 ` Barry Song
2025-12-25 12:36 ` Leon Romanovsky
2025-12-25 12:36 ` Leon Romanovsky
2025-12-25 13:31 ` Barry Song
2025-12-25 13:31 ` Barry Song
2025-12-25 13:40 ` Leon Romanovsky
2025-12-25 13:40 ` Leon Romanovsky
2025-12-21 12:36 ` kernel test robot
2025-12-21 12:36 ` kernel test robot
2025-12-22 12:43 ` kernel test robot
2025-12-22 12:43 ` kernel test robot
2025-12-22 14:00 ` kernel test robot
2025-12-22 14:00 ` kernel test robot
2025-12-19 5:36 ` [PATCH RFC 6/6] dma-iommu: Allow DMA sync batching for IOVA link/unlink Barry Song
2025-12-19 5:36 ` Barry Song
2025-12-19 6:04 ` [PATCH 0/6] dma-mapping: arm64: support batched cache sync Barry Song
2025-12-19 6:04 ` Barry Song
2025-12-19 6:12 ` Barry Song
2025-12-19 6:12 ` Barry Song
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=202512201836.f6KX6WMH-lkp@intel.com \
--to=lkp@intel.com \
--cc=21cnbao@gmail.com \
--cc=anshuman.khandual@arm.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=iommu@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=m.szyprowski@samsung.com \
--cc=maz@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robin.murphy@arm.com \
--cc=ryan.roberts@arm.com \
--cc=surenb@google.com \
--cc=v-songbaohua@oppo.com \
--cc=will@kernel.org \
--cc=zhengtangquan@oppo.com \
/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 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.