[linux-stable-rc:queue/5.4 83/83] fs/hugetlbfs/inode.c:211:40: error: implicit declaration of function 'arch_get_mmap_end'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git queue/5.4
head:   2d723d526f735966b904f52c02d035793882b005
commit: 2d723d526f735966b904f52c02d035793882b005 [83/83] mm, hugetlb: allow for "high" userspace addresses
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20220504/202205040323.boErRvCI-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=2d723d526f735966b904f52c02d035793882b005
        git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
        git fetch --no-tags linux-stable-rc queue/5.4
        git checkout 2d723d526f735966b904f52c02d035793882b005
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   fs/hugetlbfs/inode.c: In function 'hugetlb_get_unmapped_area':
>> fs/hugetlbfs/inode.c:211:40: error: implicit declaration of function 'arch_get_mmap_end' [-Werror=implicit-function-declaration]
     211 |         const unsigned long mmap_end = arch_get_mmap_end(addr);
         |                                        ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/arch_get_mmap_end +211 fs/hugetlbfs/inode.c

   197	
   198	/*
   199	 * Called under down_write(mmap_sem).
   200	 */
   201	
   202	#ifndef HAVE_ARCH_HUGETLB_UNMAPPED_AREA
   203	static unsigned long
   204	hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
   205			unsigned long len, unsigned long pgoff, unsigned long flags)
   206	{
   207		struct mm_struct *mm = current->mm;
   208		struct vm_area_struct *vma;
   209		struct hstate *h = hstate_file(file);
   210		struct vm_unmapped_area_info info;
 > 211		const unsigned long mmap_end = arch_get_mmap_end(addr);
   212	
   213		if (len & ~huge_page_mask(h))
   214			return -EINVAL;
   215		if (len > TASK_SIZE)
   216			return -ENOMEM;
   217	
   218		if (flags & MAP_FIXED) {
   219			if (prepare_hugepage_range(file, addr, len))
   220				return -EINVAL;
   221			return addr;
   222		}
   223	
   224		if (addr) {
   225			addr = ALIGN(addr, huge_page_size(h));
   226			vma = find_vma(mm, addr);
   227			if (mmap_end - len >= addr &&
   228			    (!vma || addr + len <= vm_start_gap(vma)))
   229				return addr;
   230		}
   231	
   232		info.flags = 0;
   233		info.length = len;
   234		info.low_limit = TASK_UNMAPPED_BASE;
   235		info.high_limit = arch_get_mmap_end(addr);
   236		info.align_mask = PAGE_MASK & ~huge_page_mask(h);
   237		info.align_offset = 0;
   238		return vm_unmapped_area(&info);
   239	}
   240	#endif
   241	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux