Hi Qi, Thank you for the patch! Yet something to improve: [auto build test ERROR on hnaz-mm/master] [also build test ERROR on tip/perf/core tip/x86/core linus/master v5.15 next-20211111] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Qi-Zheng/Free-user-PTE-page-table-pages/20211110-185837 base: https://github.com/hnaz/linux-mm master config: ia64-defconfig (attached as .config) compiler: ia64-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/ce86336fbabb116520ad01162faf5c8d4a1ce124 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Qi-Zheng/Free-user-PTE-page-table-pages/20211110-185837 git checkout ce86336fbabb116520ad01162faf5c8d4a1ce124 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=ia64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): mm/memory.c: In function 'copy_pmd_range': >> mm/memory.c:1149:21: error: implicit declaration of function 'is_huge_pmd'; did you mean 'is_hugepd'? [-Werror=implicit-function-declaration] 1149 | if (is_huge_pmd(*src_pmd)) { | ^~~~~~~~~~~ | is_hugepd In file included from <command-line>: In function 'zap_pmd_range', inlined from 'zap_pud_range' at mm/memory.c:1499:10, inlined from 'zap_p4d_range' at mm/memory.c:1520:10, inlined from 'unmap_page_range' at mm/memory.c:1541:10: include/linux/compiler_types.h:335:45: error: call to '__compiletime_assert_304' declared with attribute error: BUILD_BUG failed 335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:316:25: note: in definition of macro '__compiletime_assert' 316 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert' 335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG' 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^~~~~~~~~~~~~~~~ include/linux/huge_mm.h:328:27: note: in expansion of macro 'BUILD_BUG' 328 | #define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; }) | ^~~~~~~~~ mm/memory.c:1444:44: note: in expansion of macro 'HPAGE_PMD_SIZE' 1444 | if (next - addr != HPAGE_PMD_SIZE) | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- mm/mprotect.c: In function 'change_pmd_range': >> mm/mprotect.c:260:21: error: implicit declaration of function 'is_huge_pmd'; did you mean 'is_hugepd'? [-Werror=implicit-function-declaration] 260 | if (is_huge_pmd(*pmd)) { | ^~~~~~~~~~~ | is_hugepd In file included from <command-line>: In function 'change_pmd_range', inlined from 'change_pud_range' at mm/mprotect.c:307:12, inlined from 'change_p4d_range' at mm/mprotect.c:327:12, inlined from 'change_protection_range' at mm/mprotect.c:352:12: include/linux/compiler_types.h:335:45: error: call to '__compiletime_assert_298' declared with attribute error: BUILD_BUG failed 335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:316:25: note: in definition of macro '__compiletime_assert' 316 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert' 335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG' 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^~~~~~~~~~~~~~~~ include/linux/huge_mm.h:328:27: note: in expansion of macro 'BUILD_BUG' 328 | #define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; }) | ^~~~~~~~~ mm/mprotect.c:261:44: note: in expansion of macro 'HPAGE_PMD_SIZE' 261 | if (next - addr != HPAGE_PMD_SIZE) { | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors -- mm/mremap.c: In function 'move_page_tables': >> mm/mremap.c:535:21: error: implicit declaration of function 'is_huge_pmd'; did you mean 'is_hugepd'? [-Werror=implicit-function-declaration] 535 | if (is_huge_pmd(*old_pmd)) { | ^~~~~~~~~~~ | is_hugepd In file included from <command-line>: include/linux/compiler_types.h:335:45: error: call to '__compiletime_assert_304' declared with attribute error: BUILD_BUG failed 335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^ include/linux/compiler_types.h:316:25: note: in definition of macro '__compiletime_assert' 316 | prefix ## suffix(); \ | ^~~~~~ include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert' 335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG' 59 | #define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed") | ^~~~~~~~~~~~~~~~ include/linux/huge_mm.h:328:27: note: in expansion of macro 'BUILD_BUG' 328 | #define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; }) | ^~~~~~~~~ mm/mremap.c:536:39: note: in expansion of macro 'HPAGE_PMD_SIZE' 536 | if (extent == HPAGE_PMD_SIZE && | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +1149 mm/memory.c 1132 1133 static inline int 1134 copy_pmd_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma, 1135 pud_t *dst_pud, pud_t *src_pud, unsigned long addr, 1136 unsigned long end) 1137 { 1138 struct mm_struct *dst_mm = dst_vma->vm_mm; 1139 struct mm_struct *src_mm = src_vma->vm_mm; 1140 pmd_t *src_pmd, *dst_pmd; 1141 unsigned long next; 1142 1143 dst_pmd = pmd_alloc(dst_mm, dst_pud, addr); 1144 if (!dst_pmd) 1145 return -ENOMEM; 1146 src_pmd = pmd_offset(src_pud, addr); 1147 do { 1148 next = pmd_addr_end(addr, end); > 1149 if (is_huge_pmd(*src_pmd)) { 1150 int err; 1151 VM_BUG_ON_VMA(next-addr != HPAGE_PMD_SIZE, src_vma); 1152 err = copy_huge_pmd(dst_mm, src_mm, dst_pmd, src_pmd, 1153 addr, dst_vma, src_vma); 1154 if (err == -ENOMEM) 1155 return -ENOMEM; 1156 if (!err) 1157 continue; 1158 /* fall through */ 1159 } 1160 if (pmd_none_or_clear_bad(src_pmd)) 1161 continue; 1162 if (copy_pte_range(dst_vma, src_vma, dst_pmd, src_pmd, 1163 addr, next)) 1164 return -ENOMEM; 1165 } while (dst_pmd++, src_pmd++, addr = next, addr != end); 1166 return 0; 1167 } 1168 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip