All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Anup Patel <anup.patel@oss.qualcomm.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
Subject: [avpatel:riscv_trace_support_v4 43/58] 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
Date: Fri, 10 Jul 2026 09:20:46 +0800	[thread overview]
Message-ID: <202607100920.4mX8HxCL-lkp@intel.com> (raw)

tree:   https://github.com/avpatel/linux.git riscv_trace_support_v4
head:   077795f92007de48afcaeab45f9e9217537966d8
commit: d114c0cd70da2e1a20620050e0fa8e512b2d24c4 [43/58] RISC-V: Move common MPXY helper routines to arch/riscv
config: riscv-randconfig-r051-20260710 (https://download.01.org/0day-ci/archive/20260710/202607100920.4mX8HxCL-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project b3e6e6dabdc02153552a64fc74ff5c7532447eed)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260710/202607100920.4mX8HxCL-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/202607100920.4mX8HxCL-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:85:37: note: expanded from macro 'page_to_phys'
      85 | #define page_to_phys(page)      PFN_PHYS(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:85:37: note: expanded from macro 'page_to_phys'
      85 | #define page_to_phys(page)      PFN_PHYS(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

                 reply	other threads:[~2026-07-10  1:21 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=202607100920.4mX8HxCL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=anup.patel@oss.qualcomm.com \
    --cc=himanshu.chauhan@oss.qualcomm.com \
    --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.