Re: [PATCH 2/2] x86/vmemmap: Handle unpopulated sub-pmd ranges
From: kernel test robot <hidden>
Date: 2021-02-02 20:17:50
Also in:
oe-kbuild-all
Hi Oscar, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/x86/mm] [also build test ERROR on hnaz-linux-mm/master v5.11-rc6 next-20210125] [cannot apply to luto/next] [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/0day-ci/linux/commits/Oscar-Salvador/Cleanup-and-fixups-for-vmemmap-handling/20210202-192636 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 167dcfc08b0b1f964ea95d410aa496fd78adf475 config: x86_64-randconfig-r004-20210202 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 275c6af7d7f1ed63a03d05b4484413e447133269) 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://github.com/0day-ci/linux/commit/2995155f4651bbb8c0d5f2e58e6e77321c5a889a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Oscar-Salvador/Cleanup-and-fixups-for-vmemmap-handling/20210202-192636 git checkout 2995155f4651bbb8c0d5f2e58e6e77321c5a889a # 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 <redacted> All errors (new ones prefixed by >>):
quoted
arch/x86/mm/init_64.c:1588:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd' [-Werror,-Wimplicit-function-declaration]
vmemmap_use_new_sub_pmd(addr, next);
^quoted
arch/x86/mm/init_64.c:1594: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 +1588 arch/x86/mm/init_64.c
1535
1536 static int __meminit vmemmap_populate_hugepages(unsigned long start,
1537 unsigned long end, int node, struct vmem_altmap *altmap)
1538 {
1539 unsigned long addr;
1540 unsigned long next;
1541 pgd_t *pgd;
1542 p4d_t *p4d;
1543 pud_t *pud;
1544 pmd_t *pmd;
1545
1546 for (addr = start; addr < end; addr = next) {
1547 next = pmd_addr_end(addr, end);
1548
1549 pgd = vmemmap_pgd_populate(addr, node);
1550 if (!pgd)
1551 return -ENOMEM;
1552
1553 p4d = vmemmap_p4d_populate(pgd, addr, node);
1554 if (!p4d)
1555 return -ENOMEM;
1556
1557 pud = vmemmap_pud_populate(p4d, addr, node);
1558 if (!pud)
1559 return -ENOMEM;
1560
1561 pmd = pmd_offset(pud, addr);
1562 if (pmd_none(*pmd)) {
1563 void *p;
1564
1565 p = vmemmap_alloc_block_buf(PMD_SIZE, node, altmap);
1566 if (p) {
1567 pte_t entry;
1568
1569 entry = pfn_pte(__pa(p) >> PAGE_SHIFT,
1570 PAGE_KERNEL_LARGE);
1571 set_pmd(pmd, __pmd(pte_val(entry)));
1572
1573 /* check to see if we have contiguous blocks */
1574 if (p_end != p || node_start != node) {
1575 if (p_start)
1576 pr_debug(" [%lx-%lx] PMD -> [%p-%p] on node %d\n",
1577 addr_start, addr_end-1, p_start, p_end-1, node_start);
1578 addr_start = addr;
1579 node_start = node;
1580 p_start = p;
1581 }
1582
1583 addr_end = addr + PMD_SIZE;
1584 p_end = p + PMD_SIZE;
1585
1586 if (!IS_ALIGNED(addr, PMD_SIZE) ||
1587 !IS_ALIGNED(next, PMD_SIZE))1588 vmemmap_use_new_sub_pmd(addr, next);
1589 continue;
1590 } else if (altmap)
1591 return -ENOMEM; /* no fallback */
1592 } else if (pmd_large(*pmd)) {
1593 vmemmap_verify((pte_t *)pmd, node, addr, next);1594 vmemmap_use_sub_pmd(addr, next);
1595 continue; 1596 } 1597 if (vmemmap_populate_basepages(addr, next, node, NULL)) 1598 return -ENOMEM; 1599 } 1600 return 0; 1601 } 1602 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Attachments
- .config.gz [application/gzip] 37199 bytes