* [avpatel:riscv_iommu_irqbypass_v2 13/18] drivers/iommu/riscv/iommu-ir.c:185:45: error: call to undeclared function 'virt_to_pfn'; ISO C99 and later do not support implicit function declarations
@ 2026-04-30 13:52 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-30 13:52 UTC (permalink / raw)
To: Andrew Jones; +Cc: llvm, oe-kbuild-all, Anup Patel
tree: https://github.com/avpatel/linux.git riscv_iommu_irqbypass_v2
head: 0ba166d111b762ae8f37075ba1266e345ae5ef59
commit: e3141898f38de6d63cb78f33d1b1e7bfb00d6e29 [13/18] iommu/riscv: Add guest file irqbypass support
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20260430/202604302101.G9YsHRCG-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/202604302101.G9YsHRCG-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/202604302101.G9YsHRCG-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/iommu/riscv/iommu-ir.c:10:
In file included from include/linux/msi.h:24:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:12:
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;
| ~~~~~~~~~~ ^
In file included from drivers/iommu/riscv/iommu-ir.c:16:
drivers/iommu/riscv/iommu.h:30:28: error: field has incomplete type 'struct pt_iommu_riscv_64'
30 | struct pt_iommu_riscv_64 riscvpt;
| ^
drivers/iommu/riscv/iommu.h:30:10: note: forward declaration of 'struct pt_iommu_riscv_64'
30 | struct pt_iommu_riscv_64 riscvpt;
| ^
drivers/iommu/riscv/iommu-ir.c:48:34: error: no member named 'domain' in 'struct riscv_iommu_domain'
48 | int ret = iommu_map(&domain->domain, addr, addr, map_size,
| ~~~~~~ ^
drivers/iommu/riscv/iommu-ir.c:53:39: error: no member named 'domain' in 'struct riscv_iommu_domain'
53 | *unmapped += iommu_unmap(&domain->domain, addr, map_size);
| ~~~~~~ ^
drivers/iommu/riscv/iommu-ir.c:184:54: error: no member named 'pgd_mode' in 'struct riscv_iommu_domain'
184 | .fsc = FIELD_PREP(RISCV_IOMMU_PC_FSC_MODE, domain->pgd_mode) |
| ~~~~~~ ^
include/linux/bitfield.h:138:23: note: expanded from macro 'FIELD_PREP'
138 | __FIELD_PREP(_mask, _val, "FIELD_PREP: "); \
| ^~~~
include/linux/bitfield.h:91:31: note: expanded from macro '__FIELD_PREP'
91 | __BF_FIELD_CHECK_MASK(mask, val, pfx); \
| ^~~
include/linux/bitfield.h:70:41: note: expanded from macro '__BF_FIELD_CHECK_MASK'
70 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
| ^~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:699:22: note: expanded from macro 'compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:687:23: note: expanded from macro '_compiletime_assert'
687 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:679:9: note: expanded from macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
drivers/iommu/riscv/iommu-ir.c:184:54: error: no member named 'pgd_mode' in 'struct riscv_iommu_domain'
184 | .fsc = FIELD_PREP(RISCV_IOMMU_PC_FSC_MODE, domain->pgd_mode) |
| ~~~~~~ ^
include/linux/bitfield.h:138:23: note: expanded from macro 'FIELD_PREP'
138 | __FIELD_PREP(_mask, _val, "FIELD_PREP: "); \
| ^~~~
include/linux/bitfield.h:91:31: note: expanded from macro '__FIELD_PREP'
91 | __BF_FIELD_CHECK_MASK(mask, val, pfx); \
| ^~~
include/linux/bitfield.h:72:12: note: expanded from macro '__BF_FIELD_CHECK_MASK'
72 | (0 + (_val)) : 0, \
| ^~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:699:22: note: expanded from macro 'compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:687:23: note: expanded from macro '_compiletime_assert'
687 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:679:9: note: expanded from macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
drivers/iommu/riscv/iommu-ir.c:184:54: error: no member named 'pgd_mode' in 'struct riscv_iommu_domain'
184 | .fsc = FIELD_PREP(RISCV_IOMMU_PC_FSC_MODE, domain->pgd_mode) |
| ~~~~~~ ^
include/linux/bitfield.h:138:23: note: expanded from macro 'FIELD_PREP'
138 | __FIELD_PREP(_mask, _val, "FIELD_PREP: "); \
| ^~~~
include/linux/bitfield.h:92:19: note: expanded from macro '__FIELD_PREP'
92 | ((typeof(mask))(val) << __bf_shf(mask)) & (mask); \
| ^~~
>> drivers/iommu/riscv/iommu-ir.c:185:45: error: call to undeclared function 'virt_to_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
185 | FIELD_PREP(RISCV_IOMMU_PC_FSC_PPN, virt_to_pfn(domain->pgd_root)),
| ^
drivers/iommu/riscv/iommu-ir.c:185:45: note: did you mean 'virt_to_pte'?
arch/um/include/asm/pgtable.h:284:15: note: 'virt_to_pte' declared here
284 | extern pte_t *virt_to_pte(struct mm_struct *mm, unsigned long addr);
| ^
drivers/iommu/riscv/iommu-ir.c:185:65: error: no member named 'pgd_root' in 'struct riscv_iommu_domain'
185 | FIELD_PREP(RISCV_IOMMU_PC_FSC_PPN, virt_to_pfn(domain->pgd_root)),
| ~~~~~~ ^
include/linux/bitfield.h:138:23: note: expanded from macro 'FIELD_PREP'
138 | __FIELD_PREP(_mask, _val, "FIELD_PREP: "); \
| ^~~~
include/linux/bitfield.h:91:31: note: expanded from macro '__FIELD_PREP'
91 | __BF_FIELD_CHECK_MASK(mask, val, pfx); \
| ^~~
include/linux/bitfield.h:70:41: note: expanded from macro '__BF_FIELD_CHECK_MASK'
70 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
| ^~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:699:22: note: expanded from macro 'compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:687:23: note: expanded from macro '_compiletime_assert'
687 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:679:9: note: expanded from macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
drivers/iommu/riscv/iommu-ir.c:185:65: error: no member named 'pgd_root' in 'struct riscv_iommu_domain'
185 | FIELD_PREP(RISCV_IOMMU_PC_FSC_PPN, virt_to_pfn(domain->pgd_root)),
| ~~~~~~ ^
include/linux/bitfield.h:138:23: note: expanded from macro 'FIELD_PREP'
138 | __FIELD_PREP(_mask, _val, "FIELD_PREP: "); \
| ^~~~
include/linux/bitfield.h:91:31: note: expanded from macro '__FIELD_PREP'
91 | __BF_FIELD_CHECK_MASK(mask, val, pfx); \
| ^~~
include/linux/bitfield.h:72:12: note: expanded from macro '__BF_FIELD_CHECK_MASK'
72 | (0 + (_val)) : 0, \
| ^~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:699:22: note: expanded from macro 'compiletime_assert'
699 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~
include/linux/compiler_types.h:687:23: note: expanded from macro '_compiletime_assert'
687 | __compiletime_assert(condition, msg, prefix, suffix)
| ^~~~~~~~~
include/linux/compiler_types.h:679:9: note: expanded from macro '__compiletime_assert'
679 | if (!(condition)) \
| ^~~~~~~~~
>> drivers/iommu/riscv/iommu-ir.c:185:45: error: call to undeclared function 'virt_to_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
185 | FIELD_PREP(RISCV_IOMMU_PC_FSC_PPN, virt_to_pfn(domain->pgd_root)),
| ^
drivers/iommu/riscv/iommu-ir.c:185:65: error: no member named 'pgd_root' in 'struct riscv_iommu_domain'
185 | FIELD_PREP(RISCV_IOMMU_PC_FSC_PPN, virt_to_pfn(domain->pgd_root)),
| ~~~~~~ ^
include/linux/bitfield.h:138:23: note: expanded from macro 'FIELD_PREP'
138 | __FIELD_PREP(_mask, _val, "FIELD_PREP: "); \
| ^~~~
include/linux/bitfield.h:92:19: note: expanded from macro '__FIELD_PREP'
92 | ((typeof(mask))(val) << __bf_shf(mask)) & (mask); \
| ^~~
drivers/iommu/riscv/iommu-ir.c:186:13: error: call to undeclared function 'virt_to_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
186 | .msiptp = virt_to_pfn(domain->msi_root) |
| ^
drivers/iommu/riscv/iommu-ir.c:327:18: warning: declaration of 'struct riscv_iommu_ir_vcpu_info' will not be visible outside of this function [-Wvisibility]
327 | struct riscv_iommu_ir_vcpu_info *vcpu_info)
| ^
drivers/iommu/riscv/iommu-ir.c:329:43: error: incomplete definition of type 'struct riscv_iommu_ir_vcpu_info'
329 | return domain->msi_addr_mask == vcpu_info->msi_addr_mask &&
| ~~~~~~~~~^
drivers/iommu/riscv/iommu-ir.c:327:18: note: forward declaration of 'struct riscv_iommu_ir_vcpu_info'
327 | struct riscv_iommu_ir_vcpu_info *vcpu_info)
| ^
drivers/iommu/riscv/iommu-ir.c:330:46: error: incomplete definition of type 'struct riscv_iommu_ir_vcpu_info'
330 | domain->msi_addr_pattern == vcpu_info->msi_addr_pattern &&
| ~~~~~~~~~^
drivers/iommu/riscv/iommu-ir.c:327:18: note: forward declaration of 'struct riscv_iommu_ir_vcpu_info'
327 | struct riscv_iommu_ir_vcpu_info *vcpu_info)
| ^
drivers/iommu/riscv/iommu-ir.c:331:46: error: incomplete definition of type 'struct riscv_iommu_ir_vcpu_info'
331 | domain->group_index_bits == vcpu_info->group_index_bits &&
| ~~~~~~~~~^
drivers/iommu/riscv/iommu-ir.c:327:18: note: forward declaration of 'struct riscv_iommu_ir_vcpu_info'
327 | struct riscv_iommu_ir_vcpu_info *vcpu_info)
| ^
drivers/iommu/riscv/iommu-ir.c:332:47: error: incomplete definition of type 'struct riscv_iommu_ir_vcpu_info'
332 | domain->group_index_shift == vcpu_info->group_index_shift;
| ~~~~~~~~~^
drivers/iommu/riscv/iommu-ir.c:327:18: note: forward declaration of 'struct riscv_iommu_ir_vcpu_info'
327 | struct riscv_iommu_ir_vcpu_info *vcpu_info)
| ^
drivers/iommu/riscv/iommu-ir.c:337:15: warning: declaration of 'struct riscv_iommu_ir_vcpu_info' will not be visible outside of this function [-Wvisibility]
337 | struct riscv_iommu_ir_vcpu_info *vcpu_info)
| ^
drivers/iommu/riscv/iommu-ir.c:343:14: error: no member named 'pgd_mode' in 'struct riscv_iommu_domain'
343 | if (domain->pgd_mode)
| ~~~~~~ ^
drivers/iommu/riscv/iommu-ir.c:348:35: error: incomplete definition of type 'struct riscv_iommu_ir_vcpu_info'
348 | domain->msi_addr_mask = vcpu_info->msi_addr_mask;
| ~~~~~~~~~^
drivers/iommu/riscv/iommu-ir.c:337:15: note: forward declaration of 'struct riscv_iommu_ir_vcpu_info'
337 | struct riscv_iommu_ir_vcpu_info *vcpu_info)
| ^
drivers/iommu/riscv/iommu-ir.c:349:38: error: incomplete definition of type 'struct riscv_iommu_ir_vcpu_info'
349 | domain->msi_addr_pattern = vcpu_info->msi_addr_pattern;
| ~~~~~~~~~^
drivers/iommu/riscv/iommu-ir.c:337:15: note: forward declaration of 'struct riscv_iommu_ir_vcpu_info'
337 | struct riscv_iommu_ir_vcpu_info *vcpu_info)
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
vim +/virt_to_pfn +185 drivers/iommu/riscv/iommu-ir.c
176
177 static void riscv_iommu_ir_msiptp_update(struct riscv_iommu_domain *domain)
178 {
179 struct riscv_iommu_bond *bond;
180 struct riscv_iommu_device *iommu, *prev;
181 struct riscv_iommu_dc new_dc = {
182 .ta = FIELD_PREP(RISCV_IOMMU_PC_TA_PSCID, domain->pscid) |
183 RISCV_IOMMU_PC_TA_V,
> 184 .fsc = FIELD_PREP(RISCV_IOMMU_PC_FSC_MODE, domain->pgd_mode) |
> 185 FIELD_PREP(RISCV_IOMMU_PC_FSC_PPN, virt_to_pfn(domain->pgd_root)),
186 .msiptp = virt_to_pfn(domain->msi_root) |
187 FIELD_PREP(RISCV_IOMMU_DC_MSIPTP_MODE,
188 RISCV_IOMMU_DC_MSIPTP_MODE_FLAT),
189 .msi_addr_mask = domain->msi_addr_mask,
190 .msi_addr_pattern = domain->msi_addr_pattern,
191 };
192
193 /* Like riscv_iommu_ir_msitbl_inval(), synchronize with riscv_iommu_bond_link() */
194 smp_mb();
195
196 rcu_read_lock();
197
198 prev = NULL;
199 list_for_each_entry_rcu(bond, &domain->bonds, list) {
200 iommu = dev_to_iommu(bond->dev);
201 if (iommu == prev)
202 continue;
203
204 riscv_iommu_iodir_update(iommu, bond->dev, &new_dc);
205 prev = iommu;
206 }
207
208 rcu_read_unlock();
209 }
210
--
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-04-30 13:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30 13:52 [avpatel:riscv_iommu_irqbypass_v2 13/18] drivers/iommu/riscv/iommu-ir.c:185:45: 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