summaryrefslogtreecommitdiff
path: root/drivers/cxl/cxlmem.h
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2021-06-17 15:16:18 -0700
committerDan Williams <dan.j.williams@intel.com>2021-08-07 01:01:09 -0700
commit0b9159d0ff21bc281dbb9ede06ad566330ac0943 (patch)
tree9b8a608f786b60861ed43d9374ecf71d954a6bbe /drivers/cxl/cxlmem.h
parent5b68705d1e6340127464ef0ac0e1de94f823f14e (diff)
cxl/pci: Store memory capacity values
The Identify Memory Device command returns information about the volatile only and persistent only memory capacities. Store those values in the cxl_mem structure for later use. While at it, reuse those calculations to calculate the ram and pmem ranges. Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20210617221620.1904031-2-ira.weiny@intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/cxlmem.h')
-rw-r--r--drivers/cxl/cxlmem.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index 25345ece25f8..22344fda8ca5 100644
--- a/drivers/cxl/cxlmem.h
+++ b/drivers/cxl/cxlmem.h
@@ -95,5 +95,9 @@ struct cxl_mem {
struct range pmem_range;
struct range ram_range;
+ u64 total_bytes;
+ u64 volatile_only_bytes;
+ u64 persistent_only_bytes;
+ u64 partition_align_bytes;
};
#endif /* __CXL_MEM_H__ */