aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2015-02-12 17:58:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-12 21:54:08 -0500
commit4d9424669946532be754a6e116618dcb58430cb4 (patch)
treeccebf7f5dbb8773bb774551d21cd95d0f30b6766 /mm/memory.c
parent842915f56667f9eebd85932f08c79565148c26d6 (diff)
mm: convert p[te|md]_mknonnuma and remaining page table manipulations
With PROT_NONE, the traditional page table manipulation functions are sufficient. [andre.przywara@arm.com: fix compiler warning in pmdp_invalidate()] [akpm@linux-foundation.org: fix build with STRICT_MM_TYPECHECKS] 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> Tested-by: Sasha Levin <sasha.levin@oracle.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 92e6a6299e86..d7921760cf79 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3018,9 +3018,9 @@ static int do_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
3018 * validation through pte_unmap_same(). It's of NUMA type but 3018 * validation through pte_unmap_same(). It's of NUMA type but
3019 * the pfn may be screwed if the read is non atomic. 3019 * the pfn may be screwed if the read is non atomic.
3020 * 3020 *
3021 * ptep_modify_prot_start is not called as this is clearing 3021 * We can safely just do a "set_pte_at()", because the old
3022 * the _PAGE_NUMA bit and it is not really expected that there 3022 * page table entry is not accessible, so there would be no
3023 * would be concurrent hardware modifications to the PTE. 3023 * concurrent hardware modifications to the PTE.
3024 */ 3024 */
3025 ptl = pte_lockptr(mm, pmd); 3025 ptl = pte_lockptr(mm, pmd);
3026 spin_lock(ptl); 3026 spin_lock(ptl);
@@ -3029,7 +3029,9 @@ static int do_numa_page(struct mm_struct *mm, struct vm_area_struct *vma,
3029 goto out; 3029 goto out;
3030 } 3030 }
3031 3031
3032 pte = pte_mknonnuma(pte); 3032 /* Make it present again */
3033 pte = pte_modify(pte, vma->vm_page_prot);
3034 pte = pte_mkyoung(pte);
3033 set_pte_at(mm, addr, ptep, pte); 3035 set_pte_at(mm, addr, ptep, pte);
3034 update_mmu_cache(vma, addr, ptep); 3036 update_mmu_cache(vma, addr, ptep);
3035 3037