All of lore.kernel.org
 help / color / mirror / Atom feed
* [mmotm:master 58/135] fs//cramfs/inode.c:423:10: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'?
@ 2018-09-05  2:09 kbuild test robot
  2018-09-05 20:01 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2018-09-05  2:09 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 7792 bytes --]

tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   b99ef2cad77986ffd5818c8baeacef456d92e33d
commit: 8842588f1d870eb196bfdb7d9c3c64df1a691f20 [58/135] mm: remove vm_insert_mixed()
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 8842588f1d870eb196bfdb7d9c3c64df1a691f20
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=ia64 

Note: the mmotm/master HEAD b99ef2cad77986ffd5818c8baeacef456d92e33d builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   fs//cramfs/inode.c: In function 'cramfs_physmem_mmap':
>> fs//cramfs/inode.c:423:10: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? [-Werror=implicit-function-declaration]
       ret = vm_insert_mixed(vma, vma->vm_start + off, pfn);
             ^~~~~~~~~~~~~~~
             vmf_insert_mixed
   cc1: some warnings being treated as errors

vim +423 fs//cramfs/inode.c

eddcd976 Nicolas Pitre 2017-10-12  352  
eddcd976 Nicolas Pitre 2017-10-12  353  static int cramfs_physmem_mmap(struct file *file, struct vm_area_struct *vma)
eddcd976 Nicolas Pitre 2017-10-12  354  {
eddcd976 Nicolas Pitre 2017-10-12  355  	struct inode *inode = file_inode(file);
eddcd976 Nicolas Pitre 2017-10-12  356  	struct cramfs_sb_info *sbi = CRAMFS_SB(inode->i_sb);
eddcd976 Nicolas Pitre 2017-10-12  357  	unsigned int pages, max_pages, offset;
eddcd976 Nicolas Pitre 2017-10-12  358  	unsigned long address, pgoff = vma->vm_pgoff;
eddcd976 Nicolas Pitre 2017-10-12  359  	char *bailout_reason;
eddcd976 Nicolas Pitre 2017-10-12  360  	int ret;
eddcd976 Nicolas Pitre 2017-10-12  361  
eddcd976 Nicolas Pitre 2017-10-12  362  	ret = generic_file_readonly_mmap(file, vma);
eddcd976 Nicolas Pitre 2017-10-12  363  	if (ret)
eddcd976 Nicolas Pitre 2017-10-12  364  		return ret;
eddcd976 Nicolas Pitre 2017-10-12  365  
eddcd976 Nicolas Pitre 2017-10-12  366  	/*
eddcd976 Nicolas Pitre 2017-10-12  367  	 * Now try to pre-populate ptes for this vma with a direct
eddcd976 Nicolas Pitre 2017-10-12  368  	 * mapping avoiding memory allocation when possible.
eddcd976 Nicolas Pitre 2017-10-12  369  	 */
eddcd976 Nicolas Pitre 2017-10-12  370  
eddcd976 Nicolas Pitre 2017-10-12  371  	/* Could COW work here? */
eddcd976 Nicolas Pitre 2017-10-12  372  	bailout_reason = "vma is writable";
eddcd976 Nicolas Pitre 2017-10-12  373  	if (vma->vm_flags & VM_WRITE)
eddcd976 Nicolas Pitre 2017-10-12  374  		goto bailout;
eddcd976 Nicolas Pitre 2017-10-12  375  
eddcd976 Nicolas Pitre 2017-10-12  376  	max_pages = (inode->i_size + PAGE_SIZE - 1) >> PAGE_SHIFT;
eddcd976 Nicolas Pitre 2017-10-12  377  	bailout_reason = "beyond file limit";
eddcd976 Nicolas Pitre 2017-10-12  378  	if (pgoff >= max_pages)
eddcd976 Nicolas Pitre 2017-10-12  379  		goto bailout;
eddcd976 Nicolas Pitre 2017-10-12  380  	pages = min(vma_pages(vma), max_pages - pgoff);
eddcd976 Nicolas Pitre 2017-10-12  381  
eddcd976 Nicolas Pitre 2017-10-12  382  	offset = cramfs_get_block_range(inode, pgoff, &pages);
eddcd976 Nicolas Pitre 2017-10-12  383  	bailout_reason = "unsuitable block layout";
eddcd976 Nicolas Pitre 2017-10-12  384  	if (!offset)
eddcd976 Nicolas Pitre 2017-10-12  385  		goto bailout;
eddcd976 Nicolas Pitre 2017-10-12  386  	address = sbi->linear_phys_addr + offset;
eddcd976 Nicolas Pitre 2017-10-12  387  	bailout_reason = "data is not page aligned";
eddcd976 Nicolas Pitre 2017-10-12  388  	if (!PAGE_ALIGNED(address))
eddcd976 Nicolas Pitre 2017-10-12  389  		goto bailout;
eddcd976 Nicolas Pitre 2017-10-12  390  
eddcd976 Nicolas Pitre 2017-10-12  391  	/* Don't map the last page if it contains some other data */
eddcd976 Nicolas Pitre 2017-10-12  392  	if (pgoff + pages == max_pages && cramfs_last_page_is_shared(inode)) {
eddcd976 Nicolas Pitre 2017-10-12  393  		pr_debug("mmap: %s: last page is shared\n",
eddcd976 Nicolas Pitre 2017-10-12  394  			 file_dentry(file)->d_name.name);
eddcd976 Nicolas Pitre 2017-10-12  395  		pages--;
eddcd976 Nicolas Pitre 2017-10-12  396  	}
eddcd976 Nicolas Pitre 2017-10-12  397  
eddcd976 Nicolas Pitre 2017-10-12  398  	if (!pages) {
eddcd976 Nicolas Pitre 2017-10-12  399  		bailout_reason = "no suitable block remaining";
eddcd976 Nicolas Pitre 2017-10-12  400  		goto bailout;
eddcd976 Nicolas Pitre 2017-10-12  401  	}
eddcd976 Nicolas Pitre 2017-10-12  402  
eddcd976 Nicolas Pitre 2017-10-12  403  	if (pages == vma_pages(vma)) {
eddcd976 Nicolas Pitre 2017-10-12  404  		/*
eddcd976 Nicolas Pitre 2017-10-12  405  		 * The entire vma is mappable. remap_pfn_range() will
eddcd976 Nicolas Pitre 2017-10-12  406  		 * make it distinguishable from a non-direct mapping
eddcd976 Nicolas Pitre 2017-10-12  407  		 * in /proc/<pid>/maps by substituting the file offset
eddcd976 Nicolas Pitre 2017-10-12  408  		 * with the actual physical address.
eddcd976 Nicolas Pitre 2017-10-12  409  		 */
eddcd976 Nicolas Pitre 2017-10-12  410  		ret = remap_pfn_range(vma, vma->vm_start, address >> PAGE_SHIFT,
eddcd976 Nicolas Pitre 2017-10-12  411  				      pages * PAGE_SIZE, vma->vm_page_prot);
eddcd976 Nicolas Pitre 2017-10-12  412  	} else {
eddcd976 Nicolas Pitre 2017-10-12  413  		/*
eddcd976 Nicolas Pitre 2017-10-12  414  		 * Let's create a mixed map if we can't map it all.
eddcd976 Nicolas Pitre 2017-10-12  415  		 * The normal paging machinery will take care of the
eddcd976 Nicolas Pitre 2017-10-12  416  		 * unpopulated ptes via cramfs_readpage().
eddcd976 Nicolas Pitre 2017-10-12  417  		 */
eddcd976 Nicolas Pitre 2017-10-12  418  		int i;
eddcd976 Nicolas Pitre 2017-10-12  419  		vma->vm_flags |= VM_MIXEDMAP;
eddcd976 Nicolas Pitre 2017-10-12  420  		for (i = 0; i < pages && !ret; i++) {
eddcd976 Nicolas Pitre 2017-10-12  421  			unsigned long off = i * PAGE_SIZE;
eddcd976 Nicolas Pitre 2017-10-12  422  			pfn_t pfn = phys_to_pfn_t(address + off, PFN_DEV);
eddcd976 Nicolas Pitre 2017-10-12 @423  			ret = vm_insert_mixed(vma, vma->vm_start + off, pfn);
eddcd976 Nicolas Pitre 2017-10-12  424  		}
eddcd976 Nicolas Pitre 2017-10-12  425  	}
eddcd976 Nicolas Pitre 2017-10-12  426  
eddcd976 Nicolas Pitre 2017-10-12  427  	if (!ret)
eddcd976 Nicolas Pitre 2017-10-12  428  		pr_debug("mapped %s[%lu] at 0x%08lx (%u/%lu pages) "
eddcd976 Nicolas Pitre 2017-10-12  429  			 "to vma 0x%08lx, page_prot 0x%llx\n",
eddcd976 Nicolas Pitre 2017-10-12  430  			 file_dentry(file)->d_name.name, pgoff,
eddcd976 Nicolas Pitre 2017-10-12  431  			 address, pages, vma_pages(vma), vma->vm_start,
eddcd976 Nicolas Pitre 2017-10-12  432  			 (unsigned long long)pgprot_val(vma->vm_page_prot));
eddcd976 Nicolas Pitre 2017-10-12  433  	return ret;
eddcd976 Nicolas Pitre 2017-10-12  434  
eddcd976 Nicolas Pitre 2017-10-12  435  bailout:
eddcd976 Nicolas Pitre 2017-10-12  436  	pr_debug("%s[%lu]: direct mmap impossible: %s\n",
eddcd976 Nicolas Pitre 2017-10-12  437  		 file_dentry(file)->d_name.name, pgoff, bailout_reason);
eddcd976 Nicolas Pitre 2017-10-12  438  	/* Didn't manage any direct map, but normal paging is still possible */
eddcd976 Nicolas Pitre 2017-10-12  439  	return 0;
eddcd976 Nicolas Pitre 2017-10-12  440  }
eddcd976 Nicolas Pitre 2017-10-12  441  

