tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git pg_table/v0.0
head: fd150c5a9ef6e3e43818825c69a46de2b427dedf
commit: 794797e827272a2e9dc8ac1bae63b1ac427b015d [9/18] mm: enable pmd allocations for
pg_table
config: nds32-defconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.2.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 794797e827272a2e9dc8ac1bae63b1ac427b015d
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=nds32
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/nds32/include/asm/pgtable.h:8,
from include/linux/mm.h:99,
from mm/memory.c:43:
mm/memory.c: In function 'copy_pmd_range':
> mm/memory.c:854:22: error: passing argument 1 of
'__pmd_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types]
854 | dst_pmd = pmd_alloc(dst_mm, dst_pud, addr);
| ^~~~~~
| |
| struct mm_struct *
include/asm-generic/4level-fixup.h:16:46: note: in definition of macro
'pmd_alloc'
16 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
| ^~
In file included from mm/memory.c:43:
include/linux/mm.h:1786:48: note: expected 'struct pg_table *' but argument is
of type 'struct mm_struct *'
1786 | static inline int __pmd_alloc(struct pg_table *pgt, pud_t *pud,
| ~~~~~~~~~~~~~~~~~^~~
In file included from arch/nds32/include/asm/pgtable.h:8,
from include/linux/mm.h:99,
from mm/memory.c:43:
mm/memory.c: In function '__get_locked_pte':
mm/memory.c:1407:18: error: passing argument 1 of '__pmd_alloc' from
incompatible pointer type [-Werror=incompatible-pointer-types]
1407 | pmd = pmd_alloc(mm, pud, addr);
| ^~
| |
| struct mm_struct *
include/asm-generic/4level-fixup.h:16:46: note: in definition of macro
'pmd_alloc'
16 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
| ^~
In file included from mm/memory.c:43:
include/linux/mm.h:1786:48: note: expected 'struct pg_table *' but argument is
of type 'struct mm_struct *'
1786 | static inline int __pmd_alloc(struct pg_table *pgt, pud_t *pud,
| ~~~~~~~~~~~~~~~~~^~~
In file included from arch/nds32/include/asm/pgtable.h:8,
from include/linux/mm.h:99,
from mm/memory.c:43:
mm/memory.c: In function 'remap_pmd_range':
mm/memory.c:1826:18: error: passing argument 1 of '__pmd_alloc' from
incompatible pointer type [-Werror=incompatible-pointer-types]
1826 | pmd = pmd_alloc(mm, pud, addr);
| ^~
| |
| struct mm_struct *
include/asm-generic/4level-fixup.h:16:46: note: in definition of macro
'pmd_alloc'
16 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
| ^~
In file included from mm/memory.c:43:
include/linux/mm.h:1786:48: note: expected 'struct pg_table *' but argument is
of type 'struct mm_struct *'
1786 | static inline int __pmd_alloc(struct pg_table *pgt, pud_t *pud,
| ~~~~~~~~~~~~~~~~~^~~
In file included from arch/nds32/include/asm/pgtable.h:8,
from include/linux/mm.h:99,
from mm/memory.c:43:
mm/memory.c: In function 'apply_to_pmd_range':
mm/memory.c:2045:18: error: passing argument 1 of '__pmd_alloc' from
incompatible pointer type [-Werror=incompatible-pointer-types]
2045 | pmd = pmd_alloc(mm, pud, addr);
| ^~
| |
| struct mm_struct *
include/asm-generic/4level-fixup.h:16:46: note: in definition of macro
'pmd_alloc'
16 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
| ^~
In file included from mm/memory.c:43:
include/linux/mm.h:1786:48: note: expected 'struct pg_table *' but argument is
of type 'struct mm_struct *'
1786 | static inline int __pmd_alloc(struct pg_table *pgt, pud_t *pud,
| ~~~~~~~~~~~~~~~~~^~~
In file included from arch/nds32/include/asm/pgtable.h:8,
from include/linux/mm.h:99,
from mm/memory.c:43:
mm/memory.c: In function '__handle_mm_fault':
mm/memory.c:3940:22: error: passing argument 1 of '__pmd_alloc' from
incompatible pointer type [-Werror=incompatible-pointer-types]
3940 | vmf.pmd = pmd_alloc(mm, vmf.pud, address);
| ^~
| |
| struct mm_struct *
include/asm-generic/4level-fixup.h:16:46: note: in definition of macro
'pmd_alloc'
16 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
| ^~
In file included from mm/memory.c:43:
include/linux/mm.h:1786:48: note: expected 'struct pg_table *' but argument is
of type 'struct mm_struct *'
1786 | static inline int __pmd_alloc(struct pg_table *pgt, pud_t *pud,
| ~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
--
In file included from arch/nds32/include/asm/pgtable.h:8,
from include/linux/mm.h:99,
from mm/mremap.c:11:
mm/mremap.c: In function 'alloc_new_pmd':
> mm/mremap.c:75:18: error: passing argument 1 of
'__pmd_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types]
75 | pmd = pmd_alloc(mm, pud, addr);
| ^~
| |
| struct mm_struct *
include/asm-generic/4level-fixup.h:16:46: note: in definition of macro
'pmd_alloc'
16 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
| ^~
In file included from mm/mremap.c:11:
include/linux/mm.h:1786:48: note: expected 'struct pg_table *' but argument is
of type 'struct mm_struct *'
1786 | static inline int __pmd_alloc(struct pg_table *pgt, pud_t *pud,
| ~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
--
In file included from arch/nds32/include/asm/pgtable.h:8,
from include/linux/mm.h:99,
from mm/vmalloc.c:13:
mm/vmalloc.c: In function 'vmap_pmd_range':
> mm/vmalloc.c:169:18: error: passing argument 1 of
'__pmd_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types]
169 | pmd = pmd_alloc(&init_mm, pud, addr);
| ^~~~~~~~
| |
| struct mm_struct *
include/asm-generic/4level-fixup.h:16:46: note: in definition of macro
'pmd_alloc'
16 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
| ^~
In file included from mm/vmalloc.c:13:
include/linux/mm.h:1786:48: note: expected 'struct pg_table *' but argument is
of type 'struct mm_struct *'
1786 | static inline int __pmd_alloc(struct pg_table *pgt, pud_t *pud,
| ~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
--
In file included from arch/nds32/include/asm/pgtable.h:8,
from include/linux/mm.h:99,
from lib/ioremap.c:10:
lib/ioremap.c: In function 'ioremap_pmd_range':
> lib/ioremap.c:109:18: error: passing argument 1 of
'__pmd_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types]
109 | pmd = pmd_alloc(&init_mm, pud, addr);
| ^~~~~~~~
| |
| struct mm_struct *
include/asm-generic/4level-fixup.h:16:46: note: in definition of macro
'pmd_alloc'
16 | ((unlikely(pgd_none(*(pud))) && __pmd_alloc(mm, pud, address))? \
| ^~
In file included from lib/ioremap.c:10:
include/linux/mm.h:1786:48: note: expected 'struct pg_table *' but argument is
of type 'struct mm_struct *'
1786 | static inline int __pmd_alloc(struct pg_table *pgt, pud_t *pud,
| ~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
vim +/__pmd_alloc +854 mm/memory.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 846
^1da177e4c3f41 Linus Torvalds 2005-04-16 847 static inline int copy_pmd_range(struct
mm_struct *dst_mm, struct mm_struct *src_mm,
^1da177e4c3f41 Linus Torvalds 2005-04-16 848 pud_t *dst_pud, pud_t *src_pud, struct
vm_area_struct *vma,
^1da177e4c3f41 Linus Torvalds 2005-04-16 849 unsigned long addr, unsigned long end)
^1da177e4c3f41 Linus Torvalds 2005-04-16 850 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 851 pmd_t *src_pmd, *dst_pmd;
^1da177e4c3f41 Linus Torvalds 2005-04-16 852 unsigned long next;
^1da177e4c3f41 Linus Torvalds 2005-04-16 853
^1da177e4c3f41 Linus Torvalds 2005-04-16 @854 dst_pmd = pmd_alloc(dst_mm, dst_pud,
addr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 855 if (!dst_pmd)
^1da177e4c3f41 Linus Torvalds 2005-04-16 856 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 857 src_pmd = pmd_offset(src_pud, addr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 858 do {
^1da177e4c3f41 Linus Torvalds 2005-04-16 859 next = pmd_addr_end(addr, end);
84c3fc4e9c563d Zi Yan 2017-09-08 860 if (is_swap_pmd(*src_pmd) ||
pmd_trans_huge(*src_pmd)
84c3fc4e9c563d Zi Yan 2017-09-08 861 || pmd_devmap(*src_pmd)) {
71e3aac0724ffe Andrea Arcangeli 2011-01-13 862 int err;
a00cc7d9dd93d6 Matthew Wilcox 2017-02-24 863 VM_BUG_ON_VMA(next-addr !=
HPAGE_PMD_SIZE, vma);
71e3aac0724ffe Andrea Arcangeli 2011-01-13 864 err = copy_huge_pmd(dst_mm, src_mm,
71e3aac0724ffe Andrea Arcangeli 2011-01-13 865 dst_pmd, src_pmd, addr, vma);
71e3aac0724ffe Andrea Arcangeli 2011-01-13 866 if (err == -ENOMEM)
71e3aac0724ffe Andrea Arcangeli 2011-01-13 867 return -ENOMEM;
71e3aac0724ffe Andrea Arcangeli 2011-01-13 868 if (!err)
71e3aac0724ffe Andrea Arcangeli 2011-01-13 869 continue;
71e3aac0724ffe Andrea Arcangeli 2011-01-13 870 /* fall through */
71e3aac0724ffe Andrea Arcangeli 2011-01-13 871 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 872 if (pmd_none_or_clear_bad(src_pmd))
^1da177e4c3f41 Linus Torvalds 2005-04-16 873 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 874 if (copy_pte_range(dst_mm, src_mm,
dst_pmd, src_pmd,
^1da177e4c3f41 Linus Torvalds 2005-04-16 875 vma, addr, next))
^1da177e4c3f41 Linus Torvalds 2005-04-16 876 return -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 877 } while (dst_pmd++, src_pmd++, addr =
next, addr != end);
^1da177e4c3f41 Linus Torvalds 2005-04-16 878 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 879 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 880
:::::: The code at line 854 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation