All of lore.kernel.org
 help / color / mirror / Atom feed
* [avpatel:riscv_trace_support_v4 46/61] arch/riscv/kernel/sbi_mpxy.c:287:5: error: call to undeclared function 'memdesc_section'; ISO C99 and later do not support implicit function declarations
@ 2026-05-28 15:17 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-05-28 15:17 UTC (permalink / raw)
  To: Anup Patel; +Cc: llvm, oe-kbuild-all, Himanshu Chauhan

tree:   https://github.com/avpatel/linux.git riscv_trace_support_v4
head:   f532a039b5f6357db1cefa8fba19666b46049341
commit: d715c82481af6e5c6576ae0cb3a17bdb66a9e4ea [46/61] RISC-V: Move common MPXY helper routines to arch/riscv
config: riscv-randconfig-001-20260528 (https://download.01.org/0day-ci/archive/20260528/202605282348.7h06tCJa-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260528/202605282348.7h06tCJa-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/202605282348.7h06tCJa-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/riscv/kernel/sbi_mpxy.c:287:5: error: call to undeclared function 'memdesc_section'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     287 |                          page_to_phys(shmem_page), 0, 0, 0, 0, 0);
         |                          ^
   include/asm-generic/memory_model.h:79:24: note: expanded from macro 'page_to_phys'
      79 |         unsigned long __pfn = page_to_pfn(page);                        \
         |                               ^
   include/asm-generic/memory_model.h:73:21: note: expanded from macro 'page_to_pfn'
      73 | #define page_to_pfn __page_to_pfn
         |                     ^
   include/asm-generic/memory_model.h:56:14: note: expanded from macro '__page_to_pfn'
      56 |         int __sec = memdesc_section(__pg->flags);               \
         |                     ^
   arch/riscv/kernel/sbi_mpxy.c:289:29: error: call to undeclared function 'memdesc_section'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     289 |                 free_pages((unsigned long)page_to_virt(shmem_page),
         |                                           ^
   arch/riscv/include/asm/page.h:160:41: note: expanded from macro 'page_to_virt'
     160 | #define page_to_virt(page)      (pfn_to_virt(page_to_pfn(page)))
         |                                              ^
   include/asm-generic/memory_model.h:73:21: note: expanded from macro 'page_to_pfn'
      73 | #define page_to_pfn __page_to_pfn
         |                     ^
   include/asm-generic/memory_model.h:56:14: note: expanded from macro '__page_to_pfn'
      56 |         int __sec = memdesc_section(__pg->flags);               \
         |                     ^
   arch/riscv/kernel/sbi_mpxy.c:294:16: error: call to undeclared function 'memdesc_section'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     294 |         mpxy->shmem = page_to_virt(shmem_page);
         |                       ^
   arch/riscv/include/asm/page.h:160:41: note: expanded from macro 'page_to_virt'
     160 | #define page_to_virt(page)      (pfn_to_virt(page_to_pfn(page)))
         |                                              ^
   include/asm-generic/memory_model.h:73:21: note: expanded from macro 'page_to_pfn'
      73 | #define page_to_pfn __page_to_pfn
         |                     ^
   include/asm-generic/memory_model.h:56:14: note: expanded from macro '__page_to_pfn'
      56 |         int __sec = memdesc_section(__pg->flags);               \
         |                     ^
   arch/riscv/kernel/sbi_mpxy.c:295:26: error: call to undeclared function 'memdesc_section'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     295 |         mpxy->shmem_phys_addr = page_to_phys(shmem_page);
         |                                 ^
   include/asm-generic/memory_model.h:79:24: note: expanded from macro 'page_to_phys'
      79 |         unsigned long __pfn = page_to_pfn(page);                        \
         |                               ^
   include/asm-generic/memory_model.h:73:21: note: expanded from macro 'page_to_pfn'
      73 | #define page_to_pfn __page_to_pfn
         |                     ^
   include/asm-generic/memory_model.h:56:14: note: expanded from macro '__page_to_pfn'
      56 |         int __sec = memdesc_section(__pg->flags);               \
         |                     ^
   4 errors generated.


vim +/memdesc_section +287 arch/riscv/kernel/sbi_mpxy.c

   267	
   268	static int mpxy_setup_shmem(unsigned int cpu)
   269	{
   270		struct page *shmem_page;
   271		struct mpxy_local *mpxy;
   272		struct sbiret sret;
   273	
   274		mpxy = per_cpu_ptr(&mpxy_local, cpu);
   275		if (mpxy->shmem_active)
   276			return 0;
   277	
   278		shmem_page = alloc_pages(GFP_KERNEL | __GFP_ZERO, get_order(mpxy_shmem_size));
   279		if (!shmem_page)
   280			return -ENOMEM;
   281	
   282		/*
   283		 * Linux setup of shmem is done in mpxy OVERWRITE mode.
   284		 * flags[1:0] = 00b
   285		 */
   286		sret = sbi_ecall(SBI_EXT_MPXY, SBI_EXT_MPXY_SET_SHMEM,
 > 287				 page_to_phys(shmem_page), 0, 0, 0, 0, 0);
   288		if (sret.error) {
   289			free_pages((unsigned long)page_to_virt(shmem_page),
   290				   get_order(mpxy_shmem_size));
   291			return sbi_err_map_linux_errno(sret.error);
   292		}
   293	
   294		mpxy->shmem = page_to_virt(shmem_page);
   295		mpxy->shmem_phys_addr = page_to_phys(shmem_page);
   296		mpxy->shmem_active = true;
   297	
   298		return 0;
   299	}
   300	

--
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-05-28 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 15:17 [avpatel:riscv_trace_support_v4 46/61] arch/riscv/kernel/sbi_mpxy.c:287:5: error: call to undeclared function 'memdesc_section'; ISO C99 and later do not support implicit function declarations kernel test robot

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.