mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
mm: convert p[te|md]_numa users to p[te|md]_protnone_numa
Convert existing users of pte_numa and friends to the new helper. Note that the kernel is broken after this patch is applied until the other page table modifiers are also altered. This patch layout is to make review easier. Signed-off-by: Mel Gorman <[email protected]> Acked-by: Linus Torvalds <[email protected]> Acked-by: Aneesh Kumar <[email protected]> Acked-by: Benjamin Herrenschmidt <[email protected]> Tested-by: Sasha Levin <[email protected]> Cc: Dave Jones <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Kirill Shutemov <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Sasha Levin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e7bb4b6d16
commit
8a0516ed8b
11 changed files with 40 additions and 57 deletions
10
mm/gup.c
10
mm/gup.c
|
|
@ -64,7 +64,7 @@ retry:
|
|||
migration_entry_wait(mm, pmd, address);
|
||||
goto retry;
|
||||
}
|
||||
if ((flags & FOLL_NUMA) && pte_numa(pte))
|
||||
if ((flags & FOLL_NUMA) && pte_protnone(pte))
|
||||
goto no_page;
|
||||
if ((flags & FOLL_WRITE) && !pte_write(pte)) {
|
||||
pte_unmap_unlock(ptep, ptl);
|
||||
|
|
@ -184,7 +184,7 @@ struct page *follow_page_mask(struct vm_area_struct *vma,
|
|||
return page;
|
||||
return no_page_table(vma, flags);
|
||||
}
|
||||
if ((flags & FOLL_NUMA) && pmd_numa(*pmd))
|
||||
if ((flags & FOLL_NUMA) && pmd_protnone(*pmd))
|
||||
return no_page_table(vma, flags);
|
||||
if (pmd_trans_huge(*pmd)) {
|
||||
if (flags & FOLL_SPLIT) {
|
||||
|
|
@ -906,10 +906,10 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end,
|
|||
|
||||
/*
|
||||
* Similar to the PMD case below, NUMA hinting must take slow
|
||||
* path
|
||||
* path using the pte_protnone check.
|
||||
*/
|
||||
if (!pte_present(pte) || pte_special(pte) ||
|
||||
pte_numa(pte) || (write && !pte_write(pte)))
|
||||
pte_protnone(pte) || (write && !pte_write(pte)))
|
||||
goto pte_unmap;
|
||||
|
||||
VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
|
||||
|
|
@ -1104,7 +1104,7 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,
|
|||
* slowpath for accounting purposes and so that they
|
||||
* can be serialised against THP migration.
|
||||
*/
|
||||
if (pmd_numa(pmd))
|
||||
if (pmd_protnone(pmd))
|
||||
return 0;
|
||||
|
||||
if (!gup_huge_pmd(pmd, pmdp, addr, next, write,
|
||||
|
|
|
|||
Loading…
Reference in a new issue