Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [avpatel:riscv_trace_support_v6 52/105] drivers/iommu/riscv/iommu.c:1374:16: error: call to undeclared function 'virt_to_pfn'; ISO C99 and later do not support implicit function declarations
@ 2026-11-21 23:12 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-21 23:12 UTC (permalink / raw)
  To: Andrew Jones; +Cc: llvm, oe-kbuild-all, Anup Patel

tree:   https://github.com/avpatel/linux.git riscv_trace_support_v6
head:   5d559f35c311939a912dec052dd62819d2d39c70
commit: 27d7999789fe4bde5b3d8f8815fb9cbdf7efb76f [52/105] iommu/riscv: Prepare MSI table updates for interrupt remapping
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20261122/202611220733.xV4aOPf6-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261122/202611220733.xV4aOPf6-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/202611220733.xV4aOPf6-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/iommu/riscv/iommu.c:18:
   In file included from include/linux/crash_dump.h:5:
   In file included from include/linux/kexec.h:20:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
    1209 |         return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
         |                                                   ~~~~~~~~~~ ^
>> drivers/iommu/riscv/iommu.c:1374:16: error: call to undeclared function 'virt_to_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1374 |                 dc->msiptp = virt_to_pfn(msi_table->root) |
         |                              ^
   drivers/iommu/riscv/iommu.c:1374:16: note: did you mean 'virt_to_pte'?
   arch/um/include/asm/pgtable.h:291:15: note: 'virt_to_pte' declared here
     291 | extern pte_t *virt_to_pte(struct mm_struct *mm, unsigned long addr);
         |               ^
   1 warning and 1 error generated.


vim +/virt_to_pfn +1374 drivers/iommu/riscv/iommu.c

  1369	
  1370	static void riscv_iommu_msi_table_set_dc(struct riscv_iommu_msi_table *msi_table,
  1371						 struct riscv_iommu_dc *dc, bool activate)
  1372	{
  1373		if (activate) {
> 1374			dc->msiptp = virt_to_pfn(msi_table->root) |
  1375				     FIELD_PREP(RISCV_IOMMU_DC_MSIPTP_MODE,
  1376						RISCV_IOMMU_DC_MSIPTP_MODE_FLAT);
  1377			dc->msi_addr_mask = msi_table->msi_addr_mask;
  1378			dc->msi_addr_pattern = msi_table->msi_addr_pattern;
  1379		} else {
  1380			dc->msiptp = 0;
  1381			dc->msi_addr_mask = 0;
  1382			dc->msi_addr_pattern = 0;
  1383		}
  1384	}
  1385	

-- 
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:[~2026-11-21 23:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 23:12 [avpatel:riscv_trace_support_v6 52/105] drivers/iommu/riscv/iommu.c:1374:16: error: call to undeclared function 'virt_to_pfn'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox