linux-stable/drivers/dax
Joao Martins 0e7325f03f device-dax: set mapping prior to vmf_insert_pfn{,_pmd,pud}()
Normally, the @page mapping is set prior to inserting the page into a
page table entry.  Make device-dax adhere to the same ordering, rather
than setting mapping after the PTE is inserted.

The address_space never changes and it is always associated with the
same inode and underlying pages.  So, the page mapping is set once but
cleared when the struct pages are removed/freed (i.e.  after
{devm_}memunmap_pages()).

Link: https://lkml.kernel.org/r/20211202204422.26777-10-joao.m.martins@oracle.com
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Jane Chu <jane.chu@oracle.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-01-15 16:30:26 +02:00
..
hmem dax/hmem: introduce dax_hmem.region_idle parameter 2020-10-13 18:38:28 -07:00
pmem libnvdimm: Make remove callback return void 2021-02-16 19:35:29 -08:00
bus.c device-dax: ensure dev_dax->pgmap is valid for dynamic devices 2022-01-15 16:30:25 +02:00
bus.h device-dax: ensure dev_dax->pgmap is valid for dynamic devices 2022-01-15 16:30:25 +02:00
dax-private.h device-dax: add an 'align' attribute 2020-10-13 18:38:28 -07:00
device.c device-dax: set mapping prior to vmf_insert_pfn{,_pmd,pud}() 2022-01-15 16:30:26 +02:00
Kconfig mm: fix phys_to_target_node() and memory_add_physaddr_to_nid() exports 2020-11-22 10:48:22 -08:00
kmem.c dax/kmem: use a single static memory group for a single probed unit 2021-09-08 11:50:23 -07:00
Makefile ACPI: HMAT: refactor hmat_register_target_device to hmem_register_device 2020-10-13 18:38:27 -07:00
super.c nvdimm/pmem: move dax_attribute_group from dax to pmem 2021-09-27 11:32:51 -07:00