diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2017-05-04 14:14:57 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-05-05 01:31:46 +0200 |
commit | 5fbded483c699823a7cca001a5c27ddc4d73370f (patch) | |
tree | 283fd944cdb169bf6a7c59eb1023fe5c1de27c2b /drivers/infiniband/hw/hfi1/hfi.h | |
parent | IB/hfi1: Remove atomic operations for SDMA_REQ_HAVE_AHG bit (diff) | |
download | linux-5fbded483c699823a7cca001a5c27ddc4d73370f.tar.xz linux-5fbded483c699823a7cca001a5c27ddc4d73370f.zip |
IB/hfi1: Search shared contexts on the opened device, not all devices
The search for available shared contexts walks each registered hfi1
device. This search is too broad because other devices may not
be on the same fabric, and using its contexts could cause unexpected
behavior.
Removed walking the list of devices, limiting the search to the opened
device. With the device walk removed, the hfi1_devdata (dd) is not
available. Added it to the hfi1_filedata for reference.
With this change, hfi1_count_units() was rendered obsolete and was
removed.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/hfi.h')
-rw-r--r-- | drivers/infiniband/hw/hfi1/hfi.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/hfi.h b/drivers/infiniband/hw/hfi1/hfi.h index a1e9b8b55c0a..e0c4c5ed7721 100644 --- a/drivers/infiniband/hw/hfi1/hfi.h +++ b/drivers/infiniband/hw/hfi1/hfi.h @@ -1238,6 +1238,7 @@ struct mmu_rb_handler; /* Private data for file operations */ struct hfi1_filedata { + struct hfi1_devdata *dd; struct hfi1_ctxtdata *uctxt; unsigned subctxt; struct hfi1_user_sdma_comp_q *cq; @@ -1264,7 +1265,6 @@ extern u32 hfi1_cpulist_count; extern unsigned long *hfi1_cpulist; int hfi1_init(struct hfi1_devdata *dd, int reinit); -int hfi1_count_units(int *npresentp, int *nupp); int hfi1_count_active_units(void); int hfi1_diag_add(struct hfi1_devdata *dd); |