Re: [PATCH net 5/5] net: ipa: avoid going past end of resource group array

Alex Elder
2020-10-28T22:25:32Z

On 10/27/20 7:14 PM, Willem de Bruijn wrote:
> On Tue, Oct 27, 2020 at 12:38 PM Alex Elder <elder@linaro.org> wrote:
>>
>> 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,
>
> If nothing currently calls it with an odd number of registers, is this
> a bugfix or a new feature (anticipating future expansion, I guess)?

. . .

Sorry, I missed this comment. Yes, I'm working on support for
an upcoming IPA hardware version that has 5 resources of each
type. And it is a bug fix, though the bug doesn't bite us
(because the maximum number of resources supported is even),
so "it turns out to be harmless."

-Alex