Skip to content

Commit 955ad36

Browse files
dhharaladledford
authored andcommitted
uapi/hfi1_user: Add command and event for TID caching
TID caching will use a new event to signal userland that cache invalidation has occurred and needs a matching command code that will be used to read the invalidated TIDs. Add the event bit and the new command to the exported header file. The command is also added to the switch() statement in file_ops.c for completeness and in preparation for its usage later. Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent 462075a commit 955ad36

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎drivers/staging/rdma/hfi1/file_ops.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ static ssize_t hfi1_file_write(struct file *fp, const char __user *data,
241241
must_be_root = 1; /* validate user */
242242
copy = 0;
243243
break;
244+
case HFI1_CMD_TID_INVAL_READ:
244245
default:
245246
ret = -EINVAL;
246247
goto bail;

‎include/uapi/rdma/hfi/hfi1_user.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
#define HFI1_CMD_ACK_EVENT 10 /* ack & clear user status bits */
135135
#define HFI1_CMD_SET_PKEY 11 /* set context's pkey */
136136
#define HFI1_CMD_CTXT_RESET 12 /* reset context's HW send context */
137+
#define HFI1_CMD_TID_INVAL_READ 13 /* read TID cache invalidations */
137138
/* separate EPROM commands from normal PSM commands */
138139
#define HFI1_CMD_EP_INFO 64 /* read EPROM device ID */
139140
#define HFI1_CMD_EP_ERASE_CHIP 65 /* erase whole EPROM */
@@ -147,13 +148,15 @@
147148
#define _HFI1_EVENT_LID_CHANGE_BIT 2
148149
#define _HFI1_EVENT_LMC_CHANGE_BIT 3
149150
#define _HFI1_EVENT_SL2VL_CHANGE_BIT 4
150-
#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_SL2VL_CHANGE_BIT
151+
#define _HFI1_EVENT_TID_MMU_NOTIFY_BIT 5
152+
#define _HFI1_MAX_EVENT_BIT _HFI1_EVENT_TID_MMU_NOTIFY_BIT
151153

152154
#define HFI1_EVENT_FROZEN (1UL << _HFI1_EVENT_FROZEN_BIT)
153155
#define HFI1_EVENT_LINKDOWN (1UL << _HFI1_EVENT_LINKDOWN_BIT)
154156
#define HFI1_EVENT_LID_CHANGE (1UL << _HFI1_EVENT_LID_CHANGE_BIT)
155157
#define HFI1_EVENT_LMC_CHANGE (1UL << _HFI1_EVENT_LMC_CHANGE_BIT)
156158
#define HFI1_EVENT_SL2VL_CHANGE (1UL << _HFI1_EVENT_SL2VL_CHANGE_BIT)
159+
#define HFI1_EVENT_TID_MMU_NOTIFY (1UL << _HFI1_EVENT_TID_MMU_NOTIFY_BIT)
157160

158161
/*
159162
* These are the status bits readable (in ASCII form, 64bit value)

0 commit comments

Comments
 (0)