diff options
author | Dean Luick | 2016-03-05 17:49:50 +0100 |
---|---|---|
committer | Doug Ledford | 2016-03-17 20:55:13 +0100 |
commit | a2ee27a4552505db5967630abcc3a90340e0d824 (patch) | |
tree | ec452c85bb3040746b31fc9be0436199991d2e03 /drivers/staging/rdma/hfi1/chip.c | |
parent | IB/hfi1: Add shared ASIC structure (diff) | |
download | kernel-qcow2-linux-a2ee27a4552505db5967630abcc3a90340e0d824.tar.gz kernel-qcow2-linux-a2ee27a4552505db5967630abcc3a90340e0d824.tar.xz kernel-qcow2-linux-a2ee27a4552505db5967630abcc3a90340e0d824.zip |
IB/hfi1: Add ASIC resource reservation functions
The ASIC block is a shared hardware resource between two devices
on the chip. Add functions to acquire and release these resources
in a way that is safe for both multiple users on the same OS
and multiple users on different OSes, while holding the hardware
mutex as little as possible.
Reservations are noted in a scratch register in the shared region.
There are two types of reservations: per-HFI dynamic and permanent.
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/chip.c')
-rw-r--r-- | drivers/staging/rdma/hfi1/chip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c index 686cadf449b9..98ebee4aac22 100644 --- a/drivers/staging/rdma/hfi1/chip.c +++ b/drivers/staging/rdma/hfi1/chip.c @@ -13368,6 +13368,7 @@ static void init_chip(struct hfi1_devdata *dd) */ write_csr(dd, ASIC_QSFP1_OUT, 0x1f); write_csr(dd, ASIC_QSFP2_OUT, 0x1f); + init_chip_resources(dd); } static void init_early_variables(struct hfi1_devdata *dd) @@ -13794,6 +13795,7 @@ void hfi1_start_cleanup(struct hfi1_devdata *dd) free_cntrs(dd); free_rcverr(dd); clean_up_interrupts(dd); + finish_chip_resources(dd); } #define HFI_BASE_GUID(dev) \ |