* [linux-next:master 2778/3213] arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd'
@ 2021-03-10 7:29 kernel test robot
2021-03-12 21:38 ` Souptick Joarder
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-03-10 7:29 UTC (permalink / raw)
To: Oscar Salvador
Cc: kbuild-all, Linux Memory Management List, David Hildenbrand,
Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 3874 bytes --]
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-s022-20210309 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-262-g5e674421-dirty
# 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
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/x86/mm/init_64.c: In function 'vmemmap_populate_hugepages':
>> arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd' [-Werror=implicit-function-declaration]
1583 | 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=implicit-function-declaration]
1589 | vmemmap_use_sub_pmd(addr, next);
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
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@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37037 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-next:master 2778/3213] arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd'
2021-03-10 7:29 [linux-next:master 2778/3213] arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd' kernel test robot
@ 2021-03-12 21:38 ` Souptick Joarder
0 siblings, 0 replies; 3+ messages in thread
From: Souptick Joarder @ 2021-03-12 21:38 UTC (permalink / raw)
To: kernel test robot
Cc: Oscar Salvador, kbuild-all, Linux Memory Management List,
David Hildenbrand, Andrew Morton
On Wed, Mar 10, 2021 at 1:02 PM kernel test robot <lkp@intel.com> wrote:
>
> 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-s022-20210309 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.3-262-g5e674421-dirty
> # 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
> make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> arch/x86/mm/init_64.c: In function 'vmemmap_populate_hugepages':
> >> arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd' [-Werror=implicit-function-declaration]
> 1583 | 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=implicit-function-declaration]
> 1589 | vmemmap_use_sub_pmd(addr, next);
> | ^~~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
>
But both the functions are defined in arch/x86/mm/init_64.c.
> 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@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* [linux-next:master 2778/3213] arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd'
@ 2021-03-10 9:35 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-03-10 9:35 UTC (permalink / raw)
To: Oscar Salvador
Cc: kbuild-all, clang-built-linux, Linux Memory Management List,
David Hildenbrand, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 4090 bytes --]
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@intel.com>
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@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34298 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-12 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 7:29 [linux-next:master 2778/3213] arch/x86/mm/init_64.c:1583:6: error: implicit declaration of function 'vmemmap_use_new_sub_pmd' kernel test robot
2021-03-12 21:38 ` Souptick Joarder
2021-03-10 9:35 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox