IB/mthca: Use non-atomic bitmap functions when possible in 'mthca_mr.c'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 24 Nov 2021 20:43:35 +0000 (21:43 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 25 Nov 2021 17:29:06 +0000 (13:29 -0400)
commit675e2694fc6c99effd6f07df296b1d806e49ec88
tree68695a94a3199e56396a65bbe11ab0834e840417
parent19453f34cf4916054cbbe499fd77715fde791622
IB/mthca: Use non-atomic bitmap functions when possible in 'mthca_mr.c'

In 'mthca_buddy_init()', the 'buddy->bits[n]' bitmap has just been
allocated, so no concurrent accesses can occur.

The other accesses to the 'buddy->bits[n]' bitmap are protected by the
'buddy->lock' spinlock, so no concurrent accesses can occur.

So prefer the non-atomic '__[set|clear]_bit()' functions to save a few
cycles.

Link: https://lore.kernel.org/r/a19b88ccdbc03972fd97306b998731814283041f.1637785902.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mthca/mthca_mr.c