diff options
author | Matthew Wilcox <willy@infradead.org> | 2019-02-08 21:41:29 +0100 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-04-01 18:27:35 +0200 |
commit | 03b92789e5cfdac66805c1a98f1ec67336199d56 (patch) | |
tree | 51ee96e92fc1953230ff5b756a2abb30c6306b94 /drivers/infiniband/hw/hfi1/verbs.c | |
parent | RDMA/core: Don't compare specific bit after boolean AND (diff) | |
download | linux-03b92789e5cfdac66805c1a98f1ec67336199d56.tar.xz linux-03b92789e5cfdac66805c1a98f1ec67336199d56.zip |
hfi1: Convert hfi1_unit_table to XArray
Also remove hfi1_devs_list.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/verbs.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/verbs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c index b73ab7c64d91..1eb4105b2d22 100644 --- a/drivers/infiniband/hw/hfi1/verbs.c +++ b/drivers/infiniband/hw/hfi1/verbs.c @@ -1740,15 +1740,15 @@ static struct rdma_hw_stats *alloc_hw_stats(struct ib_device *ibdev, static u64 hfi1_sps_ints(void) { - unsigned long flags; + unsigned long index, flags; struct hfi1_devdata *dd; u64 sps_ints = 0; - spin_lock_irqsave(&hfi1_devs_lock, flags); - list_for_each_entry(dd, &hfi1_dev_list, list) { + xa_lock_irqsave(&hfi1_dev_table, flags); + xa_for_each(&hfi1_dev_table, index, dd) { sps_ints += get_all_cpu_total(dd->int_counter); } - spin_unlock_irqrestore(&hfi1_devs_lock, flags); + xa_unlock_irqrestore(&hfi1_dev_table, flags); return sps_ints; } |