All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, leoliu-oc <leoliu-oc@zhaoxin.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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'?
Date: Thu, 24 Oct 2024 08:19:23 +0800	[thread overview]
Message-ID: <202410240848.VbEcgWD6-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-10-24  0:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202410240848.VbEcgWD6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernel@openeuler.org \
    --cc=leoliu-oc@zhaoxin.com \
    --cc=oe-kbuild-all@lists.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 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.