Skip to content

Commit cb46fca

Browse files
Davidlohr Buesodjbw
authored andcommitted
cxl: Add Support for Get Timestamp
Add the call to the UAPI such that userspace may corelate the timestamps from the device log with system wall time, if, for example there's any sort of inaccuracy or skew in the device. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230829152014.15452-1-dave@stgolabs.net Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 33cc938 commit cb46fca

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/cxl/core/mbox.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static struct cxl_mem_command cxl_mem_commands[CXL_MEM_COMMAND_ID_MAX] = {
6363
CXL_CMD(GET_SHUTDOWN_STATE, 0, 0x1, 0),
6464
CXL_CMD(SET_SHUTDOWN_STATE, 0x1, 0, 0),
6565
CXL_CMD(GET_SCAN_MEDIA_CAPS, 0x10, 0x4, 0),
66+
CXL_CMD(GET_TIMESTAMP, 0, 0x8, 0),
6667
};
6768

6869
/*

drivers/cxl/cxlmem.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ enum cxl_opcode {
503503
CXL_MBOX_OP_GET_FW_INFO = 0x0200,
504504
CXL_MBOX_OP_TRANSFER_FW = 0x0201,
505505
CXL_MBOX_OP_ACTIVATE_FW = 0x0202,
506+
CXL_MBOX_OP_GET_TIMESTAMP = 0x0300,
506507
CXL_MBOX_OP_SET_TIMESTAMP = 0x0301,
507508
CXL_MBOX_OP_GET_SUPPORTED_LOGS = 0x0400,
508509
CXL_MBOX_OP_GET_LOG = 0x0401,

include/uapi/linux/cxl_mem.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), \
4747
___DEPRECATED(SCAN_MEDIA, "Scan Media"), \
4848
___DEPRECATED(GET_SCAN_MEDIA, "Get Scan Media Results"), \
49+
___C(GET_TIMESTAMP, "Get Timestamp"), \
4950
___C(MAX, "invalid / last command")
5051

5152
#define ___C(a, b) CXL_MEM_COMMAND_ID_##a

0 commit comments

Comments
 (0)