tree:
https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git master
head: 34dd03a2fe9af1f1a9dbd7ec65eb1f247bdfe0db
commit: 4e14c9de85753f6debbd4e6559a3036d99696326 [15/20] mm: thp: make the THP mapcount
atomic against __split_huge_pmd_locked()
config: powerpc64-randconfig-r014-20210115 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
5b42fd8dd4e7e29125a09a41a33af7c9cb57d144)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git/commit/?id=...
git remote add aa
https://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git
git fetch --no-tags aa master
git checkout 4e14c9de85753f6debbd4e6559a3036d99696326
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> mm/swapfile.c:1649:13: error: implicit declaration of function
'page_mapcount_seq_begin' [-Werror,-Wimplicit-function-declaration]
seqcount = page_mapcount_seq_begin(page);
^
mm/swapfile.c:1649:13: note: did you mean 'page_mapcount_reset'?
include/linux/mm.h:832:20: note: 'page_mapcount_reset' declared here
static inline void page_mapcount_reset(struct page *page)
^
> mm/swapfile.c:1680:6: error: implicit declaration of function
'page_mapcount_seq_retry' [-Werror,-Wimplicit-function-declaration]
if (page_mapcount_seq_retry(page, seqcount))
^
mm/swapfile.c:1680:6: note: did you mean 'page_mapcount_seq_begin'?
mm/swapfile.c:1649:13: note: 'page_mapcount_seq_begin' declared here
seqcount = page_mapcount_seq_begin(page);
^
2 errors generated.
vim +/page_mapcount_seq_begin +1649 mm/swapfile.c
1622
1623 static int page_trans_huge_map_swapcount(struct page *page, int *total_mapcount,
1624 int *total_swapcount)
1625 {
1626 int i, map_swapcount, _total_mapcount, _total_swapcount;
1627 unsigned long offset = 0;
1628 struct swap_info_struct *si;
1629 struct swap_cluster_info *ci = NULL;
1630 unsigned char *map = NULL;
1631 int mapcount, swapcount = 0;
1632 unsigned long seqcount;
1633
1634 /* hugetlbfs shouldn't call it */
1635 VM_BUG_ON_PAGE(PageHuge(page), page);
1636
1637 if (!IS_ENABLED(CONFIG_THP_SWAP) || likely(!PageTransCompound(page))) {
1638 mapcount = page_trans_huge_mapcount(page, total_mapcount);
1639 if (PageSwapCache(page))
1640 swapcount = page_swapcount(page);
1641 if (total_swapcount)
1642 *total_swapcount = swapcount;
1643 return mapcount + swapcount;
1644 }
1645
1646 page = compound_head(page);
1647
1648 again:
1649 seqcount = page_mapcount_seq_begin(page);
1650
1651 _total_mapcount = _total_swapcount = map_swapcount = 0;
1652 if (PageSwapCache(page)) {
1653 swp_entry_t entry;
1654
1655 entry.val = page_private(page);
1656 si = _swap_info_get(entry);
1657 if (si) {
1658 map = si->swap_map;
1659 offset = swp_offset(entry);
1660 }
1661 }
1662 if (map)
1663 ci = lock_cluster(si, offset);
1664 for (i = 0; i < HPAGE_PMD_NR; i++) {
1665 mapcount = atomic_read(&page[i]._mapcount) + 1;
1666 _total_mapcount += mapcount;
1667 if (map) {
1668 swapcount = swap_count(map[offset + i]);
1669 _total_swapcount += swapcount;
1670 }
1671 map_swapcount = max(map_swapcount, mapcount + swapcount);
1672 }
1673 unlock_cluster(ci);
1674 if (PageDoubleMap(page)) {
1675 map_swapcount -= 1;
1676 _total_mapcount -= HPAGE_PMD_NR;
1677 }
1678 mapcount = compound_mapcount(page);
1679
1680 if (page_mapcount_seq_retry(page, seqcount))
1681 goto again;
1682
1683 map_swapcount += mapcount;
1684 _total_mapcount += mapcount;
1685 if (total_mapcount)
1686 *total_mapcount = _total_mapcount;
1687 if (total_swapcount)
1688 *total_swapcount = _total_swapcount;
1689
1690 return map_swapcount;
1691 }
1692
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org