1. Feb 11, 2023
  2. Feb 10, 2023
    • Jakub Kicinski's avatar
      net: skbuff: drop the word head from skb cache · 025a785f
      Jakub Kicinski authored
      
      
      skbuff_head_cache is misnamed (perhaps for historical reasons?)
      because it does not hold heads. Head is the buffer which skb->data
      points to, and also where shinfo lives. struct sk_buff is a metadata
      structure, not the head.
      
      Eric recently added skb_small_head_cache (which allocates actual
      head buffers), let that serve as an excuse to finally clean this up :)
      
      Leave the user-space visible name intact, it could possibly be uAPI.
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      025a785f
    • David S. Miller's avatar
      Merge branch 'net-ipa-GSI' · 01a7ee36
      David S. Miller authored
      
      
      Alex Elder says:
      
      ====================
      net: ipa: prepare for GSI register updtaes
      
      An upcoming series (or two) will convert the definitions of GSI
      registers used by IPA so they use the "IPA reg" mechanism to specify
      register offsets and their fields.  This will simplify implementing
      the fairly large number of changes required in GSI registers to
      support more than 32 GSI channels (introduced in IPA v5.0).
      
      A few minor problems and inconsistencies were found, and they're
      fixed here.  The last three patches in this series change the
      "ipa_reg" code to separate the IPA-specific part (the base virtual
      address, basically) from the generic register part, and the now-
      generic code is renamed to use just "reg_" or "REG_" as a prefix
      rather than "ipa_reg" or "IPA_REG_".
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      01a7ee36
    • Alex Elder's avatar
      net: ipa: generalize register field functions · f1470fd7
      Alex Elder authored
      
      
      Rename functions related to register fields so they don't appear to
      be IPA-specific, and move their definitions into "reg.h":
          ipa_reg_fmask()	-> reg_fmask()
          ipa_reg_bit()	-> reg_bit()
          ipa_reg_field_max()	-> reg_field_max()
          ipa_reg_encode()	-> reg_encode()
          ipa_reg_decode()	-> reg_decode()
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f1470fd7
    • Alex Elder's avatar
      net: ipa: generalize register offset functions · fc4cecf7
      Alex Elder authored
      
      
      Rename ipa_reg_offset() to be reg_offset() and move its definition
      to "reg.h".  Rename ipa_reg_n_offset() to be reg_n_offset() also.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc4cecf7
    • Alex Elder's avatar
      net: ipa: start generalizing "ipa_reg" · 81772e44
      Alex Elder authored
      
      
      IPA register definitions have evolved with each new version.  The
      changes required to support more than 32 endpoints in IPA v5.0 made
      it best to define a unified mechanism for defining registers and
      their fields.
      
      GSI register definitions, meanwhile, have remained fairly stable.
      And even as the total number of IPA endpoints goes beyond 32, the
      number of GSI channels on a given EE that underly endpoints still
      remains 32 or less.
      
      Despite that, GSI v3.0 (which is used with IPA v5.0) extends the
      number of channels (and events) it supports to be about 256, and as
      a result, many GSI register definitions must change significantly.
      To address this, we'll use the same "ipa_reg" mechanism to define
      the GSI registers.
      
      As a first step in generalizing the "ipa_reg" to also support GSI
      registers, isolate the definitions of the "ipa_reg" and "ipa_regs"
      structure types (and some supporting macros) into a new header file,
      and remove the "ipa_" and "IPA_" from symbol names.
      
      Separate the IPA register ID validity checking from the generic
      check that a register ID is in range.  Aside from that, this is
      intended to have no functional effect on the code.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81772e44
    • Alex Elder's avatar
      net: ipa: GSI register cleanup · 0ec573ef
      Alex Elder authored
      
      
      Move some static inline function definitions out of "gsi_reg.h" and
      into "gsi.c", which is the only place they're used.  Rename them so
      their names identify the register they're associated with.
      
      Move the gsi_channel_type enumerated type definition below the
      offset and field definitions for the CH_C_CNTXT_0 register where
      it's used.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ec573ef
    • Alex Elder's avatar
      net: ipa: use bitmasks for GSI IRQ values · c5ebba75
      Alex Elder authored
      
      
      There are seven GSI interrupt types that can be signaled by a single
      GSI IRQ.  These are represented in a bitmask, and the gsi_irq_type_id
      enumerated type defines what each bit position represents.
      
      Similarly, the global and general GSI interrupt types each has a set
      of conditions it signals, and both types have an enumerated type
      that defines which bit that represents each condition.
      
      When used, these enumerated values are passed as an argument to BIT()
      in *all* cases.  So clean up the code a little bit by defining the
      enumerated type values as one-bit masks rather than bit positions.
      
      Rename gsi_general_id to be gsi_general_irq_id for consistency.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c5ebba75
    • Alex Elder's avatar
      net: ipa: tighten up IPA register validity checking · d86603e9
      Alex Elder authored
      
      
      When checking the validity of an IPA register ID, compare it against
      all possible ipa_reg_id values.
      
      Rename the function ipa_reg_id_valid() to be specific about what's
      being checked.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d86603e9
    • Alex Elder's avatar
      net: ipa: add some new IPA versions · 3aac8ec1
      Alex Elder authored
      
      
      Soon IPA v5.0+ will be supported, and when that happens we will be
      able to enable support for the SDX65 (IPA v5.0), SM8450 (IPA v5.1),
      and SM8550 (IPA v5.5).
      
      Fix the comment about the GSI version used for IPA v3.1.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3aac8ec1
    • Alex Elder's avatar
      net: ipa: get rid of ipa->reg_addr · 38028e6f
      Alex Elder authored
      
      
      The reg_addr field in the IPA structure is set but never used.
      Get rid of it.
      
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38028e6f
    • Alex Elder's avatar
      net: ipa: generic command param fix · 2df181f0
      Alex Elder authored
      Starting at IPA v4.11, the GSI_GENERIC_COMMAND GSI register got a
      new PARAMS field.  The code that encodes a value into that field
      sets it unconditionally, which is wrong.
      
      We currently only provide 0 as the field's value, so this error has
      no real effect.  Still, it's a bug, so let's fix it.
      
      Fix an (unrelated) incorrect comment as well.  Fields in the
      ERROR_LOG GSI register actually *are* defined for IPA versions
      prior to v3.5.1.
      
      Fixes: fe68c43c
      
       ("net: ipa: support enhanced channel flow control")
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2df181f0