aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/api/fd/array.c
diff options
context:
space:
mode:
authorAlex Elder <[email protected]>2020-10-28 14:41:48 -0500
committerJakub Kicinski <[email protected]>2020-10-30 17:20:13 -0700
commit4a0d7579d466e0e3b576a31f7f4fac16cfd06219 (patch)
tree2b73b241e63fd4b46098368793b48f04e4f16f27 /tools/lib/api/fd/array.c
parent8c365f747f0218f2bc6bad0740324c92444423fb (diff)
net: ipa: avoid going past end of resource group array
The minimum and maximum limits for resources assigned to a given resource group are programmed in pairs, with the limits for two groups set in a single register. If the number of supported resource groups is odd, only half of the register that defines these limits is valid for the last group; that group has no second group in the pair. Currently we ignore this constraint, and it turns out to be harmless, but it is not guaranteed to be. This patch addresses that, and adds support for programming the 5th resource group's limits. Rework how the resource group limit registers are programmed by having a single function program all group pairs rather than having one function program each pair. Add the programming of the 4-5 resource group pair limits to this function. If a resource group is not supported, pass a null pointer to ipa_resource_config_common() for that group and have that function write zeroes in that case. Tested-by: Sujit Kautkar <[email protected]> Signed-off-by: Alex Elder <[email protected]> Acked-by: Willem de Bruijn <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/lib/api/fd/array.c')
0 files changed, 0 insertions, 0 deletions