tree: https://github.com/ammarfaizi2/linux-block akpm/mm/mm-unstable head: b62e8196de8602c16d6ea10807d147b480db2712 commit: fc36c361597631e6d410405e68cfcf19d0f16e12 [307/353] riscv/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE config: riscv-randconfig-r006-20230112 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 8d9828ef5aa9688500657d36cd2aefbe12bbd162) 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 riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/ammarfaizi2/linux-block/commit/fc36c361597631e6d410405e68cfcf19d0f16e12 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block akpm/mm/mm-unstable git checkout fc36c361597631e6d410405e68cfcf19d0f16e12 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): >> mm/debug_vm_pgtable.c:814:36: error: call to undeclared function 'generic_max_swapfile_size'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] unsigned long max_swapfile_size = generic_max_swapfile_size(); ^ 1 error generated. vim +/generic_max_swapfile_size +814 mm/debug_vm_pgtable.c 05289402d71736 Anshuman Khandual 2020-08-06 810 210d1e8af42df0 David Hildenbrand 2022-05-09 811 static void __init pte_swap_exclusive_tests(struct pgtable_debug_args *args) 210d1e8af42df0 David Hildenbrand 2022-05-09 812 { 210d1e8af42df0 David Hildenbrand 2022-05-09 813 #ifdef __HAVE_ARCH_PTE_SWP_EXCLUSIVE 2234b0437c6fa6 David Hildenbrand 2023-01-13 @814 unsigned long max_swapfile_size = generic_max_swapfile_size(); 2234b0437c6fa6 David Hildenbrand 2023-01-13 815 swp_entry_t entry, entry2; 2234b0437c6fa6 David Hildenbrand 2023-01-13 816 pte_t pte; 210d1e8af42df0 David Hildenbrand 2022-05-09 817 210d1e8af42df0 David Hildenbrand 2022-05-09 818 pr_debug("Validating PTE swap exclusive\n"); 2234b0437c6fa6 David Hildenbrand 2023-01-13 819 2234b0437c6fa6 David Hildenbrand 2023-01-13 820 /* Create a swp entry with all possible bits set */ 2234b0437c6fa6 David Hildenbrand 2023-01-13 821 entry = swp_entry((1 << MAX_SWAPFILES_SHIFT) - 1, 2234b0437c6fa6 David Hildenbrand 2023-01-13 822 max_swapfile_size - 1); 2234b0437c6fa6 David Hildenbrand 2023-01-13 823 2234b0437c6fa6 David Hildenbrand 2023-01-13 824 pte = swp_entry_to_pte(entry); 2234b0437c6fa6 David Hildenbrand 2023-01-13 825 WARN_ON(pte_swp_exclusive(pte)); 2234b0437c6fa6 David Hildenbrand 2023-01-13 826 WARN_ON(!is_swap_pte(pte)); 2234b0437c6fa6 David Hildenbrand 2023-01-13 827 entry2 = pte_to_swp_entry(pte); 2234b0437c6fa6 David Hildenbrand 2023-01-13 828 WARN_ON(memcmp(&entry, &entry2, sizeof(entry))); 2234b0437c6fa6 David Hildenbrand 2023-01-13 829 210d1e8af42df0 David Hildenbrand 2022-05-09 830 pte = pte_swp_mkexclusive(pte); 210d1e8af42df0 David Hildenbrand 2022-05-09 831 WARN_ON(!pte_swp_exclusive(pte)); 2234b0437c6fa6 David Hildenbrand 2023-01-13 832 WARN_ON(!is_swap_pte(pte)); 2234b0437c6fa6 David Hildenbrand 2023-01-13 833 WARN_ON(pte_swp_soft_dirty(pte)); 2234b0437c6fa6 David Hildenbrand 2023-01-13 834 entry2 = pte_to_swp_entry(pte); 2234b0437c6fa6 David Hildenbrand 2023-01-13 835 WARN_ON(memcmp(&entry, &entry2, sizeof(entry))); 2234b0437c6fa6 David Hildenbrand 2023-01-13 836 210d1e8af42df0 David Hildenbrand 2022-05-09 837 pte = pte_swp_clear_exclusive(pte); 210d1e8af42df0 David Hildenbrand 2022-05-09 838 WARN_ON(pte_swp_exclusive(pte)); 2234b0437c6fa6 David Hildenbrand 2023-01-13 839 WARN_ON(!is_swap_pte(pte)); 2234b0437c6fa6 David Hildenbrand 2023-01-13 840 entry2 = pte_to_swp_entry(pte); 2234b0437c6fa6 David Hildenbrand 2023-01-13 841 WARN_ON(memcmp(&entry, &entry2, sizeof(entry))); 210d1e8af42df0 David Hildenbrand 2022-05-09 842 #endif /* __HAVE_ARCH_PTE_SWP_EXCLUSIVE */ 210d1e8af42df0 David Hildenbrand 2022-05-09 843 } 210d1e8af42df0 David Hildenbrand 2022-05-09 844 :::::: The code at line 814 was first introduced by commit :::::: 2234b0437c6fa63c611df1032c614464957e9262 mm/debug_vm_pgtable: more pte_swp_exclusive() sanity checks :::::: TO: David Hildenbrand :::::: CC: Andrew Morton -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests