tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: b01d57bfdc41c8f635b08b8a5af8a31217d46936 commit: 3c583493688a0a1276f6a8c0bbc5ece84e77f086 [2778/3213] x86/vmemmap: handle unpopulated sub-pmd ranges config: x86_64-randconfig-a001-20210309 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project cd9a69289c7825d54450cb6829fef2c8e0f1963a) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3c583493688a0a1276f6a8c0bbc5ece84e77f086 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 3c583493688a0a1276f6a8c0bbc5ece84e77f086 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): >> arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd' [-Werror,-Wimplicit-function-declaration] vmemmap_use_new_sub_pmd(addr, next); ^ >> arch/x86/mm/init_64.c:1589:4: error: implicit declaration of function 'vmemmap_use_sub_pmd' [-Werror,-Wimplicit-function-declaration] vmemmap_use_sub_pmd(addr, next); ^ 2 errors generated. vim +/vmemmap_use_new_sub_pmd +1583 arch/x86/mm/init_64.c 1530 1531 static int __meminit vmemmap_populate_hugepages(unsigned long start, 1532 unsigned long end, int node, struct vmem_altmap *altmap) 1533 { 1534 unsigned long addr; 1535 unsigned long next; 1536 pgd_t *pgd; 1537 p4d_t *p4d; 1538 pud_t *pud; 1539 pmd_t *pmd; 1540 1541 for (addr = start; addr < end; addr = next) { 1542 next = pmd_addr_end(addr, end); 1543 1544 pgd = vmemmap_pgd_populate(addr, node); 1545 if (!pgd) 1546 return -ENOMEM; 1547 1548 p4d = vmemmap_p4d_populate(pgd, addr, node); 1549 if (!p4d) 1550 return -ENOMEM; 1551 1552 pud = vmemmap_pud_populate(p4d, addr, node); 1553 if (!pud) 1554 return -ENOMEM; 1555 1556 pmd = pmd_offset(pud, addr); 1557 if (pmd_none(*pmd)) { 1558 void *p; 1559 1560 p = vmemmap_alloc_block_buf(PMD_SIZE, node, altmap); 1561 if (p) { 1562 pte_t entry; 1563 1564 entry = pfn_pte(__pa(p) >> PAGE_SHIFT, 1565 PAGE_KERNEL_LARGE); 1566 set_pmd(pmd, __pmd(pte_val(entry))); 1567 1568 /* check to see if we have contiguous blocks */ 1569 if (p_end != p || node_start != node) { 1570 if (p_start) 1571 pr_debug(" [%lx-%lx] PMD -> [%p-%p] on node %d\n", 1572 addr_start, addr_end-1, p_start, p_end-1, node_start); 1573 addr_start = addr; 1574 node_start = node; 1575 p_start = p; 1576 } 1577 1578 addr_end = addr + PMD_SIZE; 1579 p_end = p + PMD_SIZE; 1580 1581 if (!IS_ALIGNED(addr, PMD_SIZE) || 1582 !IS_ALIGNED(next, PMD_SIZE)) > 1583 vmemmap_use_new_sub_pmd(addr, next); 1584 continue; 1585 } else if (altmap) 1586 return -ENOMEM; /* no fallback */ 1587 } else if (pmd_large(*pmd)) { 1588 vmemmap_verify((pte_t *)pmd, node, addr, next); > 1589 vmemmap_use_sub_pmd(addr, next); 1590 continue; 1591 } 1592 if (vmemmap_populate_basepages(addr, next, node, NULL)) 1593 return -ENOMEM; 1594 } 1595 return 0; 1596 } 1597 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip