tree:
git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
arm64-ro-page-tables-pkvm
head: 425e4c538636c6eee64a70caec0deadf0182c36d
commit: 94092d3df6c5818ae5cfed7e6ceda14c0799161d [25/26] mm: HACK provide target address
when migrating a PMD entry
config: s390-randconfig-r032-20210312 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
7b153b43d3a14d76975039408c4b922beb576735)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?id...
git remote add ardb
git://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git
git fetch --no-tags ardb arm64-ro-page-tables-pkvm
git checkout 94092d3df6c5818ae5cfed7e6ceda14c0799161d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from mm/huge_memory.c:15:
In file included from include/linux/rmap.h:12:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from mm/huge_memory.c:15:
In file included from include/linux/rmap.h:12:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from mm/huge_memory.c:15:
In file included from include/linux/rmap.h:12:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from mm/huge_memory.c:15:
In file included from include/linux/rmap.h:12:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:26:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
> mm/huge_memory.c:2031:35: error: 'pgtable_t' (aka
'pte_t *') and 'struct page *' are not pointers to compatible types
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/include/asm/page.h:173:40: note: expanded from macro 'page_to_phys'
#define page_to_phys(page) pfn_to_phys(page_to_pfn(page))
^~~~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: expanded from macro
'page_to_pfn'
#define page_to_pfn __page_to_pfn
^
include/asm-generic/memory_model.h:55:52: note: expanded from macro
'__page_to_pfn'
#define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
^ ~~~~~~~
arch/s390/include/asm/page.h:170:28: note: expanded from macro 'pfn_to_phys'
#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
^~~
arch/s390/include/asm/page.h:98:37: note: expanded from macro '__pmd'
#define __pmd(x) ((pmd_t) { (x) } )
^
mm/huge_memory.c:2031:59: error: use of undeclared identifier 'PMD_TYPE_TABLE'
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
^
mm/huge_memory.c:2198:35: error: 'pgtable_t' (aka 'pte_t *') and
'struct page *' are not pointers to compatible types
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/s390/include/asm/page.h:173:40: note: expanded from macro 'page_to_phys'
#define page_to_phys(page) pfn_to_phys(page_to_pfn(page))
^~~~~~~~~~~~~~~~~
include/asm-generic/memory_model.h:81:21: note: expanded from macro
'page_to_pfn'
#define page_to_pfn __page_to_pfn
^
include/asm-generic/memory_model.h:55:52: note: expanded from macro
'__page_to_pfn'
#define __page_to_pfn(page) (unsigned long)((page) - vmemmap)
^ ~~~~~~~
arch/s390/include/asm/page.h:170:28: note: expanded from macro 'pfn_to_phys'
#define pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
^~~
arch/s390/include/asm/page.h:98:37: note: expanded from macro '__pmd'
#define __pmd(x) ((pmd_t) { (x) } )
^
mm/huge_memory.c:2198:59: error: use of undeclared identifier 'PMD_TYPE_TABLE'
set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) | PMD_TYPE_TABLE));
^
20 warnings and 4 errors generated.
vim +2031 mm/huge_memory.c
1998
1999 static void __split_huge_zero_page_pmd(struct vm_area_struct *vma,
2000 unsigned long haddr, pmd_t *pmd)
2001 {
2002 struct mm_struct *mm = vma->vm_mm;
2003 pgtable_t pgtable;
2004 pmd_t _pmd;
2005 int i;
2006
2007 /*
2008 * Leave pmd empty until pte is filled note that it is fine to delay
2009 * notification until mmu_notifier_invalidate_range_end() as we are
2010 * replacing a zero pmd write protected page with a zero pte write
2011 * protected page.
2012 *
2013 * See Documentation/vm/mmu_notifier.rst
2014 */
2015 pmdp_huge_clear_flush(vma, haddr, pmd);
2016
2017 pgtable = pgtable_trans_huge_withdraw(mm, pmd);
2018 pmd_populate(mm, &_pmd, pgtable);
2019
2020 for (i = 0; i < HPAGE_PMD_NR; i++, haddr += PAGE_SIZE) {
2021 pte_t *pte, entry;
2022 entry = pfn_pte(my_zero_pfn(haddr), vma->vm_page_prot);
2023 entry = pte_mkspecial(entry);
2024 pte = pte_offset_map(&_pmd, haddr);
2025 VM_BUG_ON(!pte_none(*pte));
2026 set_pte_at(mm, haddr, pte, entry);
2027 pte_unmap(pte);
2028 }
2029 smp_wmb(); /* make pte visible before pmd */
2030 //pmd_populate(mm, pmd, pgtable);
2031 set_pmd_at(mm, haddr, pmd, __pmd(page_to_phys(pgtable) |
PMD_TYPE_TABLE));
2032 }
2033
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org