diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-10-06 11:22:37 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-10-07 09:20:53 -0700 |
commit | bd4cd745b3b412ac93227640e3b337962f41d932 (patch) | |
tree | fc87b054e3d62373f8059e3d5e9bea285489c748 /tools/testing/nvdimm/test/nfit_test.h | |
parent | 8a5f50d3b7f2f601c200f84827c2c9220cd69f71 (diff) | |
download | linux-bd4cd745b3b412ac93227640e3b337962f41d932.tar.gz linux-bd4cd745b3b412ac93227640e3b337962f41d932.tar.bz2 linux-bd4cd745b3b412ac93227640e3b337962f41d932.zip |
tools/testing/nvdimm: support for sub-dividing a pmem region
Update nfit_test to handle multiple sub-allocations within a given pmem
region. The mock resource now tracks and un-tracks sub-ranges as they
are requested and released (either explicitly or via devm callback).
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/testing/nvdimm/test/nfit_test.h')
-rw-r--r-- | tools/testing/nvdimm/test/nfit_test.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/testing/nvdimm/test/nfit_test.h b/tools/testing/nvdimm/test/nfit_test.h index 9f18e2a4a862..c281dd2e5e2d 100644 --- a/tools/testing/nvdimm/test/nfit_test.h +++ b/tools/testing/nvdimm/test/nfit_test.h @@ -13,11 +13,21 @@ #ifndef __NFIT_TEST_H__ #define __NFIT_TEST_H__ #include <linux/list.h> +#include <linux/ioport.h> +#include <linux/spinlock_types.h> + +struct nfit_test_request { + struct list_head list; + struct resource res; +}; struct nfit_test_resource { + struct list_head requests; struct list_head list; - struct resource *res; + struct resource res; struct device *dev; + spinlock_t lock; + int req_count; void *buf; }; |