cxl/pci: Add sysfs attribute for CXL 1.1 device link status
authorKobayashi,Daisuke <kobayashi.da-06@fujitsu.com>
Wed, 2 Oct 2024 01:15:49 +0000 (10:15 +0900)
committerDave Jiang <dave.jiang@intel.com>
Mon, 28 Oct 2024 17:07:33 +0000 (10:07 -0700)
commitc5eaec79fa43e994ec54c11538dc603d60cd0c4e
tree9a506732b6d54993165f180618d37acb3c35df63
parent7a01213d6c18d97c2f98455bb22c8416f8cca28b
cxl/pci: Add sysfs attribute for CXL 1.1 device link status

Add sysfs attribute for CXL 1.1 device link status to the cxl pci device.

In CXL1.1, the link status of the device is included in the RCRB mapped to
the memory mapped register area. Critically, that arrangement makes the
link status and control registers invisible to existing PCI user tooling.

Export those registers via sysfs with the expectation that PCI user
tooling will alternatively look for these sysfs files when attempting to
access to these CXL 1.1 endpoints registers.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Kobayashi,Daisuke <kobayashi.da-06@fujitsu.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://patch.msgid.link/20241002011549.408412-3-kobayashi.da-06@fujitsu.com
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/pci.c