:::::: The code at line 423 was first introduced by commit
:::::: eddcd97659e31f59fc99c6c3ca3dcce403585f7e cramfs: add mmap support

:::::: TO: Nicolas Pitre <nicolas.pitre@linaro.org>
:::::: CC: Al Viro <viro@zeniv.linux.org.uk>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51762 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [mmotm:master 58/135] fs//cramfs/inode.c:423:10: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'?
  2018-09-05  2:09 [mmotm:master 58/135] fs//cramfs/inode.c:423:10: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? kbuild test robot
@ 2018-09-05 20:01 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2018-09-05 20:01 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Matthew Wilcox, kbuild-all, Johannes Weiner,
	Linux Memory Management List

On Wed, 5 Sep 2018 10:09:42 +0800 kbuild test robot <lkp@intel.com> wrote:

> tree:   git://git.cmpxchg.org/linux-mmotm.git master
> head:   b99ef2cad77986ffd5818c8baeacef456d92e33d
> commit: 8842588f1d870eb196bfdb7d9c3c64df1a691f20 [58/135] mm: remove vm_insert_mixed()
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 8.1.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 8842588f1d870eb196bfdb7d9c3c64df1a691f20
>         # save the attached .config to linux build tree
>         GCC_VERSION=8.1.0 make.cross ARCH=ia64 
> 
> Note: the mmotm/master HEAD b99ef2cad77986ffd5818c8baeacef456d92e33d builds fine.
>       It only hurts bisectibility.

Thanks, I reordered the patches.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-05 20:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05  2:09 [mmotm:master 58/135] fs//cramfs/inode.c:423:10: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? kbuild test robot
2018-09-05 20:01 ` Andrew Morton

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.