diff options
author | Alex Elder <elder@linaro.org> | 2022-11-02 17:11:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-04 10:16:53 +0000 |
commit | 9a9f512974d5e3e721e106f30429c16dfeb23326 (patch) | |
tree | 7154d7388a7d450dd16fff570b60a376203a4e09 /drivers/net/ipa/ipa.h | |
parent | f298ba785e2d4f18bc2d01ee1ce719efe14242f0 (diff) | |
download | lwn-9a9f512974d5e3e721e106f30429c16dfeb23326.tar.gz lwn-9a9f512974d5e3e721e106f30429c16dfeb23326.zip |
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>
Diffstat (limited to 'drivers/net/ipa/ipa.h')
-rw-r--r-- | drivers/net/ipa/ipa.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ipa/ipa.h b/drivers/net/ipa/ipa.h index a44595575d06..261c7263f9e3 100644 --- a/drivers/net/ipa/ipa.h +++ b/drivers/net/ipa/ipa.h @@ -62,7 +62,7 @@ struct ipa_interrupt; * @zero_virt: Virtual address of preallocated zero-filled memory * @zero_size: Size (bytes) of preallocated zero-filled memory * @endpoint_count: Number of endpoints represented by bit masks below - * @defined: Bit mask indicating endpoints defined in config data + * @defined: Bitmap of endpoints defined in config data * @available: Bit mask indicating endpoints hardware supports * @filter_map: Bit mask indicating endpoints that support filtering * @set_up: Bit mask indicating endpoints set up @@ -117,9 +117,9 @@ struct ipa { void *zero_virt; size_t zero_size; - /* Bit masks indicating endpoint state */ + /* Bitmaps indicating endpoint state */ u32 endpoint_count; - u32 defined; /* Defined in configuration data */ + unsigned long *defined; /* Defined in configuration data */ u32 available; /* Supported by hardware */ u32 filter_map; u32 set_up; |