“bcce7d90d120cddc726d5c98aa46188daef141f3”上不存在“drivers/gpu/drm/i915/gt/intel_ring_submission.c”
  1. 02 7月, 2021 2 次提交
    • G
      octeontx2-af: cn10k: Support configurable LMTST regions · 893ae972
      Geetha sowjanya 提交于
      This patch extends the lmtst_tbl_setup_req mbox to support run time
      LMTST configuration.
      RVU PF/VF and DPDK/ODP allocates a LMT region, creates a translation
      entry for a device via VFIO IOCTLs.
      This IOVA is shared with AF through above mbox. AF then uses
      RVU_SMMU transulation Widget and gets PA for the IOVA and updates
      the LMTtable entry for that device.
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Kovvuri Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      893ae972
    • H
      octeontx2-af: cn10k: Setting up lmtst map table · 873a1e3d
      Harman Kalra 提交于
      Introducing a new mailbox to support updating lmt entries
      and common lmt base address scheme i.e. multiple pcifuncs
      can share lmt region to reduce L1 cache pressure for application.
      Parameters passed to mailbox includes the primary pcifunc
      value whose lmt regions will be shared by other secondary
      pcifuncs. Here secondary pcifunc will be the one who is
      calling the mailbox.
      For example:
      By default each pcifunc has its own LMT base address:
              PCIFUNC1    LMT_BASE_ADDR A
              PCIFUNC2    LMT_BASE_ADDR B
              PCIFUNC3    LMT_BASE_ADDR C
              PCIFUNC4    LMT_BASE_ADDR D
      Application will choose PCIFUNC1 as base/primary pcifunc
      and as and when other pcifunc(secondary pcifuncs) gets
      probed, this mailbox will be called and LMTST table will
      be updated as:
              PCIFUNC1    LMT_BASE_ADDR A
              PCIFUNC2    LMT_BASE_ADDR A
              PCIFUNC3    LMT_BASE_ADDR A
              PCIFUNC4    LMT_BASE_ADDR A
      
      On FLR lmtst map table gets resetted to the default lmt
      base addresses for all secondary pcifuncs.
      Signed-off-by: NHarman Kalra <hkalra@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      873a1e3d
  2. 23 6月, 2021 1 次提交
    • K
      octeontx2-af: Avoid field-overflowing memcpy() · ee8e7622
      Kees Cook 提交于
      In preparation for FORTIFY_SOURCE performing compile-time and run-time
      field bounds checking for memcpy(), memmove(), and memset(), avoid
      intentionally writing across neighboring fields.
      
      To avoid having memcpy() think a u64 "prof" is being written beyond,
      adjust the prof member type by adding struct nix_bandprof_s to the union
      to match the other structs. This silences the following future warning:
      
      In file included from ./include/linux/string.h:253,
                       from ./include/linux/bitmap.h:10,
                       from ./include/linux/cpumask.h:12,
                       from ./arch/x86/include/asm/cpumask.h:5,
                       from ./arch/x86/include/asm/msr.h:11,
                       from ./arch/x86/include/asm/processor.h:22,
                       from ./arch/x86/include/asm/timex.h:5,
                       from ./include/linux/timex.h:65,
                       from ./include/linux/time32.h:13,
                       from ./include/linux/time.h:60,
                       from ./include/linux/stat.h:19,
                       from ./include/linux/module.h:13,
                       from drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:11:
      In function '__fortify_memcpy_chk',
          inlined from '__fortify_memcpy' at ./include/linux/fortify-string.h:310:2,
          inlined from 'rvu_nix_blk_aq_enq_inst' at drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:910:5:
      ./include/linux/fortify-string.h:268:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); please use struct_group() [-Wattribute-warning]
        268 |    __write_overflow_field();
            |    ^~~~~~~~~~~~~~~~~~~~~~~~
      
      drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c:
      ...
                              else if (req->ctype == NIX_AQ_CTYPE_BANDPROF)
                                      memcpy(&rsp->prof, ctx,
                                             sizeof(struct nix_bandprof_s));
      ...
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Tested-by: Subbaraya Sundeep<sbhatta@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee8e7622
  3. 16 6月, 2021 1 次提交
  4. 12 6月, 2021 2 次提交
  5. 22 4月, 2021 2 次提交
  6. 25 3月, 2021 1 次提交
  7. 19 3月, 2021 1 次提交
  8. 18 3月, 2021 2 次提交
  9. 12 2月, 2021 5 次提交
    • H
      octeontx2-af: cn10k: Add RPM Rx/Tx stats support · ce7a6c31
      Hariprasad Kelam 提交于
      RPM supports below list of counters as an extension to existing counters
       *  class based flow control pause frames
       *  vlan/jabber/fragmented packets
       *  fcs/alignment/oversized error packets
      
      This patch adds support to display supported RPM counters via debugfs
      and define new mbox rpm_stats to read all support counters.
      Signed-off-by: NHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Kovvuri Goutham <Sunil.Goutham@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce7a6c31
    • H
      octeontx2-af: cn10K: Add MTU configuration · 6e54e1c5
      Hariprasad Kelam 提交于
      OcteonTx3 CN10K silicon supports bigger MTU when compared
      to 9216 MTU supported by OcteonTx2 silicon variants. Lookback
      interface supports upto 64K and RPM LMAC interfaces support
      upto 16K.
      
      This patch does the necessary configuration and adds support
      for PF/VF drivers to retrieve max packet size supported via mbox
      
      This patch also configures tx link credit by considering supported
      fifo size and max packet length for Octeontx3 silicon.
      
      This patch also removes platform specific name from the driver name.
      Signed-off-by: NHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e54e1c5
    • H
      octeontx2-af: cn10k: Add RPM MAC support · 91c6945e
      Hariprasad Kelam 提交于
      OcteonTx2's next gen platform the CN10K has RPM MAC which has a
      different serdes when compared to CGX MAC. Though the underlying
      HW is different, the CSR interface has been designed largely inline
      with CGX MAC, with few exceptions though. So we are using the same
      CGX driver for RPM MAC as well and will have a different set of APIs
      for RPM where ever necessary.
      
      This patch adds initial support for CN10K's RPM MAC i.e. the driver
      registration, communication with firmware etc. For communication with
      firmware, RPM provides a different IRQ when compared to CGX.
      The CGX and RPM blocks support different features. Currently few
      features like ptp, flowcontrol and higig are not supported by RPM. This
      patch adds new mailbox message "CGX_FEATURES_GET" to get the list of
      features supported by underlying MAC.
      
      RPM has different implementations for RX/TX stats. Unlike CGX,
      bar offset of stat registers are different. This patch adds
      support to access the same and dump the values in debugfs.
      Signed-off-by: NHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: NSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91c6945e
    • G
      octeontx2-af: cn10k: Update NIX/NPA context structure · 30077d21
      Geetha sowjanya 提交于
      NIX hardware context structure got changed to accommodate new
      features like bandwidth steering, L3/L4 outer/inner checksum
      enable/disable etc., on CN10K platform.
      This patch defines new mbox message NIX_CN10K_AQ_INST for new
      NIX context initialization.
      
      This patch also updates the NPA context structures to accommodate
      bit field changes made for CN10K platform.
      
      This patch also removes Big endian bit fields from existing
      structures as its support got deprecated in current and upcoming silicons.
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30077d21
    • S
      octeontx2-af: cn10k: Add mbox support for CN10K platform · 98c56111
      Subbaraya Sundeep 提交于
      Firmware allocates memory regions for PFs and VFs in DRAM.
      The PFs memory region is used for AF-PF and PF-VF mailbox.
      This mbox facilitates communication between AF-PF and PF-VF.
      
      On CN10K platform:
      The DRAM region allocated to PF is enumerated as PF BAR4 memory.
      PF BAR4 contains AF-PF mbox region followed by its VFs mbox region.
      AF-PF mbox region base address is configured at RVU_AF_PFX_BAR4_ADDR
      PF-VF mailbox base address is configured at
      RVU_PF(x)_VF_MBOX_ADDR = RVU_AF_PF()_BAR4_ADDR+64KB. PF access its
      mbox region via BAR4, whereas VF accesses PF-VF DRAM mailboxes via
      BAR2 indirect access.
      
      On CN9XX platform:
      Mailbox region in DRAM is divided into two parts AF-PF mbox region and
      PF-VF mbox region i.e all PFs mbox region is contiguous similarly all
      VFs.
      The base address of the AF-PF mbox region is configured at
      RVU_AF_PF_BAR4_ADDR.
      AF-PF1 mbox address can be calculated as RVU_AF_PF_BAR4_ADDR * mbox
      size.
      The base address of PF-VF mbox region for each PF is configure at
      RVU_AF_PF(0..15)_VF_BAR4_ADDR.PF access its mbox region via BAR4 and its
      VF mbox regions from RVU_PF_VF_BAR4_ADDR register, whereas VF access its
      mbox region via BAR4.
      
      This patch changes mbox initialization to support both CN9XX and CN10K
      platform.
      
      This patch also adds CN10K PTP subsystem and device IDs to ptp
      driver id table.
      Signed-off-by: NSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      98c56111
  10. 11 2月, 2021 4 次提交
  11. 04 2月, 2021 1 次提交
  12. 26 1月, 2021 1 次提交
  13. 22 11月, 2020 1 次提交
  14. 21 11月, 2020 1 次提交
  15. 18 11月, 2020 5 次提交
  16. 01 11月, 2020 1 次提交
    • S
      octeontx2-af: Mbox changes for 98xx · a84cdcea
      Subbaraya Sundeep 提交于
      This patch puts together all mailbox changes
      for 98xx silicon:
      
      Attach ->
      Modify resource attach mailbox handler to
      request LFs from a block address out of multiple
      blocks of same type. If a PF/VF need LFs from two
      blocks of same type then attach mbox should be
      called twice.
      
      Example:
              struct rsrc_attach *attach;
              .. Allocate memory for message ..
              attach->cptlfs = 3; /* 3 LFs from CPT0 */
              .. Send message ..
              .. Allocate memory for message ..
              attach->modify = 1;
              attach->cpt_blkaddr = BLKADDR_CPT1;
              attach->cptlfs = 2; /* 2 LFs from CPT1 */
              .. Send message ..
      
      Detach ->
      Update detach mailbox and its handler to detach
      resources from CPT1 and NIX1 blocks.
      
      MSIX ->
      Updated the MSIX mailbox and its handler to return
      MSIX offsets for the new block CPT1.
      
      Free resources ->
      Update free_rsrc mailbox and its handler to return
      the free resources count of new blocks NIX1 and CPT1
      
      Links ->
      Number of CGX,LBK and SDP links may vary between
      platforms. For example, in 98xx number of CGX and LBK
      links are more than 96xx. Hence the info about number
      of links present in hardware is useful for consumers to
      request link configuration properly. This patch sends
      this info in nix_lf_alloc_rsp.
      Signed-off-by: NSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NRakesh Babu <rsaladi2@marvell.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      a84cdcea
  17. 01 10月, 2020 1 次提交
    • H
      octeontx2-pf: Fix synchnorization issue in mbox · 66a5209b
      Hariprasad Kelam 提交于
      Mbox implementation in octeontx2 driver has three states
      alloc, send and reset in mbox response. VF allocate and
      sends message to PF for processing, PF ACKs them back and
      reset the mbox memory. In some case we see synchronization
      issue where after msgs_acked is incremented and before
      mbox_reset API is called, if current execution is scheduled
      out and a different thread is scheduled in which checks for
      msgs_acked. Since the new thread sees msgs_acked == msgs_sent
      it will try to allocate a new message and to send a new mbox
      message to PF.Now if mbox_reset is scheduled in, PF will see
      '0' in msgs_send.
      This patch fixes the issue by calling mbox_reset before
      incrementing msgs_acked flag for last processing message and
      checks for valid message size.
      
      Fixes: d424b6c0 ("octeontx2-pf: Enable SRIOV and added VF mbox handling")
      Signed-off-by: NHariprasad Kelam <hkelam@marvell.com>
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      66a5209b
  18. 24 9月, 2020 1 次提交
  19. 25 8月, 2020 2 次提交
  20. 03 3月, 2020 3 次提交
    • L
      octeontx2-af: Optimize data retrieval from firmware · 4f4eebf2
      Linu Cherian 提交于
      For retrieving info like interface MAC addresses, packet
      parser key extraction config etc currently a command
      is sent to firmware and firmware which periodically polls
      for commands, processes these and returns the info.
      
      This is resulting in interface initialization taking lot
      of time. To optimize this a memory region is shared between
      firmware and this driver, firmware while booting puts
      static info like these into that region for driver to
      read directly without using commands.
      
      With this
      - Logic for retrieving packet parser extraction config
        via commands is removed and repalced with using the
        shared 'fwdata' structure.
      - Now RVU MSIX vector address is also retrieved from this fwdata struct
        instead of from CSR. Otherwise when kexec/kdump crash kernel loads
        CSR will have a IOVA setup by primary kernel which impacts
        RVU PF/VF's interrupts.
      - Also added a mbox handler for PF/VF interfaces to retrieve their MAC
        addresses from AF.
      Signed-off-by: NLinu Cherian <lcherian@marvell.com>
      Signed-off-by: NChristina Jacob <cjacob@marvell.com>
      Signed-off-by: NRakesh Babu <rsaladi2@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f4eebf2
    • G
      octeontx2-af: Pause frame configuration at cgx · f7e086e7
      Geetha sowjanya 提交于
      CGX LMAC, the physical interface can generate pause frames when
      internal resources asserts backpressure due to exhaustion.
      
      This patch configures CGX to generate 802.3 pause frames.
      Also enabled processing of received pause frames on the line which
      will assert backpressure on the internal transmit path.
      
      Also added mailbox handlers for PF drivers to enable or disable
      pause frames anytime.
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7e086e7
    • G
      octeontx2-af: Interface backpressure configuration · 27150bc4
      Geetha sowjanya 提交于
      Each of the interface receive channels can be backpressured by
      resources upon exhaustion or reaching configured threshold levels.
      Resources here are receive buffer queues (Auras) and pkt notification
      descriptor queues (CQs). Resources and interface channels are mapped
      using backpressure IDs (BPIDs).
      
      HW supports upto 512 BPIDs, this patch divides these BPIDs statically
      across CGX/LBK/SDP interfaces as follows.
      BPIDs 0 - 191 are mapped to LMAC channels, 16 per LMAC.
      BPIDs 192 - 255 are mapped to LBK channels.
      BPIDs 256 - 511 are mapped to SDP channels.
      Also did the needed basic configuration of BPIDs.
      
      Added mbox handlers with which a PF device can request for a BPID which
      it will use to configure Auras and CQs.
      Signed-off-by: NGeetha sowjanya <gakula@marvell.com>
      Signed-off-by: NSunil Goutham <sgoutham@marvell.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27150bc4
  21. 27 1月, 2020 1 次提交
  22. 17 11月, 2019 1 次提交