]> git.itanic.dy.fi Git - linux-stable/commit
net: ipa: use a bitmap for defined endpoints
authorAlex Elder <elder@linaro.org>
Wed, 2 Nov 2022 22:11:35 +0000 (17:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Nov 2022 10:16:53 +0000 (10:16 +0000)
commit9a9f512974d5e3e721e106f30429c16dfeb23326
tree7154d7388a7d450dd16fff570b60a376203a4e09
parentf298ba785e2d4f18bc2d01ee1ce719efe14242f0
net: ipa: use a bitmap for defined endpoints

IPA v5.0 supports more than 32 endpoints, so we will be unable to
represent endpoints defined in the configuration data with a 32-bit
value.  To prepare for that, convert the field in the IPA structure
representing defined endpoints to be a Linux bitmap.

Convert loops based on that field into for_each_set_bit() calls over
the new bitmap.  Note that the loop in ipa_endpoint_config() still
assumes there are 32 or fewer endpoints (when comparing against the
available endpoint bit mask); that assumption goes away in the next
patch.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa.h
drivers/net/ipa/ipa_endpoint.c