mm, x86: get_user_pages() for dax mappings
A dax mapping establishes a pte with _PAGE_DEVMAP set when the driver has established a devm_memremap_pages() mapping, i.e. when the pfn_t return from ->direct_access() has PFN_DEV and PFN_MAP set. Later, when encountering _PAGE_DEVMAP during a page table walk we lookup and pin a struct dev_pagemap instance to keep the result of pfn_to_page() valid until put_page(). Signed-off-by:Dan Williams <dan.j.williams@intel.com> Tested-by:
Logan Gunthorpe <logang@deltatee.com> Cc: Dave Hansen <dave@sr71.net> Cc: Mel Gorman <mgorman@suse.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- arch/x86/include/asm/pgtable.h 7 additions, 0 deletionsarch/x86/include/asm/pgtable.h
- arch/x86/mm/gup.c 54 additions, 3 deletionsarch/x86/mm/gup.c
- include/linux/huge_mm.h 9 additions, 1 deletioninclude/linux/huge_mm.h
- include/linux/mm.h 41 additions, 18 deletionsinclude/linux/mm.h
- kernel/memremap.c 12 additions, 0 deletionskernel/memremap.c
- mm/gup.c 28 additions, 2 deletionsmm/gup.c
- mm/huge_memory.c 60 additions, 15 deletionsmm/huge_memory.c
- mm/swap.c 1 addition, 0 deletionsmm/swap.c
Loading
Please register or sign in to comment