@@ -4874,3 +4874,13 @@ CXL_EXPORT struct cxl_features *cxl_features_get_next(struct cxl_features *featu
return list_next(&ctx->features, features, list);
}
+
+CXL_EXPORT int cxl_features_get_major(struct cxl_features *features)
+{
+ return features->major;
+}
+
+CXL_EXPORT int cxl_features_get_minor(struct cxl_features *features)
+{
+ return features->minor;
+}
@@ -294,4 +294,6 @@ global:
cxl_bus_get_by_provider;
cxl_features_get_first;
cxl_features_get_next;
+ cxl_features_get_major;
+ cxl_features_get_minor;
} LIBECXL_8;
@@ -497,6 +497,8 @@ struct cxl_features;
struct cxl_features *cxl_features_get_first(struct cxl_ctx *ctx);
struct cxl_features *cxl_features_get_next(struct cxl_features *features);
+int cxl_features_get_major(struct cxl_features *features);
+int cxl_features_get_minor(struct cxl_features *features);
#ifdef __cplusplus
} /* extern "C" */
Add helper functions to retrieve the major and minor of the associated char device for the cxl features device. The char device provides access to issue ioctl via the FWCTL subsystem to the CXL features driver for CXL mailbox feature commands. Signed-off-by: Dave Jiang <dave.jiang@intel.com> --- cxl/lib/libcxl.c | 10 ++++++++++ cxl/lib/libcxl.sym | 2 ++ cxl/libcxl.h | 2 ++ 3 files changed, 14 insertions(+)