summaryrefslogtreecommitdiffstats
path: root/tools/testing/nvdimm/test/ndtest.h
diff options
context:
space:
mode:
authorSantosh Sivaraj <santosh@fossix.org>2020-12-22 05:22:38 +0100
committerDan Williams <dan.j.williams@intel.com>2021-01-28 09:22:49 +0100
commit6fde2d4c8b25cec9589a4a58fd524b9d4e40c4b6 (patch)
tree428589bb271420f144e730bd0c4c794c583976d7 /tools/testing/nvdimm/test/ndtest.h
parentndtest: Add dimm attributes (diff)
downloadlinux-6fde2d4c8b25cec9589a4a58fd524b9d4e40c4b6.tar.xz
linux-6fde2d4c8b25cec9589a4a58fd524b9d4e40c4b6.zip
ndtest: Add regions and mappings to the test buses
The bus config array is used to hold the regions and the respective mappings. This config based interface enables to change the dimm/region/namespace layouts easily. Signed-off-by: Santosh Sivaraj <santosh@fossix.org> Link: https://lore.kernel.org/r/20201222042240.2983755-6-santosh@fossix.org Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/testing/nvdimm/test/ndtest.h')
-rw-r--r--tools/testing/nvdimm/test/ndtest.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/testing/nvdimm/test/ndtest.h b/tools/testing/nvdimm/test/ndtest.h
index e607d72ffed1..8f27ad6f7319 100644
--- a/tools/testing/nvdimm/test/ndtest.h
+++ b/tools/testing/nvdimm/test/ndtest.h
@@ -20,6 +20,15 @@ struct ndtest_priv {
dma_addr_t *dimm_dma;
};
+struct ndtest_blk_mmio {
+ void __iomem *base;
+ u64 size;
+ u64 base_offset;
+ u32 line_size;
+ u32 num_lines;
+ u32 table_size;
+};
+
struct ndtest_dimm {
struct device *dev;
struct nvdimm *nvdimm;
@@ -42,8 +51,25 @@ struct ndtest_dimm {
u8 no_alias;
};
+struct ndtest_mapping {
+ u64 start;
+ u64 size;
+ u8 position;
+ u8 dimm;
+};
+
+struct ndtest_region {
+ struct nd_region *region;
+ struct ndtest_mapping *mapping;
+ u64 size;
+ u8 type;
+ u8 num_mappings;
+ u8 range_index;
+};
+
struct ndtest_config {
struct ndtest_dimm *dimms;
+ struct ndtest_region *regions;
unsigned int dimm_count;
unsigned int dimm_start;
u8 num_regions;