tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 4a280fac30d27ae2aff096f9f99aa12d50f83426 [18183/23799] ascend: share_pool: support share pool features for ascend platform config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280759.ueQXB2WQ-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280759.ueQXB2WQ-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202409280759.ueQXB2WQ-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
mm/share_pool.c: In function 'sp_hugetlb_entry':
mm/share_pool.c:1542:21: error: implicit declaration of function 'huge_ptep_get' [-Werror=implicit-function-declaration]
1542 | pte_t pte = huge_ptep_get(ptep); | ^~~~~~~~~~~~~
mm/share_pool.c:1542:21: error: invalid initializer
mm/share_pool.c: In function 'sp_alloc_pages':
mm/share_pool.c:2263:24: error: implicit declaration of function 'hugetlb_alloc_hugepage'; did you mean 'vmalloc_hugepage'? [-Werror=implicit-function-declaration]
2263 | return hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~~~~~ | vmalloc_hugepage
mm/share_pool.c:2263:61: error: 'HUGETLB_ALLOC_NONE' undeclared (first use in this function); did you mean 'HUGETLB_ANON_FILE'?
2263 | return hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~ | HUGETLB_ANON_FILE mm/share_pool.c:2263:61: note: each undeclared identifier is reported only once for each function it appears in mm/share_pool.c:2266:1: warning: control reaches end of non-void function [-Wreturn-type] 2266 | } | ^ mm/share_pool.c: At top level:
mm/share_pool.c:2235:12: warning: 'spa_stat_show' defined but not used [-Wunused-function]
2235 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~
mm/share_pool.c:2121:12: warning: 'proc_stat_show' defined but not used [-Wunused-function]
2121 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors
vim +/huge_ptep_get +1542 mm/share_pool.c
1537 1538 static int sp_hugetlb_entry(pte_t *ptep, unsigned long hmask, 1539 unsigned long addr, unsigned long next, 1540 struct mm_walk *walk) 1541 {
1542 pte_t pte = huge_ptep_get(ptep);
1543 struct page *page = pte_page(pte); 1544 struct sp_walk_data *sp_walk_data; 1545 1546 if (unlikely(!pte_present(pte))) { 1547 if (printk_ratelimit()) 1548 pr_err("share pool: the page of addr %pK unexpectedly not in RAM\n", (void *)addr); 1549 return -EFAULT; 1550 } 1551 1552 sp_walk_data = walk->private; 1553 get_page(page); 1554 sp_walk_data->pages[sp_walk_data->page_count++] = page; 1555 return 0; 1556 } 1557