All of lore.kernel.org
 help / color / mirror / Atom feed
* [openeuler:OLK-6.6 9626/15255] arch/x86/kernel/zhaoxin_kh40000.c:87:47: error: implicit declaration of function 'iommu_get_dma_domain'; did you mean 'iommu_is_dma_domain'?
@ 2024-10-24  0:19 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-10-24  0:19 UTC (permalink / raw)
  To: kernel, leoliu-oc; +Cc: oe-kbuild-all

Hi leoliu-oc,

FYI, the error/warning still remains.

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   e7bc79687a034a22f94328123d5cf8c4d4436c35
commit: 4332dbb07181359cccca3ba757ef54e434fb1296 [9626/15255] Add kh40000_direct_dma_ops for KH-40000 platform
config: x86_64-buildonly-randconfig-001-20241024 (https://download.01.org/0day-ci/archive/20241024/202410240848.VbEcgWD6-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241024/202410240848.VbEcgWD6-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/202410240848.VbEcgWD6-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/x86/kernel/zhaoxin_kh40000.c: In function 'kh40000_sync_single_dma_for_cpu':
>> arch/x86/kernel/zhaoxin_kh40000.c:87:47: error: implicit declaration of function 'iommu_get_dma_domain'; did you mean 'iommu_is_dma_domain'? [-Werror=implicit-function-declaration]
      87 |                 struct iommu_domain *domain = iommu_get_dma_domain(dev);
         |                                               ^~~~~~~~~~~~~~~~~~~~
         |                                               iommu_is_dma_domain
   arch/x86/kernel/zhaoxin_kh40000.c:87:47: warning: initialization of 'struct iommu_domain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   cc1: some warnings being treated as errors


vim +87 arch/x86/kernel/zhaoxin_kh40000.c

    64	
    65	static void kh40000_sync_single_dma_for_cpu(struct device *dev, dma_addr_t paddr,
    66			enum dma_data_direction dir, bool is_iommu)
    67	{
    68		u8 vid;
    69		struct pci_dev *pci;
    70		u64 dma_mask = *dev->dma_mask;
    71	
    72		/* check direction */
    73		if ((dir != DMA_FROM_DEVICE) && (dir != DMA_BIDIRECTIONAL))
    74			return;
    75	
    76		/* check dma capability */
    77		if (dma_mask <= DMA_BIT_MASK(32))
    78			return;
    79	
    80		/* check device type */
    81		pci = kh40000_get_pci_dev(dev);
    82		if (pci == NULL)
    83			return;
    84	
    85		/* get real physical address */
    86		if (is_iommu) {
  > 87			struct iommu_domain *domain = iommu_get_dma_domain(dev);
    88	
    89			paddr = iommu_iova_to_phys(domain, paddr);
    90			if (!paddr)
    91				return;
    92		}
    93	
    94		/* check node or not */
    95		if ((zhaoxin_patch_code & ZHAOXIN_P2CW_NODE_CHECK)
    96		   && pfn_to_nid(PFN_DOWN(paddr)) == dev_to_node(dev))
    97			return;
    98	
    99		/* flush data by one pci read cycle */
   100		pci_read_config_byte(pci, PCI_VENDOR_ID, &vid);
   101	}
   102	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-24  0:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-24  0:19 [openeuler:OLK-6.6 9626/15255] arch/x86/kernel/zhaoxin_kh40000.c:87:47: error: implicit declaration of function 'iommu_get_dma_domain'; did you mean 'iommu_is_dma_domain'? kernel test robot

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.