From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50A86C433EF for ; Fri, 22 Apr 2022 06:56:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D4B9C6B0072; Fri, 22 Apr 2022 02:56:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CFAC26B0073; Fri, 22 Apr 2022 02:56:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B9C136B0074; Fri, 22 Apr 2022 02:56:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id A4CB26B0072 for ; Fri, 22 Apr 2022 02:56:11 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6C3FF246FC for ; Fri, 22 Apr 2022 06:56:11 +0000 (UTC) X-FDA: 79383605742.04.D10319A Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by imf18.hostedemail.com (Postfix) with ESMTP id 3CEB81C0025 for ; Fri, 22 Apr 2022 06:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650610570; x=1682146570; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=woXVSuBAGz1p/nvMIX6dnxqIxJiltEEBE48SXFVx2FE=; b=CER/KogMBnFT/YkfKUwG2o74ae9s4nKVVFussrEgHVNNZg4fSvHdWvUf QptnG8z0bGtuTDl6bsvQPK43a5/KTpKFjlVd6HgMJR5t28XN5tnnLIb5m Q64axgH+gqndDO8jB9AycyJX1FHchB8/3b6WKk9YhsXNlDUkfddYdGc4Z N+g+knhfrAMZ3BiGi+GACRhP59QxHzO1+GNPftam7PW6nvF1G9Kv9zerG yMwU6S6gfZvSQdUd81kgtnbo0xRWF5dqZrFg28KXvneXkJ8cXVeFVqbLE 2FrsCvJL8EFlPS4XmaP4lYgWJOfa4HRcpBMiPtzG1skIrBjtU4PPY6Kf9 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10324"; a="325046605" X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="325046605" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 23:55:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,281,1643702400"; d="scan'208";a="615277913" Received: from lkp-server01.sh.intel.com (HELO 3abc53900bec) ([10.239.97.150]) by fmsmga008.fm.intel.com with ESMTP; 21 Apr 2022 23:55:52 -0700 Received: from kbuild by 3abc53900bec with local (Exim 4.95) (envelope-from ) id 1nhnCp-0009LO-QU; Fri, 22 Apr 2022 06:55:51 +0000 Date: Fri, 22 Apr 2022 14:55:43 +0800 From: kernel test robot To: Anshuman Khandual , linux-mm@kvack.org, akpm@linux-foundation.org Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Anshuman Khandual , Christoph Hellwig , linux-arch@vger.kernel.org, Thomas Bogendoerfer , linux-m68k@lists.linux-m68k.org Subject: Re: [PATCH V2 08/30] m68k/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT Message-ID: <202202211826.rxBv4dl1-lkp@intel.com> References: <1645425519-9034-9-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1645425519-9034-9-git-send-email-anshuman.khandual@arm.com> X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 3CEB81C0025 X-Stat-Signature: gray9zkq1q5sn3m7hgh9saehtwcg6gjz Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="CER/KogM"; spf=none (imf18.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 134.134.136.31) smtp.mailfrom=lkp@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-HE-Tag: 1650610568-96490 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 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 12 #include 13 #include 14 #include 15 #include 16 #include 17 #include 18 #include 19 #include 20 #include 21 #include 22 23 #include 24 #include 25 #include 26 #include 27 #include 28 #include 29 #include 30 #ifdef CONFIG_ATARI 31 #include 32 #endif 33 #include 34 #include 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