]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: remove command info pool
authorAlex Elder <elder@linaro.org>
Sun, 22 May 2022 00:32:22 +0000 (19:32 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 May 2022 19:46:12 +0000 (20:46 +0100)
commit49d594ced0ae28548e07f2b10fa25d7755ea5af2
tree2f2bfd32f8b67057596e4c27887804f298cfbd7d
parentb6e9fab3de54e346766f0db90e9ca852df10690c
net: ipa: remove command info pool

The ipa_cmd_info structure now contains only one field, and it's an
enumerated type whose values all fit in 8 bits.  Currently we'll
never use more than 8 TREs in a command transaction, and we can
represent that number of command opcodes in the same space as a 64
bit pointer to an ipa_cmd_info structure.

Define IPA_COMMAND_TRANS_TRE_MAX as the maximum number of TREs that
can be in a command transaction.  Replace the info pointer in a
transaction with a fixed-size array named cmd_opcode[] of that many
bytes.  Store the opcode in this array when adding a command TRE to
a transaction, as was done previously for the info array.  This
makes the ipa_cmd_info unused, so get rid of it.

When committing an immediate command transaction, use the channel's
Boolean command flag to determine whether to fill in the opcode,
which will be taken (as before) from the array in the transaction.

This makes the command info pool unnecessary, so get rid of it.

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