diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-06-15 20:34:17 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-06-27 11:40:46 -0700 |
commit | ee8520fe8cd4cd2658ca555781eefeb4914c4ef9 (patch) | |
tree | bef946a586e0416b6b2df37ad3d41dc0d3769808 /tools/testing/nvdimm/test/iomap.c | |
parent | libnvdimm, pmem: allow nfit_test to override pmem_direct_access() (diff) | |
download | linux-dev-ee8520fe8cd4cd2658ca555781eefeb4914c4ef9.tar.xz linux-dev-ee8520fe8cd4cd2658ca555781eefeb4914c4ef9.zip |
tools/testing/nvdimm: replace CONFIG_DMA_CMA dependency with vmalloc()
DMA_CMA is incompatible with SWIOTLB used in enterprise distro
configurations. Switch to vmalloc() allocations for all resources.
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to '')
-rw-r--r-- | tools/testing/nvdimm/test/iomap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c index 9966f093b4ff..804705f0f3a1 100644 --- a/tools/testing/nvdimm/test/iomap.c +++ b/tools/testing/nvdimm/test/iomap.c @@ -230,6 +230,22 @@ struct resource *__wrap___request_region(struct resource *parent, } EXPORT_SYMBOL(__wrap___request_region); +int __wrap_insert_resource(struct resource *parent, struct resource *res) +{ + if (get_nfit_res(res->start)) + return 0; + return insert_resource(parent, res); +} +EXPORT_SYMBOL(__wrap_insert_resource); + +int __wrap_remove_resource(struct resource *res) +{ + if (get_nfit_res(res->start)) + return 0; + return remove_resource(res); +} +EXPORT_SYMBOL(__wrap_remove_resource); + struct resource *__wrap___devm_request_region(struct device *dev, struct resource *parent, resource_size_t start, resource_size_t n, const char *name) |