All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrew Jones <andrew.jones@oss.qualcomm.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Anup Patel <anup@brainfault.org>
Subject: [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
Date: Sun, 22 Nov 2026 07:12:48 +0800	[thread overview]
Message-ID: <202611220733.xV4aOPf6-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-11-21 23:12 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=202611220733.xV4aOPf6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrew.jones@oss.qualcomm.com \
    --cc=anup@brainfault.org \
    --cc=llvm@lists.linux.dev \
    --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.