diff options
author | Michael J. Ruhl <michael.j.ruhl@intel.com> | 2018-08-16 09:04:04 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-09-01 15:13:38 +0300 |
commit | 6eb4eb10fb0d14340956c05281b7e09d80902788 (patch) | |
tree | 87369fd62f0ca8695b8839b5b3989375b6d87854 /drivers/infiniband/hw/hfi1/affinity.c | |
parent | 09e71899b9cf5ed7495118b3023db41575013fe2 (diff) | |
download | linux-6eb4eb10fb0d14340956c05281b7e09d80902788.tar.xz |
IB/hfi1: Make the MSIx resource allocation a bit more flexible
The current method of allocating MSIx resources is a bit cumbersome,
and not very easily added to.
Refactor and re-order the code paths into a more consistent interface.
Update the interface so that allocations are not order dependent.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Sadanand Warrier <sadanand.warrier@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/affinity.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/affinity.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hfi1/affinity.c b/drivers/infiniband/hw/hfi1/affinity.c index bedd5fba33b0..2baf38cc1e23 100644 --- a/drivers/infiniband/hw/hfi1/affinity.c +++ b/drivers/infiniband/hw/hfi1/affinity.c @@ -817,10 +817,10 @@ static void hfi1_update_sdma_affinity(struct hfi1_msix_entry *msix, int cpu) set = &entry->def_intr; cpumask_set_cpu(cpu, &set->mask); cpumask_set_cpu(cpu, &set->used); - for (i = 0; i < dd->num_msix_entries; i++) { + for (i = 0; i < dd->msix_info.max_requested; i++) { struct hfi1_msix_entry *other_msix; - other_msix = &dd->msix_entries[i]; + other_msix = &dd->msix_info.msix_entries[i]; if (other_msix->type != IRQ_SDMA || other_msix == msix) continue; |