From ee8520fe8cd4cd2658ca555781eefeb4914c4ef9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 15 Jun 2016 20:34:17 -0700 Subject: 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 Signed-off-by: Dan Williams --- tools/testing/nvdimm/test/iomap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tools/testing/nvdimm/test/iomap.c') 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) -- cgit v1.2.3-59-g8ed1b