Hi James, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on kvm/queue] [also build test WARNING on arnd-asm-generic/master arm64/for-next/core linus/master v5.19-rc3] [cannot apply to next-20220624] [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/intel-lab-lkp/linux/commits/James-Houghton/hugetlb-Introduce-HugeTLB-high-granularity-mapping/20220625-014117 base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue config: s390-randconfig-r044-20220624 compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6fa9120080c35a5ff851c3fc3358692c4ef7ce0d) 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 s390 cross compiling tool for clang build # apt-get install binutils-s390x-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/c404da72c79a05fc3ed42e3dd616734ab17c7093 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review James-Houghton/hugetlb-Introduce-HugeTLB-high-granularity-mapping/20220625-014117 git checkout c404da72c79a05fc3ed42e3dd616734ab17c7093 # 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=s390 SHELL=/bin/bash arch/s390/mm/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from arch/s390/mm/gmap.c:12: In file included from include/linux/pagewalk.h:6: include/linux/hugetlb.h:1205:38: warning: declaration of 'struct hugetlb_pte' will not be visible outside of this function [-Wvisibility] int hugetlb_alloc_largest_pte(struct hugetlb_pte *hpte, struct mm_struct *mm, ^ include/linux/hugetlb.h:1212:58: warning: declaration of 'struct hugetlb_pte' will not be visible outside of this function [-Wvisibility] static inline int huge_pte_alloc_high_granularity(struct hugetlb_pte *hpte, ^ include/linux/hugetlb.h:1245:62: warning: declaration of 'struct hugetlb_pte' will not be visible outside of this function [-Wvisibility] spinlock_t *hugetlb_pte_lockptr(struct mm_struct *mm, struct hugetlb_pte *hpte) ^ include/linux/hugetlb.h:1248:14: error: incomplete definition of type 'struct hugetlb_pte' BUG_ON(!hpte->ptep); ~~~~^ include/asm-generic/bug.h:71:45: note: expanded from macro 'BUG_ON' #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) ^~~~~~~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ include/linux/hugetlb.h:1245:62: note: forward declaration of 'struct hugetlb_pte' spinlock_t *hugetlb_pte_lockptr(struct mm_struct *mm, struct hugetlb_pte *hpte) ^ include/linux/hugetlb.h:1251:6: error: call to undeclared function 'hugetlb_pte_none'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (hugetlb_pte_none(hpte) || hugetlb_pte_present_leaf(hpte)) ^ include/linux/hugetlb.h:1251:32: error: call to undeclared function 'hugetlb_pte_present_leaf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (hugetlb_pte_none(hpte) || hugetlb_pte_present_leaf(hpte)) ^ include/linux/hugetlb.h:1252:27: error: call to undeclared function 'hugetlb_pte_shift'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] return huge_pte_lockptr(hugetlb_pte_shift(hpte), ^ include/linux/hugetlb.h:1253:13: error: incomplete definition of type 'struct hugetlb_pte' mm, hpte->ptep); ~~~~^ include/linux/hugetlb.h:1245:62: note: forward declaration of 'struct hugetlb_pte' spinlock_t *hugetlb_pte_lockptr(struct mm_struct *mm, struct hugetlb_pte *hpte) ^ include/linux/hugetlb.h:1258:59: warning: declaration of 'struct hugetlb_pte' will not be visible outside of this function [-Wvisibility] spinlock_t *hugetlb_pte_lock(struct mm_struct *mm, struct hugetlb_pte *hpte) ^ include/linux/hugetlb.h:1260:44: error: incompatible pointer types passing 'struct hugetlb_pte *' to parameter of type 'struct hugetlb_pte *' [-Werror,-Wincompatible-pointer-types] spinlock_t *ptl = hugetlb_pte_lockptr(mm, hpte); ^~~~ include/linux/hugetlb.h:1245:75: note: passing argument to parameter 'hpte' here spinlock_t *hugetlb_pte_lockptr(struct mm_struct *mm, struct hugetlb_pte *hpte) ^ In file included from arch/s390/mm/gmap.c:12: include/linux/pagewalk.h:51:30: warning: declaration of 'struct hugetlb_pte' will not be visible outside of this function [-Wvisibility] int (*hugetlb_entry)(struct hugetlb_pte *hpte, ^ In file included from arch/s390/mm/gmap.c:19: include/linux/mman.h:154:9: warning: division by zero is undefined [-Wdivision-by-zero] _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mman.h:132:21: note: expanded from macro '_calc_vm_trans' : ((x) & (bit1)) / ((bit1) / (bit2)))) ^ ~~~~~~~~~~~~~~~~~ >> arch/s390/mm/gmap.c:2623:46: warning: declaration of 'struct hugetlb_pte' will not be visible outside of this function [-Wvisibility] static int __s390_enable_skey_hugetlb(struct hugetlb_pte *hpte, ^ arch/s390/mm/gmap.c:2627:7: error: call to undeclared function 'hugetlb_pte_present_leaf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (!hugetlb_pte_present_leaf(hpte) || ^ arch/s390/mm/gmap.c:2628:4: error: call to undeclared function 'hugetlb_pte_size'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] hugetlb_pte_size(hpte) != PMD_SIZE) ^ arch/s390/mm/gmap.c:2628:4: note: did you mean 'hugetlb_pte_lock'? include/linux/hugetlb.h:1258:13: note: 'hugetlb_pte_lock' declared here spinlock_t *hugetlb_pte_lock(struct mm_struct *mm, struct hugetlb_pte *hpte) ^ arch/s390/mm/gmap.c:2631:24: error: use of undeclared identifier 'pte' pmd_t *pmd = (pmd_t *)pte; ^ >> arch/s390/mm/gmap.c:2631:9: warning: mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement] pmd_t *pmd = (pmd_t *)pte; ^ arch/s390/mm/gmap.c:2654:20: error: incompatible function pointer types initializing 'int (*)(struct hugetlb_pte *, unsigned long, unsigned long, struct mm_walk *)' with an expression of type 'int (struct hugetlb_pte *, unsigned long, unsigned long, struct mm_walk *)' [-Werror,-Wincompatible-function-pointer-types] .hugetlb_entry = __s390_enable_skey_hugetlb, ^~~~~~~~~~~~~~~~~~~~~~~~~~ 8 warnings and 10 errors generated. vim +2623 arch/s390/mm/gmap.c 2622 > 2623 static int __s390_enable_skey_hugetlb(struct hugetlb_pte *hpte, 2624 unsigned long addr, unsigned long next, 2625 struct mm_walk *walk) 2626 { 2627 if (!hugetlb_pte_present_leaf(hpte) || 2628 hugetlb_pte_size(hpte) != PMD_SIZE) 2629 return -EINVAL; 2630 > 2631 pmd_t *pmd = (pmd_t *)pte; 2632 unsigned long start, end; 2633 struct page *page = pmd_page(*pmd); 2634 2635 /* 2636 * The write check makes sure we do not set a key on shared 2637 * memory. This is needed as the walker does not differentiate 2638 * between actual guest memory and the process executable or 2639 * shared libraries. 2640 */ 2641 if (pmd_val(*pmd) & _SEGMENT_ENTRY_INVALID || 2642 !(pmd_val(*pmd) & _SEGMENT_ENTRY_WRITE)) 2643 return 0; 2644 2645 start = pmd_val(*pmd) & HPAGE_MASK; 2646 end = start + HPAGE_SIZE - 1; 2647 __storage_key_init_range(start, end); 2648 set_bit(PG_arch_1, &page->flags); 2649 cond_resched(); 2650 return 0; 2651 } 2652 -- 0-DAY CI Kernel Test Service https://01.org/lkp