[masahiroy-kbuild:for-next 3/5] arch/arm/mm/copypage-v4mc.c:70:3: error: implicit declaration of function '__flush_dcache_page' is invalid in C99

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git for-next
head:   6c4457c324cd9855352e3eb1f965105901e47a6d
commit: e8c07082a810fbb9db303a2b66b66b8d7e588b53 [3/5] Kbuild: move to -std=gnu11
config: arm-randconfig-r011-20220313 (https://download.01.org/0day-ci/archive/20220314/202203141621.9GAoyWx1-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 3e4950d7fa78ac83f33bbf1658e2f49a73719236)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?id=e8c07082a810fbb9db303a2b66b66b8d7e588b53
        git remote add masahiroy-kbuild https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
        git fetch --no-tags masahiroy-kbuild for-next
        git checkout e8c07082a810fbb9db303a2b66b66b8d7e588b53
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> arch/arm/mm/copypage-v4mc.c:70:3: error: implicit declaration of function '__flush_dcache_page' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   __flush_dcache_page(page_mapping_file(from), from);
                   ^
   arch/arm/mm/copypage-v4mc.c:70:3: note: did you mean 'flush_dcache_page'?
   arch/arm/include/asm/cacheflush.h:292:13: note: 'flush_dcache_page' declared here
   extern void flush_dcache_page(struct page *);
               ^
>> arch/arm/mm/copypage-v4mc.c:74:2: error: implicit declaration of function 'set_top_pte' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
           ^
>> arch/arm/mm/copypage-v4mc.c:74:34: error: implicit declaration of function 'mk_pte' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
                                           ^
   arch/arm/mm/copypage-v4mc.c:74:47: error: use of undeclared identifier 'L_PTE_PRESENT'
           set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
                                                        ^
   arch/arm/mm/copypage-v4mc.c:23:35: note: expanded from macro 'minicache_pgprot'
   #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \
                                     ^
   arch/arm/mm/copypage-v4mc.c:74:47: error: use of undeclared identifier 'L_PTE_YOUNG'
   arch/arm/mm/copypage-v4mc.c:23:51: note: expanded from macro 'minicache_pgprot'
   #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \
                                                     ^
   arch/arm/mm/copypage-v4mc.c:74:47: error: use of undeclared identifier 'L_PTE_MT_MINICACHE'
   arch/arm/mm/copypage-v4mc.c:24:7: note: expanded from macro 'minicache_pgprot'
                                     L_PTE_MT_MINICACHE)
                                     ^
   arch/arm/mm/copypage-v4mc.c:74:14: error: use of undeclared identifier 'COPYPAGE_MINICACHE'
           set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
                       ^
   arch/arm/mm/copypage-v4mc.c:76:28: error: use of undeclared identifier 'COPYPAGE_MINICACHE'
           mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);
                                     ^
   arch/arm/mm/copypage-v4mc.c:64:6: warning: no previous prototype for function 'v4_mc_copy_user_highpage' [-Wmissing-prototypes]
   void v4_mc_copy_user_highpage(struct page *to, struct page *from,
        ^
   arch/arm/mm/copypage-v4mc.c:64:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void v4_mc_copy_user_highpage(struct page *to, struct page *from,
   ^
   static 
   arch/arm/mm/copypage-v4mc.c:86:6: warning: no previous prototype for function 'v4_mc_clear_user_highpage' [-Wmissing-prototypes]
   void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr)
        ^
   arch/arm/mm/copypage-v4mc.c:86:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr)
   ^
   static 
   arch/arm/mm/copypage-v4mc.c:109:21: error: variable has incomplete type 'struct cpu_user_fns'
   struct cpu_user_fns v4_mc_user_fns __initdata = {
                       ^
   arch/arm/mm/copypage-v4mc.c:109:8: note: forward declaration of 'struct cpu_user_fns'
   struct cpu_user_fns v4_mc_user_fns __initdata = {
          ^
   2 warnings and 9 errors generated.


vim +/__flush_dcache_page +70 arch/arm/mm/copypage-v4mc.c

d2bab05ac1f9a2 Russell King    2005-05-10  63  
7dd8c4f3526b16 Russell King    2009-01-18  64  void v4_mc_copy_user_highpage(struct page *to, struct page *from,
f00a75c094c340 Russell King    2009-10-05  65  	unsigned long vaddr, struct vm_area_struct *vma)
d2bab05ac1f9a2 Russell King    2005-05-10  66  {
5472e862de2bc4 Cong Wang       2011-11-25  67  	void *kto = kmap_atomic(to);
1c9d3df5e88ad7 Richard Purdie  2006-12-30  68  
c01778001a4f5a Catalin Marinas 2010-09-13  69  	if (!test_and_set_bit(PG_dcache_clean, &from->flags))
cb9f753a3731f7 Huang Ying      2018-04-05 @70  		__flush_dcache_page(page_mapping_file(from), from);
1c9d3df5e88ad7 Richard Purdie  2006-12-30  71  
bd31b85960a7fc Thomas Gleixner 2009-07-03  72  	raw_spin_lock(&minicache_lock);
d2bab05ac1f9a2 Russell King    2005-05-10  73  
67ece1443174d8 Russell King    2011-07-02 @74  	set_top_pte(COPYPAGE_MINICACHE, mk_pte(from, minicache_pgprot));
d2bab05ac1f9a2 Russell King    2005-05-10  75  
de27c308223dc9 Russell King    2011-07-02  76  	mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto);
d2bab05ac1f9a2 Russell King    2005-05-10  77  
bd31b85960a7fc Thomas Gleixner 2009-07-03  78  	raw_spin_unlock(&minicache_lock);
063b0a4207e43a Russell King    2008-10-31  79  
5472e862de2bc4 Cong Wang       2011-11-25  80  	kunmap_atomic(kto);
d2bab05ac1f9a2 Russell King    2005-05-10  81  }
d2bab05ac1f9a2 Russell King    2005-05-10  82  

:::::: The code at line 70 was first introduced by commit
:::::: cb9f753a3731f7fe16447bea45cb6f8e8bb432fb mm: fix races between swapoff and flush dcache

:::::: TO: Huang Ying <ying.huang@xxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux