tree:
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git pg_table/v0.0
head: fd150c5a9ef6e3e43818825c69a46de2b427dedf
commit: a28a3e30c8e9b58a6da1d5e6a4803c5580e93ce5 [11/18] mm: enable pte allocations for
pg_table
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.5.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 a28a3e30c8e9b58a6da1d5e6a4803c5580e93ce5
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
mm/memory.c: In function '__pte_alloc':
> mm/memory.c:430:3: error: implicit declaration of function
'_pmd_populate'; did you mean '_pud_populate'?
[-Werror=implicit-function-declaration]
_pmd_populate(pgt, pmd, new);
^~~~~~~~~~~~~
_pud_populate
cc1: some warnings being treated as errors
vim +430 mm/memory.c
404
405 int __pte_alloc(struct pg_table *pgt, pmd_t *pmd)
406 {
407 spinlock_t *ptl;
408 pgtable_t new = pte_alloc_one(pgt);
409 if (!new)
410 return -ENOMEM;
411
412 /*
413 * Ensure all pte setup (eg. pte page lock and page clearing) are
414 * visible before the pte is made visible to other CPUs by being
415 * put into page tables.
416 *
417 * The other side of the story is the pointer chasing in the page
418 * table walking code (when walking the page table without locking;
419 * ie. most of the time). Fortunately, these data accesses consist
420 * of a chain of data-dependent loads, meaning most CPUs (alpha
421 * being the notable exception) will already guarantee loads are
422 * seen in-order. See the alpha page table accessors for the
423 * smp_read_barrier_depends() barriers in page table walking code.
424 */
425 smp_wmb(); /* Could be smp_wmb__xxx(before|after)_spin_lock */
426
427 ptl = _pmd_lock(pgt, pmd);
428 if (likely(pmd_none(*pmd))) { /* Has another populated it ? */
429 mm_inc_nr_ptes(pgt);
430 _pmd_populate(pgt, pmd, new);
431 new = NULL;
432 }
433 spin_unlock(ptl);
434 if (new)
435 pte_free(pgt, new);
436 return 0;
437 }
438
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation