diff options
author | Dean Luick <dean.luick@cornelisnetworks.com> | 2023-01-09 22:04:14 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-01-10 13:52:35 +0300 |
commit | d8f4ab01c6d0d59f7010b27c3b4ffca512324457 (patch) | |
tree | 8061c1ae967bbce6c5e2f1bc8aeed43ffb7c6651 /drivers/infiniband/hw/hfi1/exp_rcv.h | |
parent | a479433a6b7a2b0f21da3071d6a9afb66bfd5887 (diff) | |
download | linux-d8f4ab01c6d0d59f7010b27c3b4ffca512324457.tar.xz |
IB/hfi1: Consolidate the creation of user TIDs
The function rcventry2tidinfo() only creates part of
a TID and all calls to it are only used to make a user
TID. Consolidate all usage into a single routine.
Signed-off-by: Dean Luick <dean.luick@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Link: https://lore.kernel.org/r/167329105402.1472990.9685946655723333660.stgit@awfm-02.cornelisnetworks.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/exp_rcv.h')
-rw-r--r-- | drivers/infiniband/hw/hfi1/exp_rcv.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hfi1/exp_rcv.h b/drivers/infiniband/hw/hfi1/exp_rcv.h index c6291bbf723c..41f7fe5d1839 100644 --- a/drivers/infiniband/hw/hfi1/exp_rcv.h +++ b/drivers/infiniband/hw/hfi1/exp_rcv.h @@ -133,12 +133,13 @@ static inline struct tid_group *tid_group_pop(struct exp_tid_set *set) return grp; } -static inline u32 rcventry2tidinfo(u32 rcventry) +static inline u32 create_tid(u32 rcventry, u32 npages) { u32 pair = rcventry & ~0x1; return EXP_TID_SET(IDX, pair >> 1) | - EXP_TID_SET(CTRL, 1 << (rcventry - pair)); + EXP_TID_SET(CTRL, 1 << (rcventry - pair)) | + EXP_TID_SET(LEN, npages); } /** |