diff options
author | Matthew Wilcox <willy@infradead.org> | 2019-02-08 15:41:29 -0500 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-04-01 13:27:35 -0300 |
commit | 03b92789e5cfdac66805c1a98f1ec67336199d56 (patch) | |
tree | 51ee96e92fc1953230ff5b756a2abb30c6306b94 /drivers/infiniband/hw/hfi1/debugfs.c | |
parent | d3243da8e3700eaccb41b93b498d0dfc77c90d37 (diff) | |
download | lwn-03b92789e5cfdac66805c1a98f1ec67336199d56.tar.gz lwn-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/debugfs.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/debugfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/hfi1/debugfs.c b/drivers/infiniband/hw/hfi1/debugfs.c index 427ba0ce74a5..057bb82c664f 100644 --- a/drivers/infiniband/hw/hfi1/debugfs.c +++ b/drivers/infiniband/hw/hfi1/debugfs.c @@ -1302,15 +1302,15 @@ static void _driver_stats_seq_stop(struct seq_file *s, void *v) 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; } |