All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>,
	linux-mm@kvack.org, akpm@linux-foundation.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-arch@vger.kernel.org,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-m68k@lists.linux-m68k.org
Subject: Re: [PATCH V2 08/30] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT
Date: Fri, 22 Apr 2022 14:55:43 +0800	[thread overview]
Message-ID: <202202211826.rxBv4dl1-lkp@intel.com> (raw)
In-Reply-To: <1645425519-9034-9-git-send-email-anshuman.khandual@arm.com>

Hi Anshuman,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on hnaz-mm/master]

url:    https://github.com/0day-ci/linux/commits/Anshuman-Khandual/mm-mmap-Drop-protection_map-and-platform-s-__SXXX-__PXXX-requirements/20220221-144133
base:   https://github.com/hnaz/linux-mm master
config: m68k-randconfig-r033-20220221 (https://download.01.org/0day-ci/archive/20220221/202202211826.rxBv4dl1-lkp@intel.com/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/0day-ci/linux/commit/e75c29d8b212cfab904914acdd5a027fb15d2f16
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Anshuman-Khandual/mm-mmap-Drop-protection_map-and-platform-s-__SXXX-__PXXX-requirements/20220221-144133
        git checkout e75c29d8b212cfab904914acdd5a027fb15d2f16
        # 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@intel.com>

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:2801:24: note: previous definition of 'vm_get_page_prot' with type 'pgprot_t(long unsigned int)'
    2801 | 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

  > 11	#include <linux/module.h>
    12	#include <linux/signal.h>
    13	#include <linux/sched.h>
    14	#include <linux/mm.h>
    15	#include <linux/swap.h>
    16	#include <linux/kernel.h>
    17	#include <linux/string.h>
    18	#include <linux/types.h>
    19	#include <linux/init.h>
    20	#include <linux/memblock.h>
    21	#include <linux/gfp.h>
    22	
    23	#include <asm/setup.h>
    24	#include <linux/uaccess.h>
    25	#include <asm/page.h>
    26	#include <asm/pgalloc.h>
    27	#include <asm/traps.h>
    28	#include <asm/machdep.h>
    29	#include <asm/io.h>
    30	#ifdef CONFIG_ATARI
    31	#include <asm/atari_stram.h>
    32	#endif
    33	#include <asm/sections.h>
    34	#include <asm/tlb.h>
    35	
    36	/*
    37	 * ZERO_PAGE is a special page that is used for zero-initialized
    38	 * data and COW.
    39	 */
    40	void *empty_zero_page;
    41	EXPORT_SYMBOL(empty_zero_page);
    42	
    43	#ifdef CONFIG_MMU
    44	
    45	int m68k_virt_to_node_shift;
    46	
    47	void __init m68k_setup_node(int node)
    48	{
    49		node_set_online(node);
    50	}
    51	
    52	#else /* CONFIG_MMU */
    53	
    54	/*
    55	 * paging_init() continues the virtual memory environment setup which
    56	 * was begun by the code in arch/head.S.
    57	 * The parameters are pointers to where to stick the starting and ending
    58	 * addresses of available kernel virtual memory.
    59	 */
    60	void __init paging_init(void)
    61	{
    62		/*
    63		 * Make sure start_mem is page aligned, otherwise bootmem and
    64		 * page_alloc get different views of the world.
    65		 */
    66		unsigned long end_mem = memory_end & PAGE_MASK;
    67		unsigned long max_zone_pfn[MAX_NR_ZONES] = { 0, };
    68	
    69		high_memory = (void *) end_mem;
    70	
    71		empty_zero_page = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
    72		if (!empty_zero_page)
    73			panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
    74			      __func__, PAGE_SIZE, PAGE_SIZE);
    75		max_zone_pfn[ZONE_DMA] = end_mem >> PAGE_SHIFT;
    76		free_area_init(max_zone_pfn);
    77	}
    78	
    79	#endif /* CONFIG_MMU */
    80	
    81	void free_initmem(void)
    82	{
    83	#ifndef CONFIG_MMU_SUN3
    84		free_initmem_default(-1);
    85	#endif /* CONFIG_MMU_SUN3 */
    86	}
    87	
    88	#if defined(CONFIG_MMU) && !defined(CONFIG_COLDFIRE)
    89	#define VECTORS	&vectors[0]
    90	#else
    91	#define VECTORS	_ramvec
    92	#endif
    93	
    94	static inline void init_pointer_tables(void)
    95	{
    96	#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
    97		int i, j;
    98	
    99		/* insert pointer tables allocated so far into the tablelist */
   100		init_pointer_table(kernel_pg_dir, TABLE_PGD);
   101		for (i = 0; i < PTRS_PER_PGD; i++) {
   102			pud_t *pud = (pud_t *)&kernel_pg_dir[i];
   103			pmd_t *pmd_dir;
   104	
   105			if (!pud_present(*pud))
   106				continue;
   107	
   108			pmd_dir = (pmd_t *)pgd_page_vaddr(kernel_pg_dir[i]);
   109			init_pointer_table(pmd_dir, TABLE_PMD);
   110	
   111			for (j = 0; j < PTRS_PER_PMD; j++) {
   112				pmd_t *pmd = &pmd_dir[j];
   113				pte_t *pte_dir;
   114	
   115				if (!pmd_present(*pmd))
   116					continue;
   117	
   118				pte_dir = (pte_t *)pmd_page_vaddr(*pmd);
   119				init_pointer_table(pte_dir, TABLE_PTE);
   120			}
   121		}
   122	#endif
   123	}
   124	
   125	void __init mem_init(void)
   126	{
   127		/* this will put all memory onto the freelists */
   128		memblock_free_all();
   129		init_pointer_tables();
   130	}
   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@lists.01.org

  parent reply	other threads:[~2022-04-22  6:56 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21  6:38 [PATCH V2 00/30] mm/mmap: Drop protection_map[] and platform's __SXXX/__PXXX requirements Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 01/30] mm/debug_vm_pgtable: Drop protection_map[] usage Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 02/30] mm/mmap: Clarify protection_map[] indices Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 03/30] mm/mmap: Add new config ARCH_HAS_VM_GET_PAGE_PROT Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 04/30] powerpc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT Anshuman Khandual
2022-02-21  6:38   ` Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 05/30] arm64/mm: " Anshuman Khandual
2022-02-21  6:38   ` Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 06/30] sparc/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 07/30] mips/mm: " Anshuman Khandual
2022-02-21  9:55   ` Thomas Bogendoerfer
2022-02-21  6:38 ` [PATCH V2 08/30] m68k/mm: " Anshuman Khandual
2022-02-21 11:54   ` Geert Uytterhoeven
2022-02-22  5:44     ` Anshuman Khandual
2022-02-25  9:02     ` Geert Uytterhoeven
2022-02-25  9:35       ` Anshuman Khandual
2022-04-22  6:55   ` kernel test robot [this message]
2022-02-21  6:38 ` [PATCH V2 09/30] arm/mm: " Anshuman Khandual
2022-02-21  6:38   ` Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 10/30] x86/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 11/30] mm/mmap: Drop protection_map[] Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 12/30] mm/mmap: Drop arch_filter_pgprot() Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 13/30] mm/mmap: Drop arch_vm_get_page_pgprot() Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 14/30] s390/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT Anshuman Khandual
2022-02-21  7:09   ` Sven Schnelle
2022-02-23 11:18   ` Alexander Gordeev
2022-02-21  6:38 ` [PATCH V2 15/30] riscv/mm: " Anshuman Khandual
2022-02-21  6:38   ` Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 16/30] alpha/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 17/30] sh/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 18/30] arc/mm: " Anshuman Khandual
2022-02-21  6:38   ` Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 19/30] csky/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 20/30] extensa/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 21/30] parisc/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 22/30] openrisc/mm: " Anshuman Khandual
2022-02-21  6:38   ` [OpenRISC] " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 23/30] um/mm: " Anshuman Khandual
2022-02-21  6:38   ` Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 24/30] microblaze/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 25/30] nios2/mm: " Anshuman Khandual
2022-02-22 22:56   ` Dinh Nguyen
2022-02-21  6:38 ` [PATCH V2 26/30] hexagon/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 27/30] nds32/mm: " Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 28/30] ia64/mm: " Anshuman Khandual
2022-02-21  6:50   ` Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 29/30] mm/mmap: Drop generic vm_get_page_prot() Anshuman Khandual
2022-02-21  6:38 ` [PATCH V2 30/30] mm/mmap: Drop ARCH_HAS_VM_GET_PAGE_PROT Anshuman Khandual

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=202202211826.rxBv4dl1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=hch@infradead.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mm@kvack.org \
    --cc=tsbogend@alpha.franken.de \
    /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 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.