diff options
author | Mel Gorman <mgorman@suse.de> | 2015-02-12 17:58:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-12 21:54:08 -0500 |
commit | 8a0516ed8b90c95ffa1363b420caa37418149f21 (patch) | |
tree | 64f95968661a136fa8a246419680420819dc1e0e /mm/gup.c | |
parent | e7bb4b6d1609cce391af1e7bc6f31d14f1a3a890 (diff) |
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 <mgorman@suse.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/gup.c')
-rw-r--r-- | mm/gup.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -64,7 +64,7 @@ retry: | |||
64 | migration_entry_wait(mm, pmd, address); | 64 | migration_entry_wait(mm, pmd, address); |
65 | goto retry; | 65 | goto retry; |
66 | } | 66 | } |
67 | if ((flags & FOLL_NUMA) && pte_numa(pte)) | 67 | if ((flags & FOLL_NUMA) && pte_protnone(pte)) |
68 | goto no_page; | 68 | goto no_page; |
69 | if ((flags & FOLL_WRITE) && !pte_write(pte)) { | 69 | if ((flags & FOLL_WRITE) && !pte_write(pte)) { |
70 | pte_unmap_unlock(ptep, ptl); | 70 | pte_unmap_unlock(ptep, ptl); |
@@ -184,7 +184,7 @@ struct page *follow_page_mask(struct vm_area_struct *vma, | |||
184 | return page; | 184 | return page; |
185 | return no_page_table(vma, flags); | 185 | return no_page_table(vma, flags); |
186 | } | 186 | } |
187 | if ((flags & FOLL_NUMA) && pmd_numa(*pmd)) | 187 | if ((flags & FOLL_NUMA) && pmd_protnone(*pmd)) |
188 | return no_page_table(vma, flags); | 188 | return no_page_table(vma, flags); |
189 | if (pmd_trans_huge(*pmd)) { | 189 | if (pmd_trans_huge(*pmd)) { |
190 | if (flags & FOLL_SPLIT) { | 190 | if (flags & FOLL_SPLIT) { |
@@ -906,10 +906,10 @@ static int gup_pte_range(pmd_t pmd, unsigned long addr, unsigned long end, | |||
906 | 906 | ||
907 | /* | 907 | /* |
908 | * Similar to the PMD case below, NUMA hinting must take slow | 908 | * Similar to the PMD case below, NUMA hinting must take slow |
909 | * path | 909 | * path using the pte_protnone check. |
910 | */ | 910 | */ |
911 | if (!pte_present(pte) || pte_special(pte) || | 911 | if (!pte_present(pte) || pte_special(pte) || |
912 | pte_numa(pte) || (write && !pte_write(pte))) | 912 | pte_protnone(pte) || (write && !pte_write(pte))) |
913 | goto pte_unmap; | 913 | goto pte_unmap; |
914 | 914 | ||
915 | VM_BUG_ON(!pfn_valid(pte_pfn(pte))); | 915 | 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, | |||
1104 | * slowpath for accounting purposes and so that they | 1104 | * slowpath for accounting purposes and so that they |
1105 | * can be serialised against THP migration. | 1105 | * can be serialised against THP migration. |
1106 | */ | 1106 | */ |
1107 | if (pmd_numa(pmd)) | 1107 | if (pmd_protnone(pmd)) |
1108 | return 0; | 1108 | return 0; |
1109 | 1109 | ||
1110 | if (!gup_huge_pmd(pmd, pmdp, addr, next, write, | 1110 | if (!gup_huge_pmd(pmd, pmdp, addr, next, write, |