]> git.baikalelectronics.ru Git - kernel.git/commit
memremap: change devm_memremap_pages interface to use struct dev_pagemap
authorChristoph Hellwig <hch@lst.de>
Fri, 29 Dec 2017 07:54:05 +0000 (08:54 +0100)
committerDan Williams <dan.j.williams@intel.com>
Mon, 8 Jan 2018 19:46:23 +0000 (11:46 -0800)
commitddd1ef5918347675a810cc89ff2efdab875cf805
treedbd532f4ef91828e251a291c967ee3afe71fd475
parent4e3fc2ba8b1b71393ab32ecb185f61066270ac15
memremap: change devm_memremap_pages interface to use struct dev_pagemap

This new interface is similar to how struct device (and many others)
work. The caller initializes a 'struct dev_pagemap' as required
and calls 'devm_memremap_pages'. This allows the pagemap structure to
be embedded in another structure and thus container_of can be used. In
this way application specific members can be stored in a containing
struct.

This will be used by the P2P infrastructure and HMM could probably
be cleaned up to use it as well (instead of having it's own, similar
'hmm_devmem_pages_create' function).

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dax/pmem.c
drivers/nvdimm/nd.h
drivers/nvdimm/pfn_devs.c
drivers/nvdimm/pmem.c
drivers/nvdimm/pmem.h
include/linux/memremap.h
kernel/memremap.c
tools/testing/nvdimm/test/iomap.c