OpenCloudOS-Kernel/drivers/infiniband/hw/hns
Wei Hu (Xavier) 8f3e9f3ea0 IB/hns: Add code for refreshing CQ CI using TPTR
This patch added the code for refreshing CQ CI using TPTR in hip06
SoC.

We will send a doorbell to hardware for refreshing CQ CI when user
succeed to poll a cqe. But it will be failed if the doorbell has
been blocked. So hardware will read a special buffer called TPTR
to get the lastest CI value when the cq is almost full.

This patch support the special CI buffer as follows:
a) Alloc the memory for TPTR in the hns_roce_tptr_init function and
   free it in hns_roce_tptr_free function, these two functions will
   be called in probe function and in the remove function.
b) Add the code for computing offset(every cq need 2 bytes) and
   write the dma addr to every cq context to notice hardware in the
   function named hns_roce_v1_write_cqc.
c) Add code for mapping TPTR buffer to user space in function named
   hns_roce_mmap. The mapping distinguish TPTR and UAR of user mode
   by vm_pgoff(0: UAR, 1: TPTR, others:invaild) in hip06.
d) Alloc the code for refreshing CQ CI using TPTR in the function
   named hns_roce_v1_poll_cq.
e) Add some variable definitions to the related structure.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Salil Mehta  <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-12-03 14:20:42 -05:00
..
Kconfig
Makefile
hns_roce_ah.c
hns_roce_alloc.c
hns_roce_cmd.c
hns_roce_cmd.h
hns_roce_common.h IB/hns: Add code for refreshing CQ CI using TPTR 2016-12-03 14:20:42 -05:00
hns_roce_cq.c IB/hns: Add code for refreshing CQ CI using TPTR 2016-12-03 14:20:42 -05:00
hns_roce_device.h IB/hns: Add code for refreshing CQ CI using TPTR 2016-12-03 14:20:42 -05:00
hns_roce_eq.c IB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn 2016-10-03 11:43:15 -04:00
hns_roce_eq.h IB/hns: Optimize code of aeq and ceq interrupt handle and fix the bug of qpn 2016-10-03 11:43:15 -04:00
hns_roce_hem.c IB/hns: Fix bug of clear hem 2016-10-03 11:43:15 -04:00
hns_roce_hem.h IB/hns: Fix bug of clear hem 2016-10-03 11:43:15 -04:00
hns_roce_hw_v1.c IB/hns: Add code for refreshing CQ CI using TPTR 2016-12-03 14:20:42 -05:00
hns_roce_hw_v1.h IB/hns: Add code for refreshing CQ CI using TPTR 2016-12-03 14:20:42 -05:00
hns_roce_main.c IB/hns: Add code for refreshing CQ CI using TPTR 2016-12-03 14:20:42 -05:00
hns_roce_mr.c IB/hns: Fix bug of memory leakage for registering user mr 2016-10-03 11:43:15 -04:00
hns_roce_pd.c IB/hns: Fix the bug when platform_get_resource() exec fail 2016-10-03 11:43:15 -04:00
hns_roce_qp.c IB/hns: Fix for removal of redundant code 2016-10-03 11:43:15 -04:00
hns_roce_user.h