tree: https://github.com/ammarfaizi2/linux-block akpm/mm/mm-unstable head: b62e8196de8602c16d6ea10807d147b480db2712 commit: 3998ff1605c2fed98599644259ee92f7154a4907 [313/353] xtensa/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE config: xtensa-randconfig-r023-20230112 compiler: xtensa-linux-gcc (GCC) 12.1.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/3998ff1605c2fed98599644259ee92f7154a4907 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block akpm/mm/mm-unstable git checkout 3998ff1605c2fed98599644259ee92f7154a4907 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=xtensa olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=xtensa 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: In function 'pte_swap_exclusive_tests': >> mm/debug_vm_pgtable.c:814:43: error: implicit declaration of function 'generic_max_swapfile_size' [-Werror=implicit-function-declaration] 814 | unsigned long max_swapfile_size = generic_max_swapfile_size(); | ^~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors 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