[ardb:module-combine-init-allocations 1/8] mm/execmem.c:91:26: error: call to undeclared function 'get_vm_area_page_order'; ISO C99 and later do not support implicit function declarations

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git module-combine-init-allocations
head:   a598b33b1d60eb215a71876eaf9e694fa22e48ba
commit: 727fc3c108b070521a093337b930b8a3f8eeaf73 [1/8] mm: execmem: Pass an offset to execmem_set_direct_map_valid()
config: riscv-randconfig-r131-20260822 (https://download.01.org/0day-ci/archive/20260822/[email protected]/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260822/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

   In file included from mm/execmem.c:22:
   In file included from mm/internal.h:13:
   In file included from include/linux/mm_inline.h:8:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:27:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:12:
   In file included from arch/riscv/include/asm/io.h:148:
   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;
         |                                                   ~~~~~~~~~~ ^
>> mm/execmem.c:91:26: error: call to undeclared function 'get_vm_area_page_order'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      91 |         unsigned int nr = (1 << get_vm_area_page_order(vm));
         |                                 ^
   mm/execmem.c:91:26: note: did you mean 'get_vm_area_caller'?
   include/linux/vmalloc.h:247:26: note: 'get_vm_area_caller' declared here
     247 | extern struct vm_struct *get_vm_area_caller(unsigned long size,
         |                          ^
   1 warning and 1 error generated.


vim +/get_vm_area_page_order +91 mm/execmem.c

    87	
    88	static int execmem_set_direct_map_valid(struct vm_struct *vm, bool valid,
    89						int offset)
    90	{
  > 91		unsigned int nr = (1 << get_vm_area_page_order(vm));
    92		unsigned int updated = 0;
    93		int err = 0;
    94	
    95		if (offset % nr)
    96			return -EINVAL;
    97	
    98		for (int i = offset >> PAGE_SHIFT; i < vm->nr_pages; i += nr) {
    99			err = set_direct_map_valid_noflush(vm->pages[i], nr, valid);
   100			if (err)
   101				goto err_restore;
   102			updated += nr;
   103		}
   104	
   105		return 0;
   106	
   107	err_restore:
   108		for (int i = offset >> PAGE_SHIFT; i < updated; i += nr)
   109			set_direct_map_valid_noflush(vm->pages[i], nr, !valid);
   110	
   111		return err;
   112	}
   113	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.