cxl/pci: Store memory capacity values
authorIra Weiny <ira.weiny@intel.com>
Thu, 17 Jun 2021 22:16:18 +0000 (15:16 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 7 Aug 2021 08:01:09 +0000 (01:01 -0700)
commit0b9159d0ff21bc281dbb9ede06ad566330ac0943
tree9b8a608f786b60861ed43d9374ecf71d954a6bbe
parent5b68705d1e6340127464ef0ac0e1de94f823f14e
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>
drivers/cxl/cxlmem.h
drivers/cxl/pci.c