public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: kbuild-all@lists.01.org, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org, Vasily Gorbik <gor@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>
Subject: [s390:features 12/14] arch/s390/mm/maccess.c:85:13: warning: no previous prototype for 'memcpy_real_init'
Date: Thu, 15 Sep 2022 11:43:48 +0800	[thread overview]
Message-ID: <202209151106.vetUM3Xc-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head:   fba07cd4dd8fb4833015801a83f945b2d65a5c4b
commit: 2f0e8aae26a27fe73d033788f8e92188e7584f41 [12/14] s390/mm: rework memcpy_real() to avoid DAT-off mode
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20220915/202209151106.vetUM3Xc-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.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/s390/linux.git/commit/?id=2f0e8aae26a27fe73d033788f8e92188e7584f41
        git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
        git fetch --no-tags s390 features
        git checkout 2f0e8aae26a27fe73d033788f8e92188e7584f41
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> arch/s390/mm/maccess.c:85:13: warning: no previous prototype for 'memcpy_real_init' [-Wmissing-prototypes]
      85 | void __init memcpy_real_init(void)
         |             ^~~~~~~~~~~~~~~~
>> arch/s390/mm/maccess.c:92:8: warning: no previous prototype for 'memcpy_real_iter' [-Wmissing-prototypes]
      92 | size_t memcpy_real_iter(struct iov_iter *iter, unsigned long src, size_t count)
         |        ^~~~~~~~~~~~~~~~
>> arch/s390/mm/maccess.c:123:5: warning: no previous prototype for 'memcpy_real' [-Wmissing-prototypes]
     123 | int memcpy_real(void *dest, unsigned long src, size_t count)
         |     ^~~~~~~~~~~


vim +/memcpy_real_init +85 arch/s390/mm/maccess.c

    84	
  > 85	void __init memcpy_real_init(void)
    86	{
    87		memcpy_real_ptep = vmem_get_alloc_pte(__memcpy_real_area, true);
    88		if (!memcpy_real_ptep)
    89			panic("Couldn't setup memcpy real area");
    90	}
    91	
  > 92	size_t memcpy_real_iter(struct iov_iter *iter, unsigned long src, size_t count)
    93	{
    94		size_t len, copied, res = 0;
    95		unsigned long phys, offset;
    96		void *chunk;
    97		pte_t pte;
    98	
    99		while (count) {
   100			phys = src & PAGE_MASK;
   101			offset = src & ~PAGE_MASK;
   102			chunk = (void *)(__memcpy_real_area + offset);
   103			len = min(count, PAGE_SIZE - offset);
   104			pte = mk_pte_phys(phys, PAGE_KERNEL_RO);
   105	
   106			mutex_lock(&memcpy_real_mutex);
   107			if (pte_val(pte) != pte_val(*memcpy_real_ptep)) {
   108				__ptep_ipte(__memcpy_real_area, memcpy_real_ptep, 0, 0, IPTE_GLOBAL);
   109				set_pte(memcpy_real_ptep, pte);
   110			}
   111			copied = copy_to_iter(chunk, len, iter);
   112			mutex_unlock(&memcpy_real_mutex);
   113	
   114			count -= copied;
   115			src += copied;
   116			res += copied;
   117			if (copied < len)
   118				break;
   119		}
   120		return res;
   121	}
   122	
 > 123	int memcpy_real(void *dest, unsigned long src, size_t count)
   124	{
   125		struct iov_iter iter;
   126		struct kvec kvec;
   127	
   128		kvec.iov_base = dest;
   129		kvec.iov_len = count;
   130		iov_iter_kvec(&iter, WRITE, &kvec, 1, count);
   131		if (memcpy_real_iter(&iter, src, count) < count)
   132			return -EFAULT;
   133		return 0;
   134	}
   135	

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

                 reply	other threads:[~2022-09-15  3:44 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=202209151106.vetUM3Xc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox