cxl/region: Support empty uuids for non-pmem regions
authorDan Williams <dan.j.williams@intel.com>
Fri, 10 Feb 2023 09:05:45 +0000 (01:05 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sat, 11 Feb 2023 01:32:01 +0000 (17:32 -0800)
commita8e7d558f7e9c2921de8b487baa01d23f068aa93
tree2985b1bdc4b95f5fb0bc61c289deb4c41ba4d286
parent7d505f982f53189da819581ad4cc13c8cef76803
cxl/region: Support empty uuids for non-pmem regions

Shipping versions of the cxl-cli utility expect all regions to have a
'uuid' attribute. In preparation for 'ram' regions, update the 'uuid'
attribute to return an empty string which satisfies the current
expectations of 'cxl list -R'. Otherwise, 'cxl list -R' fails in the
presence of regions with the 'uuid' attribute missing. Force the
attribute to be read-only as there is no facility or expectation for a
'ram' region to recall its uuid from one boot to the next.

Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Tested-by: Fan Ni <fan.ni@samsung.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/167601994558.1924368.12612811533724694444.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/ABI/testing/sysfs-bus-cxl
drivers/cxl/core/region.c