All of lore.kernel.org
 help / color / mirror / Atom feed
* [yhuang:autonuma-r0.7 1/36] mm/hugetlb.c:3281:29: error: implicit declaration of function 'is_migration_entry'; did you mean 'next_migration_node'?
@ 2020-02-14  6:45 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-02-14  6:45 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 25266 bytes --]

tree:   yhuang/autonuma-r0.7
head:   ef2554821d4d0e8bbfcbe6715e9f0a860614232a
commit: 654adef186771c484878df814ce23ba830262a09 [1/36] node: Define and export memory migration path
config: riscv-randconfig-a001-20200214 (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 654adef186771c484878df814ce23ba830262a09
        # 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@intel.com>

All errors (new ones prefixed by >>):

     return pte_mkwrite(pte);
            ^~~~~~~~~~~~~~~~
   include/asm-generic/hugetlb.h: In function 'huge_pte_mkdirty':
   include/asm-generic/hugetlb.h:27:9: error: implicit declaration of function 'pte_mkdirty'; did you mean 'huge_pte_mkdirty'? [-Werror=implicit-function-declaration]
     return pte_mkdirty(pte);
            ^~~~~~~~~~~
            huge_pte_mkdirty
   include/asm-generic/hugetlb.h:27:9: error: incompatible types when returning type 'int' but 'pte_t {aka struct <anonymous>}' was expected
     return pte_mkdirty(pte);
            ^~~~~~~~~~~~~~~~
   include/asm-generic/hugetlb.h: In function 'huge_pte_modify':
   include/asm-generic/hugetlb.h:32:9: error: implicit declaration of function 'pte_modify'; did you mean 'lease_modify'? [-Werror=implicit-function-declaration]
     return pte_modify(pte, newprot);
            ^~~~~~~~~~
            lease_modify
   include/asm-generic/hugetlb.h:32:9: error: incompatible types when returning type 'int' but 'pte_t {aka struct <anonymous>}' was expected
     return pte_modify(pte, newprot);
            ^~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/hugetlb.h: In function 'huge_pte_clear':
   include/asm-generic/hugetlb.h:39:2: error: implicit declaration of function 'pte_clear'; did you mean 'pud_clear'? [-Werror=implicit-function-declaration]
     pte_clear(mm, addr, ptep);
     ^~~~~~~~~
     pud_clear
   include/asm-generic/hugetlb.h: In function 'set_huge_pte_at':
   include/asm-generic/hugetlb.h:56:2: error: implicit declaration of function 'set_pte_at'; did you mean 'set_huge_pte_at'? [-Werror=implicit-function-declaration]
     set_pte_at(mm, addr, ptep, pte);
     ^~~~~~~~~~
     set_huge_pte_at
   include/asm-generic/hugetlb.h: In function 'huge_ptep_get_and_clear':
   include/asm-generic/hugetlb.h:64:9: error: implicit declaration of function 'ptep_get_and_clear'; did you mean 'huge_ptep_get_and_clear'? [-Werror=implicit-function-declaration]
     return ptep_get_and_clear(mm, addr, ptep);
            ^~~~~~~~~~~~~~~~~~
            huge_ptep_get_and_clear
   include/asm-generic/hugetlb.h:64:9: error: incompatible types when returning type 'int' but 'pte_t {aka struct <anonymous>}' was expected
     return ptep_get_and_clear(mm, addr, ptep);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/hugetlb.h: In function 'huge_ptep_clear_flush':
   include/asm-generic/hugetlb.h:72:2: error: implicit declaration of function 'ptep_clear_flush'; did you mean 'huge_ptep_clear_flush'? [-Werror=implicit-function-declaration]
     ptep_clear_flush(vma, addr, ptep);
     ^~~~~~~~~~~~~~~~
     huge_ptep_clear_flush
   include/asm-generic/hugetlb.h: In function 'huge_pte_none':
   include/asm-generic/hugetlb.h:79:9: error: implicit declaration of function 'pte_none'; did you mean 'pud_none'? [-Werror=implicit-function-declaration]
     return pte_none(pte);
            ^~~~~~~~
            pud_none
   include/asm-generic/hugetlb.h: In function 'huge_pte_wrprotect':
   include/asm-generic/hugetlb.h:86:9: error: implicit declaration of function 'pte_wrprotect'; did you mean 'huge_pte_wrprotect'? [-Werror=implicit-function-declaration]
     return pte_wrprotect(pte);
            ^~~~~~~~~~~~~
            huge_pte_wrprotect
   include/asm-generic/hugetlb.h:86:9: error: incompatible types when returning type 'int' but 'pte_t {aka struct <anonymous>}' was expected
     return pte_wrprotect(pte);
            ^~~~~~~~~~~~~~~~~~
   include/asm-generic/hugetlb.h: In function 'huge_ptep_set_wrprotect':
   include/asm-generic/hugetlb.h:109:2: error: implicit declaration of function 'ptep_set_wrprotect'; did you mean 'huge_ptep_set_wrprotect'? [-Werror=implicit-function-declaration]
     ptep_set_wrprotect(mm, addr, ptep);
     ^~~~~~~~~~~~~~~~~~
     huge_ptep_set_wrprotect
   include/asm-generic/hugetlb.h: In function 'huge_ptep_set_access_flags':
   include/asm-generic/hugetlb.h:118:9: error: implicit declaration of function 'ptep_set_access_flags'; did you mean 'huge_ptep_set_access_flags'? [-Werror=implicit-function-declaration]
     return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
            ^~~~~~~~~~~~~~~~~~~~~
            huge_ptep_set_access_flags
   mm/hugetlb.c: In function 'make_huge_pte':
   mm/hugetlb.c:3257:10: error: implicit declaration of function 'pte_mkyoung'; did you mean 'page_mapping'? [-Werror=implicit-function-declaration]
     entry = pte_mkyoung(entry);
             ^~~~~~~~~~~
             page_mapping
   mm/hugetlb.c:3257:8: error: incompatible types when assigning to type 'pte_t {aka struct <anonymous>}' from type 'int'
     entry = pte_mkyoung(entry);
           ^
   mm/hugetlb.c:3258:10: error: implicit declaration of function 'pte_mkhuge'; did you mean 'pud_huge'? [-Werror=implicit-function-declaration]
     entry = pte_mkhuge(entry);
             ^~~~~~~~~~
             pud_huge
   mm/hugetlb.c:3258:8: error: incompatible types when assigning to type 'pte_t {aka struct <anonymous>}' from type 'int'
     entry = pte_mkhuge(entry);
           ^
   mm/hugetlb.c: In function 'set_huge_ptep_writable':
   mm/hugetlb.c:3271:3: error: implicit declaration of function 'update_mmu_cache'; did you mean 'node_add_cache'? [-Werror=implicit-function-declaration]
      update_mmu_cache(vma, address, ptep);
      ^~~~~~~~~~~~~~~~
      node_add_cache
   mm/hugetlb.c: In function 'is_hugetlb_entry_migration':
   mm/hugetlb.c:3278:28: error: implicit declaration of function 'pte_present'; did you mean 'pud_present'? [-Werror=implicit-function-declaration]
     if (huge_pte_none(pte) || pte_present(pte))
                               ^~~~~~~~~~~
                               pud_present
   mm/hugetlb.c:3280:8: error: implicit declaration of function 'pte_to_swp_entry'; did you mean 'get_plt_entry'? [-Werror=implicit-function-declaration]
     swp = pte_to_swp_entry(pte);
           ^~~~~~~~~~~~~~~~
           get_plt_entry
   mm/hugetlb.c:3280:6: error: incompatible types when assigning to type 'swp_entry_t {aka struct <anonymous>}' from type 'int'
     swp = pte_to_swp_entry(pte);
         ^
   mm/hugetlb.c:3281:6: error: implicit declaration of function 'non_swap_entry'; did you mean 'init_wait_entry'? [-Werror=implicit-function-declaration]
     if (non_swap_entry(swp) && is_migration_entry(swp))
         ^~~~~~~~~~~~~~
         init_wait_entry
>> mm/hugetlb.c:3281:29: error: implicit declaration of function 'is_migration_entry'; did you mean 'next_migration_node'? [-Werror=implicit-function-declaration]
     if (non_swap_entry(swp) && is_migration_entry(swp))
                                ^~~~~~~~~~~~~~~~~~
                                next_migration_node
   mm/hugetlb.c: In function 'is_hugetlb_entry_hwpoisoned':
   mm/hugetlb.c:3293:6: error: incompatible types when assigning to type 'swp_entry_t {aka struct <anonymous>}' from type 'int'
     swp = pte_to_swp_entry(pte);
         ^
   mm/hugetlb.c:3294:29: error: implicit declaration of function 'is_hwpoison_entry'; did you mean 'hwpoison_filter'? [-Werror=implicit-function-declaration]
     if (non_swap_entry(swp) && is_hwpoison_entry(swp))
                                ^~~~~~~~~~~~~~~~~
                                hwpoison_filter
   mm/hugetlb.c: In function 'copy_hugetlb_page_range':
   mm/hugetlb.c:3359:28: error: invalid initializer
       swp_entry_t swp_entry = pte_to_swp_entry(entry);
                               ^~~~~~~~~~~~~~~~
>> mm/hugetlb.c:3361:8: error: implicit declaration of function 'is_write_migration_entry'; did you mean 'next_migration_node'? [-Werror=implicit-function-declaration]
       if (is_write_migration_entry(swp_entry) && cow) {
           ^~~~~~~~~~~~~~~~~~~~~~~~
           next_migration_node
>> mm/hugetlb.c:3366:5: error: implicit declaration of function 'make_migration_entry_read'; did you mean 'next_migration_node'? [-Werror=implicit-function-declaration]
        make_migration_entry_read(&swp_entry);
        ^~~~~~~~~~~~~~~~~~~~~~~~~
        next_migration_node
   mm/hugetlb.c:3367:13: error: implicit declaration of function 'swp_entry_to_pte'; did you mean '__d_entry_type'? [-Werror=implicit-function-declaration]
        entry = swp_entry_to_pte(swp_entry);
                ^~~~~~~~~~~~~~~~
                __d_entry_type
   mm/hugetlb.c:3367:11: error: incompatible types when assigning to type 'pte_t {aka struct <anonymous>}' from type 'int'
        entry = swp_entry_to_pte(swp_entry);
              ^
   mm/hugetlb.c:3384:14: error: implicit declaration of function 'pte_page'; did you mean 'put_page'? [-Werror=implicit-function-declaration]
       ptepage = pte_page(entry);
                 ^~~~~~~~
                 put_page
   mm/hugetlb.c:3384:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
       ptepage = pte_page(entry);
               ^
   mm/hugetlb.c:3386:4: error: implicit declaration of function 'page_dup_rmap'; did you mean 'page_is_ram'? [-Werror=implicit-function-declaration]
       page_dup_rmap(ptepage, true);
       ^~~~~~~~~~~~~
       page_is_ram
   mm/hugetlb.c: In function '__unmap_hugepage_range':
   mm/hugetlb.c:3422:2: error: implicit declaration of function 'tlb_change_page_size'; did you mean 'huge_page_size'? [-Werror=implicit-function-declaration]
     tlb_change_page_size(tlb, sz);
     ^~~~~~~~~~~~~~~~~~~~
     huge_page_size
   mm/hugetlb.c:3423:2: error: implicit declaration of function 'tlb_start_vma'; did you mean 'hstate_vma'? [-Werror=implicit-function-declaration]
     tlb_start_vma(tlb, vma);
     ^~~~~~~~~~~~~
     hstate_vma
   mm/hugetlb.c:3464:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      page = pte_page(pte);
           ^
   mm/hugetlb.c:3484:3: error: implicit declaration of function 'tlb_remove_huge_tlb_entry'; did you mean 'move_hugetlb_state'? [-Werror=implicit-function-declaration]
      tlb_remove_huge_tlb_entry(h, tlb, ptep, address);
      ^~~~~~~~~~~~~~~~~~~~~~~~~
      move_hugetlb_state
   mm/hugetlb.c:3489:3: error: implicit declaration of function 'page_remove_rmap'; did you mean 'page_anon_vma'? [-Werror=implicit-function-declaration]
      page_remove_rmap(page, true);
      ^~~~~~~~~~~~~~~~
      page_anon_vma
   mm/hugetlb.c:3492:3: error: implicit declaration of function 'tlb_remove_page_size'; did you mean 'vma_mmu_pagesize'? [-Werror=implicit-function-declaration]
      tlb_remove_page_size(tlb, page, huge_page_size(h));
      ^~~~~~~~~~~~~~~~~~~~
      vma_mmu_pagesize
   mm/hugetlb.c:3500:2: error: implicit declaration of function 'tlb_end_vma'; did you mean 'find_vma'? [-Werror=implicit-function-declaration]
     tlb_end_vma(tlb, vma);
     ^~~~~~~~~~~
     find_vma
   mm/hugetlb.c: In function 'unmap_hugepage_range':
   mm/hugetlb.c:3526:20: error: storage size of 'tlb' isn't known
     struct mmu_gather tlb;
                       ^~~
   mm/hugetlb.c:3526:20: warning: unused variable 'tlb' [-Wunused-variable]
   mm/hugetlb.c: In function 'hugetlb_cow':
   mm/hugetlb.c:3621:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     old_page = pte_page(pte);
              ^
   mm/hugetlb.c:3627:3: error: implicit declaration of function 'page_move_anon_rmap'; did you mean 'page_anon_vma'? [-Werror=implicit-function-declaration]
      page_move_anon_rmap(old_page, vma);
      ^~~~~~~~~~~~~~~~~~~
      page_anon_vma
   In file included from include/linux/kernel.h:11:0,
                    from include/linux/list.h:9,
                    from mm/hugetlb.c:6:
   mm/hugetlb.c:3670:8: error: implicit declaration of function 'pte_same'; did you mean 'pte_val'? [-Werror=implicit-function-declaration]
           pte_same(huge_ptep_get(ptep), pte)))
           ^
   include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__'
       ______r = __builtin_expect(!!(x), expect); \
                                     ^
   mm/hugetlb.c:3669:8: note: in expansion of macro 'likely'
       if (likely(ptep &&
           ^~~~~~
   mm/hugetlb.c:3715:3: error: implicit declaration of function 'hugepage_add_new_anon_rmap'; did you mean 'hugepage_new_subpool'? [-Werror=implicit-function-declaration]
      hugepage_add_new_anon_rmap(new_page, vma, haddr);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
      hugepage_new_subpool
   mm/hugetlb.c: In function 'hugetlb_fault':
   mm/hugetlb.c:4017:4: error: implicit declaration of function 'migration_entry_wait_huge' [-Werror=implicit-function-declaration]
       migration_entry_wait_huge(vma, mm, ptep);
       ^~~~~~~~~~~~~~~~~~~~~~~~~
   mm/hugetlb.c:4089:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     page = pte_page(entry);
          ^
   mm/hugetlb.c:4106:8: error: incompatible types when assigning to type 'pte_t {aka struct <anonymous>}' from type 'int'
     entry = pte_mkyoung(entry);
           ^
   mm/hugetlb.c: In function 'hugetlb_mcopy_atomic_pte':
   mm/hugetlb.c:4239:11: error: incompatible types when assigning to type 'pte_t {aka struct <anonymous>}' from type 'int'
     _dst_pte = pte_mkyoung(_dst_pte);
              ^
   mm/hugetlb.c: In function 'follow_hugetlb_page':
   mm/hugetlb.c:4330:17: error: implicit declaration of function 'is_swap_pte'; did you mean 'is_swap_pmd'? [-Werror=implicit-function-declaration]
      if (absent || is_swap_pte(huge_ptep_get(pte)) ||
                    ^~~~~~~~~~~
                    is_swap_pmd
   mm/hugetlb.c:4376:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
      page = pte_page(huge_ptep_get(pte));
           ^

vim +3281 mm/hugetlb.c

1e8f889b10d8d22 David Gibson       2006-01-06  3273  
d5ed7444dafb94b Aneesh Kumar K.V   2017-07-06  3274  bool is_hugetlb_entry_migration(pte_t pte)
4a705fef986231a Naoya Horiguchi    2014-06-23  3275  {
4a705fef986231a Naoya Horiguchi    2014-06-23  3276  	swp_entry_t swp;
4a705fef986231a Naoya Horiguchi    2014-06-23  3277  
4a705fef986231a Naoya Horiguchi    2014-06-23  3278  	if (huge_pte_none(pte) || pte_present(pte))
d5ed7444dafb94b Aneesh Kumar K.V   2017-07-06  3279  		return false;
4a705fef986231a Naoya Horiguchi    2014-06-23 @3280  	swp = pte_to_swp_entry(pte);
4a705fef986231a Naoya Horiguchi    2014-06-23 @3281  	if (non_swap_entry(swp) && is_migration_entry(swp))
d5ed7444dafb94b Aneesh Kumar K.V   2017-07-06  3282  		return true;
4a705fef986231a Naoya Horiguchi    2014-06-23  3283  	else
d5ed7444dafb94b Aneesh Kumar K.V   2017-07-06  3284  		return false;
4a705fef986231a Naoya Horiguchi    2014-06-23  3285  }
4a705fef986231a Naoya Horiguchi    2014-06-23  3286  
4a705fef986231a Naoya Horiguchi    2014-06-23  3287  static int is_hugetlb_entry_hwpoisoned(pte_t pte)
4a705fef986231a Naoya Horiguchi    2014-06-23  3288  {
4a705fef986231a Naoya Horiguchi    2014-06-23  3289  	swp_entry_t swp;
4a705fef986231a Naoya Horiguchi    2014-06-23  3290  
4a705fef986231a Naoya Horiguchi    2014-06-23  3291  	if (huge_pte_none(pte) || pte_present(pte))
4a705fef986231a Naoya Horiguchi    2014-06-23  3292  		return 0;
4a705fef986231a Naoya Horiguchi    2014-06-23  3293  	swp = pte_to_swp_entry(pte);
4a705fef986231a Naoya Horiguchi    2014-06-23 @3294  	if (non_swap_entry(swp) && is_hwpoison_entry(swp))
4a705fef986231a Naoya Horiguchi    2014-06-23  3295  		return 1;
4a705fef986231a Naoya Horiguchi    2014-06-23  3296  	else
4a705fef986231a Naoya Horiguchi    2014-06-23  3297  		return 0;
4a705fef986231a Naoya Horiguchi    2014-06-23  3298  }
1e8f889b10d8d22 David Gibson       2006-01-06  3299  
63551ae0feaaa23 David Gibson       2005-06-21  3300  int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
63551ae0feaaa23 David Gibson       2005-06-21  3301  			    struct vm_area_struct *vma)
63551ae0feaaa23 David Gibson       2005-06-21  3302  {
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3303  	pte_t *src_pte, *dst_pte, entry, dst_entry;
63551ae0feaaa23 David Gibson       2005-06-21  3304  	struct page *ptepage;
1c59827d1da9bcd Hugh Dickins       2005-10-19  3305  	unsigned long addr;
1e8f889b10d8d22 David Gibson       2006-01-06  3306  	int cow;
a5516438959d90b Andi Kleen         2008-07-23  3307  	struct hstate *h = hstate_vma(vma);
a5516438959d90b Andi Kleen         2008-07-23  3308  	unsigned long sz = huge_page_size(h);
ac46d4f3c43241f Jérôme Glisse      2018-12-28  3309  	struct mmu_notifier_range range;
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3310  	int ret = 0;
1e8f889b10d8d22 David Gibson       2006-01-06  3311  
1e8f889b10d8d22 David Gibson       2006-01-06  3312  	cow = (vma->vm_flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE;
63551ae0feaaa23 David Gibson       2005-06-21  3313  
ac46d4f3c43241f Jérôme Glisse      2018-12-28  3314  	if (cow) {
7269f999934b289 Jérôme Glisse      2019-05-13  3315  		mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, vma, src,
6f4f13e8d9e27ce Jérôme Glisse      2019-05-13  3316  					vma->vm_start,
ac46d4f3c43241f Jérôme Glisse      2018-12-28  3317  					vma->vm_end);
ac46d4f3c43241f Jérôme Glisse      2018-12-28  3318  		mmu_notifier_invalidate_range_start(&range);
ac46d4f3c43241f Jérôme Glisse      2018-12-28  3319  	}
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3320  
a5516438959d90b Andi Kleen         2008-07-23  3321  	for (addr = vma->vm_start; addr < vma->vm_end; addr += sz) {
cb900f412154474 Kirill A. Shutemov 2013-11-14  3322  		spinlock_t *src_ptl, *dst_ptl;
7868a2087ec13ec Punit Agrawal      2017-07-06  3323  		src_pte = huge_pte_offset(src, addr, sz);
c74df32c724a165 Hugh Dickins       2005-10-29  3324  		if (!src_pte)
c74df32c724a165 Hugh Dickins       2005-10-29  3325  			continue;
a5516438959d90b Andi Kleen         2008-07-23  3326  		dst_pte = huge_pte_alloc(dst, addr, sz);
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3327  		if (!dst_pte) {
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3328  			ret = -ENOMEM;
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3329  			break;
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3330  		}
c5c99429fa57dcf Larry Woodman      2008-01-24  3331  
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3332  		/*
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3333  		 * If the pagetables are shared don't copy or take references.
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3334  		 * dst_pte == src_pte is the common case of src/dest sharing.
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3335  		 *
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3336  		 * However, src could have 'unshared' and dst shares with
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3337  		 * another vma.  If dst_pte !none, this implies sharing.
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3338  		 * Check here before taking page table lock, and once again
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3339  		 * after taking the lock below.
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3340  		 */
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3341  		dst_entry = huge_ptep_get(dst_pte);
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3342  		if ((dst_pte == src_pte) || !huge_pte_none(dst_entry))
c5c99429fa57dcf Larry Woodman      2008-01-24  3343  			continue;
c5c99429fa57dcf Larry Woodman      2008-01-24  3344  
cb900f412154474 Kirill A. Shutemov 2013-11-14  3345  		dst_ptl = huge_pte_lock(h, dst, dst_pte);
cb900f412154474 Kirill A. Shutemov 2013-11-14  3346  		src_ptl = huge_pte_lockptr(h, src, src_pte);
cb900f412154474 Kirill A. Shutemov 2013-11-14  3347  		spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING);
4a705fef986231a Naoya Horiguchi    2014-06-23  3348  		entry = huge_ptep_get(src_pte);
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3349  		dst_entry = huge_ptep_get(dst_pte);
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3350  		if (huge_pte_none(entry) || !huge_pte_none(dst_entry)) {
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3351  			/*
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3352  			 * Skip if src entry none.  Also, skip in the
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3353  			 * unlikely case dst entry !none as this implies
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3354  			 * sharing with another vma.
5e41540c8a0f0e9 Mike Kravetz       2018-11-16  3355  			 */
4a705fef986231a Naoya Horiguchi    2014-06-23  3356  			;
4a705fef986231a Naoya Horiguchi    2014-06-23  3357  		} else if (unlikely(is_hugetlb_entry_migration(entry) ||
4a705fef986231a Naoya Horiguchi    2014-06-23  3358  				    is_hugetlb_entry_hwpoisoned(entry))) {
4a705fef986231a Naoya Horiguchi    2014-06-23 @3359  			swp_entry_t swp_entry = pte_to_swp_entry(entry);
4a705fef986231a Naoya Horiguchi    2014-06-23  3360  
4a705fef986231a Naoya Horiguchi    2014-06-23 @3361  			if (is_write_migration_entry(swp_entry) && cow) {
4a705fef986231a Naoya Horiguchi    2014-06-23  3362  				/*
4a705fef986231a Naoya Horiguchi    2014-06-23  3363  				 * COW mappings require pages in both
4a705fef986231a Naoya Horiguchi    2014-06-23  3364  				 * parent and child to be set to read.
4a705fef986231a Naoya Horiguchi    2014-06-23  3365  				 */
4a705fef986231a Naoya Horiguchi    2014-06-23 @3366  				make_migration_entry_read(&swp_entry);
4a705fef986231a Naoya Horiguchi    2014-06-23  3367  				entry = swp_entry_to_pte(swp_entry);
e5251fd43007f9e Punit Agrawal      2017-07-06  3368  				set_huge_swap_pte_at(src, addr, src_pte,
e5251fd43007f9e Punit Agrawal      2017-07-06  3369  						     entry, sz);
4a705fef986231a Naoya Horiguchi    2014-06-23  3370  			}
e5251fd43007f9e Punit Agrawal      2017-07-06  3371  			set_huge_swap_pte_at(dst, addr, dst_pte, entry, sz);
4a705fef986231a Naoya Horiguchi    2014-06-23  3372  		} else {
34ee645e83b60ae Joerg Roedel       2014-11-13  3373  			if (cow) {
0f10851ea475e08 Jérôme Glisse      2017-11-15  3374  				/*
0f10851ea475e08 Jérôme Glisse      2017-11-15  3375  				 * No need to notify as we are downgrading page
0f10851ea475e08 Jérôme Glisse      2017-11-15  3376  				 * table protection not changing it to point
0f10851ea475e08 Jérôme Glisse      2017-11-15  3377  				 * to a new page.
0f10851ea475e08 Jérôme Glisse      2017-11-15  3378  				 *
ad56b738c5dd223 Mike Rapoport      2018-03-21  3379  				 * See Documentation/vm/mmu_notifier.rst
0f10851ea475e08 Jérôme Glisse      2017-11-15  3380  				 */
7f2e9525ba55b1c Gerald Schaefer    2008-04-28  3381  				huge_ptep_set_wrprotect(src, addr, src_pte);
34ee645e83b60ae Joerg Roedel       2014-11-13  3382  			}
0253d634e0803a8 Naoya Horiguchi    2014-07-23  3383  			entry = huge_ptep_get(src_pte);
63551ae0feaaa23 David Gibson       2005-06-21  3384  			ptepage = pte_page(entry);
63551ae0feaaa23 David Gibson       2005-06-21  3385  			get_page(ptepage);
53f9263baba69fc Kirill A. Shutemov 2016-01-15  3386  			page_dup_rmap(ptepage, true);
63551ae0feaaa23 David Gibson       2005-06-21  3387  			set_huge_pte_at(dst, addr, dst_pte, entry);
5d317b2b6536592 Naoya Horiguchi    2015-11-05  3388  			hugetlb_count_add(pages_per_huge_page(h), dst);
1c59827d1da9bcd Hugh Dickins       2005-10-19  3389  		}
cb900f412154474 Kirill A. Shutemov 2013-11-14  3390  		spin_unlock(src_ptl);
cb900f412154474 Kirill A. Shutemov 2013-11-14  3391  		spin_unlock(dst_ptl);
63551ae0feaaa23 David Gibson       2005-06-21  3392  	}
63551ae0feaaa23 David Gibson       2005-06-21  3393  
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3394  	if (cow)
ac46d4f3c43241f Jérôme Glisse      2018-12-28  3395  		mmu_notifier_invalidate_range_end(&range);
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3396  
e8569dd299dbc7b Andreas Sandberg   2014-01-21  3397  	return ret;
63551ae0feaaa23 David Gibson       2005-06-21  3398  }
63551ae0feaaa23 David Gibson       2005-06-21  3399  

:::::: The code at line 3281 was first introduced by commit
:::::: 4a705fef986231a3e7a6b1a6d3c37025f021f49f hugetlb: fix copy_hugetlb_page_range() to handle migration/hwpoisoned entry

:::::: TO: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27256 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-14  6:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14  6:45 [yhuang:autonuma-r0.7 1/36] mm/hugetlb.c:3281:29: error: implicit declaration of function 'is_migration_entry'; did you mean 'next_migration_node'? kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.