[avpatel:riscv_trace_acpi_support_v1 /116] drivers/iommu/riscv/iommu.c:1264:29: error: implicit declaration of function 'virt_to_pfn'; did you mean 'virt_to_phys'?

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://github.com/avpatel/linux.git riscv_trace_acpi_support_v1
head:   2251d17fd6ac95b1f6de32a893141a3481e3ad1d
commit: cbb1d3e45cdd6ff067a162f710402a308710949d [/116] iommu/riscv: Add IRQ domain for interrupt remapping
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20260813/[email protected]/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260813/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   drivers/iommu/riscv/iommu.c: In function 'riscv_iommu_attach_paging_domain':
>> drivers/iommu/riscv/iommu.c:1264:29: error: implicit declaration of function 'virt_to_pfn'; did you mean 'virt_to_phys'? [-Wimplicit-function-declaration]
    1264 |                 dc.msiptp = virt_to_pfn(domain->msi_root) |
         |                             ^~~~~~~~~~~
         |                             virt_to_phys


vim +1264 drivers/iommu/riscv/iommu.c

  1238	
  1239	static int riscv_iommu_attach_paging_domain(struct iommu_domain *iommu_domain,
  1240						    struct device *dev,
  1241						    struct iommu_domain *old)
  1242	{
  1243		struct riscv_iommu_domain *domain = iommu_domain_to_riscv(iommu_domain);
  1244		struct riscv_iommu_device *iommu = dev_to_iommu(dev);
  1245		struct riscv_iommu_info *info = dev_iommu_priv_get(dev);
  1246		struct pt_iommu_riscv_64_hw_info pt_info;
  1247		struct riscv_iommu_dc dc = {0};
  1248		int ret;
  1249	
  1250		pt_iommu_riscv_64_hw_info(&domain->riscvpt, &pt_info);
  1251	
  1252		if (!riscv_iommu_pt_supported(iommu, pt_info.fsc_iosatp_mode))
  1253			return -ENODEV;
  1254	
  1255		ret = riscv_iommu_ir_attach_paging_domain(domain, dev);
  1256		if (ret)
  1257			return ret;
  1258	
  1259		dc.fsc = FIELD_PREP(RISCV_IOMMU_PC_FSC_MODE, pt_info.fsc_iosatp_mode) |
  1260			 FIELD_PREP(RISCV_IOMMU_PC_FSC_PPN, pt_info.ppn);
  1261		dc.ta = FIELD_PREP(RISCV_IOMMU_PC_TA_PSCID, domain->pscid) | RISCV_IOMMU_PC_TA_V;
  1262	
  1263		if (domain->msi_root) {
> 1264			dc.msiptp = virt_to_pfn(domain->msi_root) |
  1265				    FIELD_PREP(RISCV_IOMMU_DC_MSIPTP_MODE,
  1266					       RISCV_IOMMU_DC_MSIPTP_MODE_FLAT);
  1267			dc.msi_addr_mask = domain->msi_addr_mask;
  1268			dc.msi_addr_pattern = domain->msi_addr_pattern;
  1269		}
  1270	
  1271		if (riscv_iommu_bond_link(domain, dev))
  1272			return -ENOMEM;
  1273	
  1274		riscv_iommu_iodir_update(iommu, dev, &dc);
  1275		riscv_iommu_bond_unlink(info->domain, dev);
  1276		info->domain = domain;
  1277	
  1278		return 0;
  1279	}
  1280	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.