[ammarfaizi2-block:next/linux-next/master 114/370] arch/m68k/mm/init.c:138:10: error: redefinition of 'vm_get_page_prot'

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

 



tree:   https://github.com/ammarfaizi2/linux-block next/linux-next/master
head:   06aeb1495c39c86ccfaf1adadc1d2200179f16eb
commit: 8d8d82a114a972cf7b5f2f4154aafbb338f33fb7 [114/370] m68k/mm: enable ARCH_HAS_VM_GET_PAGE_PROT
config: m68k-randconfig-r024-20220227 (https://download.01.org/0day-ci/archive/20220227/202202270856.AEAWFqnv-lkp@xxxxxxxxx/config)
compiler: m68k-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://github.com/ammarfaizi2/linux-block/commit/8d8d82a114a972cf7b5f2f4154aafbb338f33fb7
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block next/linux-next/master
        git checkout 8d8d82a114a972cf7b5f2f4154aafbb338f33fb7
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash arch/m68k/mm/

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/m68k/mm/init.c:138:10: error: redefinition of 'vm_get_page_prot'
     138 | pgprot_t vm_get_page_prot(unsigned long vm_flags)
         |          ^~~~~~~~~~~~~~~~
   In file included from arch/m68k/mm/init.c:14:
   include/linux/mm.h:2844:24: note: previous definition of 'vm_get_page_prot' with type 'pgprot_t(long unsigned int)'
    2844 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
         |                        ^~~~~~~~~~~~~~~~
   In file included from arch/m68k/include/asm/thread_info.h:6,
                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from arch/m68k/include/asm/irqflags.h:6,
                    from include/linux/irqflags.h:16,
                    from arch/m68k/include/asm/atomic.h:6,
                    from include/linux/atomic.h:7,
                    from include/linux/mm_types_task.h:13,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from arch/m68k/mm/init.c:11:
   arch/m68k/mm/init.c: In function 'vm_get_page_prot':
>> arch/m68k/mm/init.c:144:33: error: 'CF_PAGE_VALID' undeclared (first use in this function)
     144 |                 return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
         |                                 ^~~~~~~~~~~~~
   arch/m68k/include/asm/page.h:51:40: note: in definition of macro '__pgprot'
      51 | #define __pgprot(x)     ((pgprot_t) { (x) } )
         |                                        ^
   arch/m68k/mm/init.c:144:33: note: each undeclared identifier is reported only once for each function it appears in
     144 |                 return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
         |                                 ^~~~~~~~~~~~~
   arch/m68k/include/asm/page.h:51:40: note: in definition of macro '__pgprot'
      51 | #define __pgprot(x)     ((pgprot_t) { (x) } )
         |                                        ^
>> arch/m68k/mm/init.c:144:49: error: 'CF_PAGE_ACCESSED' undeclared (first use in this function); did you mean 'FGP_ACCESSED'?
     144 |                 return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
         |                                                 ^~~~~~~~~~~~~~~~
   arch/m68k/include/asm/page.h:51:40: note: in definition of macro '__pgprot'
      51 | #define __pgprot(x)     ((pgprot_t) { (x) } )
         |                                        ^
>> arch/m68k/mm/init.c:145:33: error: 'CF_PAGE_READABLE' undeclared (first use in this function); did you mean 'PAGE_READONLY'?
     145 |                                 CF_PAGE_READABLE);
         |                                 ^~~~~~~~~~~~~~~~
   arch/m68k/include/asm/page.h:51:40: note: in definition of macro '__pgprot'
      51 | #define __pgprot(x)     ((pgprot_t) { (x) } )
         |                                        ^
>> arch/m68k/mm/init.c:148:33: error: 'CF_PAGE_WRITABLE' undeclared (first use in this function); did you mean 'NR_PAGETABLE'?
     148 |                                 CF_PAGE_WRITABLE);
         |                                 ^~~~~~~~~~~~~~~~
   arch/m68k/include/asm/page.h:51:40: note: in definition of macro '__pgprot'
      51 | #define __pgprot(x)     ((pgprot_t) { (x) } )
         |                                        ^
