summaryrefslogtreecommitdiffstats
path: root/tools/testing/nvdimm/test/ndtest.h
diff options
context:
space:
mode:
authorSantosh Sivaraj <santosh@fossix.org>2020-12-22 05:22:36 +0100
committerDan Williams <dan.j.williams@intel.com>2021-01-28 09:22:49 +0100
commit9399ab61ad82154911563dd8635c585e3f24b16a (patch)
tree7943c763cb410e482287abf66760da7ad64b88c9 /tools/testing/nvdimm/test/ndtest.h
parentndtest: Add compatability string to treat it as PAPR family (diff)
downloadlinux-9399ab61ad82154911563dd8635c585e3f24b16a.tar.xz
linux-9399ab61ad82154911563dd8635c585e3f24b16a.zip
ndtest: Add dimms to the two buses
A config array is used to hold the dimms for each bus. These dimms are registered with nvdimm, and new nvdimms are created on the buses. Signed-off-by: Santosh Sivaraj <santosh@fossix.org> Link: https://lore.kernel.org/r/20201222042240.2983755-4-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.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/testing/nvdimm/test/ndtest.h b/tools/testing/nvdimm/test/ndtest.h
index 831ac5c65f50..e607d72ffed1 100644
--- a/tools/testing/nvdimm/test/ndtest.h
+++ b/tools/testing/nvdimm/test/ndtest.h
@@ -5,12 +5,48 @@
#include <linux/platform_device.h>
#include <linux/libnvdimm.h>
+struct ndtest_config;
+
struct ndtest_priv {
struct platform_device pdev;
struct device_node *dn;
struct list_head resources;
struct nvdimm_bus_descriptor bus_desc;
struct nvdimm_bus *bus;
+ struct ndtest_config *config;
+
+ dma_addr_t *dcr_dma;
+ dma_addr_t *label_dma;
+ dma_addr_t *dimm_dma;
+};
+
+struct ndtest_dimm {
+ struct device *dev;
+ struct nvdimm *nvdimm;
+ struct ndtest_blk_mmio *mmio;
+ struct nd_region *blk_region;
+
+ dma_addr_t address;
+ unsigned long long flags;
+ unsigned long config_size;
+ void *label_area;
+ char *uuid_str;
+
+ unsigned int size;
+ unsigned int handle;
+ unsigned int fail_cmd;
+ unsigned int physical_id;
+ unsigned int num_formats;
+ int id;
+ int fail_cmd_code;
+ u8 no_alias;
+};
+
+struct ndtest_config {
+ struct ndtest_dimm *dimms;
+ unsigned int dimm_count;
+ unsigned int dimm_start;
+ u8 num_regions;
};
#endif /* NDTEST_H */