All of lore.kernel.org
 help / color / mirror / Atom feed
* [sashal-stable:pending-5.10 37/41] arch/s390/pci/pci_mmio.c:176:15: error: implicit declaration of function 'follow_pte_pmd'; did you mean 'follow_pte'?
@ 2021-09-19 23:29 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-19 23:29 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git pending-5.10
head:   942400ef73fa994db74d16c796c477a9051e5253
commit: 4cfb92bf1322201c438245a513ea4b6d35bd0ea3 [37/41] s390/pci: remove races against pte updates
config: s390-randconfig-r004-20210919 (attached as .config)
compiler: s390-linux-gcc (GCC) 11.2.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/sashal/linux-stable.git/commit/?id=4cfb92bf1322201c438245a513ea4b6d35bd0ea3
        git remote add sashal-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
        git fetch --no-tags sashal-stable pending-5.10
        git checkout 4cfb92bf1322201c438245a513ea4b6d35bd0ea3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=s390 

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

All errors (new ones prefixed by >>):

   arch/s390/pci/pci_mmio.c: In function '__do_sys_s390_pci_mmio_write':
>> arch/s390/pci/pci_mmio.c:176:15: error: implicit declaration of function 'follow_pte_pmd'; did you mean 'follow_pte'? [-Werror=implicit-function-declaration]
     176 |         ret = follow_pte_pmd(vma->vm_mm, mmio_addr, NULL, &ptep, NULL, &ptl);
         |               ^~~~~~~~~~~~~~
         |               follow_pte
   cc1: some warnings being treated as errors


vim +176 arch/s390/pci/pci_mmio.c

   121	
   122	SYSCALL_DEFINE3(s390_pci_mmio_write, unsigned long, mmio_addr,
   123			const void __user *, user_buffer, size_t, length)
   124	{
   125		u8 local_buf[64];
   126		void __iomem *io_addr;
   127		void *buf;
   128		struct vm_area_struct *vma;
   129		pte_t *ptep;
   130		spinlock_t *ptl;
   131		long ret;
   132	
   133		if (!zpci_is_enabled())
   134			return -ENODEV;
   135	
   136		if (length <= 0 || PAGE_SIZE - (mmio_addr & ~PAGE_MASK) < length)
   137			return -EINVAL;
   138	
   139		/*
   140		 * We only support write access to MIO capable devices if we are on
   141		 * a MIO enabled system. Otherwise we would have to check for every
   142		 * address if it is a special ZPCI_ADDR and would have to do
   143		 * a pfn lookup which we don't need for MIO capable devices.  Currently
   144		 * ISM devices are the only devices without MIO support and there is no
   145		 * known need for accessing these from userspace.
   146		 */
   147		if (static_branch_likely(&have_mio)) {
   148			ret = __memcpy_toio_inuser((void  __iomem *) mmio_addr,
   149						user_buffer,
   150						length);
   151			return ret;
   152		}
   153	
   154		if (length > 64) {
   155			buf = kmalloc(length, GFP_KERNEL);
   156			if (!buf)
   157				return -ENOMEM;
   158		} else
   159			buf = local_buf;
   160	
   161		ret = -EFAULT;
   162		if (copy_from_user(buf, user_buffer, length))
   163			goto out_free;
   164	
   165		mmap_read_lock(current->mm);
   166		ret = -EINVAL;
   167		vma = find_vma(current->mm, mmio_addr);
   168		if (!vma)
   169			goto out_unlock_mmap;
   170		if (!(vma->vm_flags & (VM_IO | VM_PFNMAP)))
   171			goto out_unlock_mmap;
   172		ret = -EACCES;
   173		if (!(vma->vm_flags & VM_WRITE))
   174			goto out_unlock_mmap;
   175	
 > 176		ret = follow_pte_pmd(vma->vm_mm, mmio_addr, NULL, &ptep, NULL, &ptl);
   177		if (ret)
   178			goto out_unlock_mmap;
   179	
   180		io_addr = (void __iomem *)((pte_pfn(*ptep) << PAGE_SHIFT) |
   181				(mmio_addr & ~PAGE_MASK));
   182	
   183		if ((unsigned long) io_addr < ZPCI_IOMAP_ADDR_BASE)
   184			goto out_unlock_pt;
   185	
   186		ret = zpci_memcpy_toio(io_addr, buf, length);
   187	out_unlock_pt:
   188		pte_unmap_unlock(ptep, ptl);
   189	out_unlock_mmap:
   190		mmap_read_unlock(current->mm);
   191	out_free:
   192		if (buf != local_buf)
   193			kfree(buf);
   194		return ret;
   195	}
   196	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-19 23:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-19 23:29 [sashal-stable:pending-5.10 37/41] arch/s390/pci/pci_mmio.c:176:15: error: implicit declaration of function 'follow_pte_pmd'; did you mean 'follow_pte'? 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.