memremap: replace the altmap_valid field with a PGMAP_ALTMAP_VALID flag
Add a flags field to struct dev_pagemap to replace the altmap_valid boolean to be a little more extensible. Also add a pgmap_altmap() helper to find the optional altmap and clean up the code using the altmap using it. Signed-off-by:Christoph Hellwig <hch@lst.de> Reviewed-by:
Ira Weiny <ira.weiny@intel.com> Reviewed-by:
Dan Williams <dan.j.williams@intel.com> Tested-by:
Dan Williams <dan.j.williams@intel.com> Signed-off-by:
Jason Gunthorpe <jgg@mellanox.com>
Showing
- arch/powerpc/mm/mem.c 1 addition, 9 deletionsarch/powerpc/mm/mem.c
- arch/x86/mm/init_64.c 2 additions, 6 deletionsarch/x86/mm/init_64.c
- drivers/nvdimm/pfn_devs.c 1 addition, 2 deletionsdrivers/nvdimm/pfn_devs.c
- drivers/nvdimm/pmem.c 0 additions, 1 deletiondrivers/nvdimm/pmem.c
- include/linux/memremap.h 11 additions, 1 deletioninclude/linux/memremap.h
- kernel/memremap.c 10 additions, 16 deletionskernel/memremap.c
- mm/hmm.c 0 additions, 1 deletionmm/hmm.c
- mm/memory_hotplug.c 2 additions, 4 deletionsmm/memory_hotplug.c
- mm/page_alloc.c 2 additions, 3 deletionsmm/page_alloc.c
Loading
Please register or sign in to comment