cxl/pmem: add id attribute to CXL based nvdimm
authorDave Jiang <dave.jiang@intel.com>
Wed, 30 Nov 2022 19:22:50 +0000 (12:22 -0700)
committerDan Williams <dan.j.williams@intel.com>
Thu, 1 Dec 2022 20:42:35 +0000 (12:42 -0800)
commitbd429e5355cd58aeb7e38b905fbecee357a6379b
treecfba6e993fdc8c6c20a939868b6ed215cc76dfb3
parentdcedadfae28562ad04bc351cabfbc0c65b810847
cxl/pmem: add id attribute to CXL based nvdimm

Add an id group attribute for CXL based nvdimm object. The addition allows
ndctl to display the "unique id" for the nvdimm. The serial number for the
CXL memory device will be used for this id.

[
  {
      "dev":"nmem10",
      "id":"0x4",
      "security":"disabled"
  },
]

The id attribute is needed by the ndctl security key management to setup a
keyblob with a unique file name tied to the mem device.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/166983617029.2734609.8251308562882142281.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/ABI/testing/sysfs-bus-nvdimm
drivers/cxl/pmem.c