mbox series

[net-next,00/12] net: ipa: rework resource programming

Message ID 20210326151122.3121383-1-elder@linaro.org (mailing list archive)
Headers show
Series net: ipa: rework resource programming | expand

Message

Alex Elder March 26, 2021, 3:11 p.m. UTC
This series reworks the way IPA resources are defined and
programmed.  It is a little long--and I apologize for that--but
I think the patches are best taken together as a single unit.

The IPA hardware operates with a set of distinct "resources."  Each
hardware instance has a fixed number of each resource type available.  
Available resources are divided into smaller pools, with each pool
shared by endpoints in a "resource group."  Each endpoint is thus
assigned to a resource group that determines which pools supply
resources the IPA hardware uses to handle the endpoint's processing.

The exact set of resources used can differ for each version of IPA.
Except for IPA v3.0 and v3.1, there are 5 source and 2 destination
resource types, but there's no reason to assume this won't change.

The number of resource groups used *does* typically change based on
the hardware version.  For example, some versions target reduced
functionality and support fewer resource groups.

With that as background...

The net result of this series is to improve the flexibility with
which IPA resources and resource groups are defined, permitting each
version of IPA to define its own set of resources and groups.  Along
the way it isolates the resource-related code, and fixes a few bugs
related to resource handling.

The first patch moves resource-related code to a new C file (and
header).  It generates a checkpatch warning about updating
MAINTAINERS, which can be ignored.  The second patch fixes a bug,
but the bug does not affect SDM845 or SC7180.

The third patch defines an enumerated type whose members provide
symbolic names for resource groups.

The fourth defines some resource limits for SDM845 that were not
previously being programmed.  That platform "works" without this,
but to be correct, these limits should really be programmed.

The fifth patch uses a single enumerated type to define both source
and destination resource type IDs, and the sixth uses those IDs to
index the resource limit arrays.  The seventh moves the definition
of that enumerated type into the platform data files, allowing each
platform to define its own set of resource types.

The eighth and ninth are fairly trivial changes.  One replaces two
"max" symbols having the same value with a single symbol.  And the
other replaces two distinct but otherwise identical structure types
with a single common one.

The 10th is a small preparatory patch for the 11th, passing a
different argument to a function that programs resource values.
The 11th allows the actual number of source and destination resource
groups for a platform to be specified in its configuration data.
That way the number is based on the actual number of groups defined.
This removes the need for a sort of clunky pair of functions that
defined that information previously.

Finally, the last patch just increases the number of resource groups
that can be defined to 8.

					-Alex

Alex Elder (12):
  net: ipa: introduce ipa_resource.c
  net: ipa: fix bug in resource group limit programming
  net: ipa: identify resource groups
  net: ipa: add some missing resource limits
  net: ipa: combine resource type definitions
  net: ipa: index resource limits with type
  net: ipa: move ipa_resource_type definition
  net: ipa: combine source and destination group limits
  net: ipa: combine source and destation resource types
  net: ipa: pass data for source and dest resource config
  net: ipa: record number of groups in data
  net: ipa: support more than 6 resource groups

 drivers/net/ipa/Makefile          |   2 +-
 drivers/net/ipa/ipa_data-sc7180.c | 102 +++++++++--------
 drivers/net/ipa/ipa_data-sdm845.c | 169 ++++++++++++++++-----------
 drivers/net/ipa/ipa_data.h        |  62 ++++------
 drivers/net/ipa/ipa_main.c        | 148 +-----------------------
 drivers/net/ipa/ipa_reg.h         |  46 +-------
 drivers/net/ipa/ipa_resource.c    | 182 ++++++++++++++++++++++++++++++
 drivers/net/ipa/ipa_resource.h    |  27 +++++
 8 files changed, 393 insertions(+), 345 deletions(-)
 create mode 100644 drivers/net/ipa/ipa_resource.c
 create mode 100644 drivers/net/ipa/ipa_resource.h

Comments

patchwork-bot+netdevbpf@kernel.org March 26, 2021, 10:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Fri, 26 Mar 2021 10:11:10 -0500 you wrote:
> This series reworks the way IPA resources are defined and
> programmed.  It is a little long--and I apologize for that--but
> I think the patches are best taken together as a single unit.
> 
> The IPA hardware operates with a set of distinct "resources."  Each
> hardware instance has a fixed number of each resource type available.
> Available resources are divided into smaller pools, with each pool
> shared by endpoints in a "resource group."  Each endpoint is thus
> assigned to a resource group that determines which pools supply
> resources the IPA hardware uses to handle the endpoint's processing.
> 
> [...]

Here is the summary with links:
  - [net-next,01/12] net: ipa: introduce ipa_resource.c
    https://git.kernel.org/netdev/net-next/c/ee3e6beaa015
  - [net-next,02/12] net: ipa: fix bug in resource group limit programming
    https://git.kernel.org/netdev/net-next/c/a749c6c03762
  - [net-next,03/12] net: ipa: identify resource groups
    https://git.kernel.org/netdev/net-next/c/47f71d6e677c
  - [net-next,04/12] net: ipa: add some missing resource limits
    https://git.kernel.org/netdev/net-next/c/9ab7e7288266
  - [net-next,05/12] net: ipa: combine resource type definitions
    https://git.kernel.org/netdev/net-next/c/fd2b7bc32113
  - [net-next,06/12] net: ipa: index resource limits with type
    https://git.kernel.org/netdev/net-next/c/4bcfb35e7af9
  - [net-next,07/12] net: ipa: move ipa_resource_type definition
    https://git.kernel.org/netdev/net-next/c/cf9a10bd7c49
  - [net-next,08/12] net: ipa: combine source and destination group limits
    https://git.kernel.org/netdev/net-next/c/d9d1cddf8b98
  - [net-next,09/12] net: ipa: combine source and destation resource types
    https://git.kernel.org/netdev/net-next/c/7336ce1a7ae7
  - [net-next,10/12] net: ipa: pass data for source and dest resource config
    https://git.kernel.org/netdev/net-next/c/93c03729c548
  - [net-next,11/12] net: ipa: record number of groups in data
    https://git.kernel.org/netdev/net-next/c/4fd704b3608a
  - [net-next,12/12] net: ipa: support more than 6 resource groups
    https://git.kernel.org/netdev/net-next/c/3219953bedc5

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html