>> arch/m68k/mm/init.c:154:33: error: 'CF_PAGE_EXEC' undeclared (first use in this function)
     154 |                                 CF_PAGE_EXEC);
         |                                 ^~~~~~~~~~~~
   arch/m68k/include/asm/page.h:51:40: note: in definition of macro '__pgprot'
      51 | #define __pgprot(x)     ((pgprot_t) { (x) } )
         |                                        ^
>> arch/m68k/mm/init.c:174:52: error: 'CF_PAGE_SHARED' undeclared (first use in this function); did you mean 'PAGE_SHARED'?
     174 |                                 CF_PAGE_READABLE | CF_PAGE_SHARED);
         |                                                    ^~~~~~~~~~~~~~
   arch/m68k/include/asm/page.h:51:40: note: in definition of macro '__pgprot'
      51 | #define __pgprot(x)     ((pgprot_t) { (x) } )
         |                                        ^


vim +/vm_get_page_prot +138 arch/m68k/mm/init.c

   131	
   132	#ifdef CONFIG_COLDFIRE
   133	/*
   134	 * Page protections for initialising protection_map. See mm/mmap.c
   135	 * for use. In general, the bit positions are xwr, and P-items are
   136	 * private, the S-items are shared.
   137	 */
 > 138	pgprot_t vm_get_page_prot(unsigned long vm_flags)
   139	{
   140		switch (vm_flags & (VM_READ | VM_WRITE | VM_EXEC | VM_SHARED)) {
   141		case VM_NONE:
   142			return PAGE_NONE;
   143		case VM_READ:
 > 144			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
 > 145					CF_PAGE_READABLE);
   146		case VM_WRITE:
   147			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
 > 148					CF_PAGE_WRITABLE);
   149		case VM_WRITE | VM_READ:
   150			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   151					CF_PAGE_READABLE | CF_PAGE_WRITABLE);
   152		case VM_EXEC:
   153			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
 > 154					CF_PAGE_EXEC);
   155		case VM_EXEC | VM_READ:
   156			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   157					CF_PAGE_READABLE | CF_PAGE_EXEC);
   158		case VM_EXEC | VM_WRITE:
   159			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   160					CF_PAGE_WRITABLE | CF_PAGE_EXEC);
   161		case VM_EXEC | VM_WRITE | VM_READ:
   162			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   163					CF_PAGE_READABLE | CF_PAGE_WRITABLE |
   164					CF_PAGE_EXEC);
   165		case VM_SHARED:
   166			return PAGE_NONE;
   167		case VM_SHARED | VM_READ:
   168			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   169					CF_PAGE_READABLE);
   170		case VM_SHARED | VM_WRITE:
   171			return PAGE_SHARED;
   172		case VM_SHARED | VM_WRITE | VM_READ:
   173			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
 > 174					CF_PAGE_READABLE | CF_PAGE_SHARED);
   175		case VM_SHARED | VM_EXEC:
   176			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   177					CF_PAGE_EXEC);
   178		case VM_SHARED | VM_EXEC | VM_READ:
   179			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   180					CF_PAGE_READABLE | CF_PAGE_EXEC);
   181		case VM_SHARED | VM_EXEC | VM_WRITE:
   182			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   183					CF_PAGE_SHARED | CF_PAGE_EXEC);
   184		case VM_SHARED | VM_EXEC | VM_WRITE | VM_READ:
   185			return __pgprot(CF_PAGE_VALID | CF_PAGE_ACCESSED |
   186					CF_PAGE_READABLE | CF_PAGE_SHARED |
   187					CF_PAGE_EXEC);
   188		default:
   189			BUILD_BUG();
   190		}
   191	}
   192	#endif
   193	

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




[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