22 Jul, 2019

1 commit

  • Pull NTB updates from Jon Mason:
    "New feature to add support for NTB virtual MSI interrupts, the ability
    to test and use this feature in the NTB transport layer.

    Also, bug fixes for the AMD and Switchtec drivers, as well as some
    general patches"

    * tag 'ntb-5.3' of git://github.com/jonmason/ntb: (22 commits)
    NTB: Describe the ntb_msi_test client in the documentation.
    NTB: Add MSI interrupt support to ntb_transport
    NTB: Add ntb_msi_test support to ntb_test
    NTB: Introduce NTB MSI Test Client
    NTB: Introduce MSI library
    NTB: Rename ntb.c to support multiple source files in the module
    NTB: Introduce functions to calculate multi-port resource index
    NTB: Introduce helper functions to calculate logical port number
    PCI/switchtec: Add module parameter to request more interrupts
    PCI/MSI: Support allocating virtual MSI interrupts
    ntb_hw_switchtec: Fix setup MW with failure bug
    ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case
    ntb_hw_switchtec: Remove redundant steps of switchtec_ntb_reinit_peer() function
    NTB: correct ntb_dev_ops and ntb_dev comment typos
    NTB: amd: Silence shift wrapping warning in amd_ntb_db_vector_mask()
    ntb_hw_switchtec: potential shift wrapping bug in switchtec_ntb_init_sndev()
    NTB: ntb_transport: Ensure qp->tx_mw_dma_addr is initaliazed
    NTB: ntb_hw_amd: set peer limit register
    NTB: ntb_perf: Clear stale values in doorbell and command SPAD register
    NTB: ntb_perf: Disable NTB link after clearing peer XLAT registers
    ...

    Linus Torvalds
     

13 Jun, 2019

2 commits

  • The NTB MSI library allows passing MSI interrupts across a memory
    window. This offers similar functionality to doorbells or messages
    except will often have much better latency and the client can
    potentially use significantly more remote interrupts than typical hardware
    provides for doorbells. (Which can be important in high-multiport
    setups.)

    The library utilizes one memory window per peer and uses the highest
    index memory windows. Before any ntb_msi function may be used, the user
    must call ntb_msi_init(). It may then setup and tear down the memory
    windows when the link state changes using ntb_msi_setup_mws() and
    ntb_msi_clear_mws().

    The peer which receives the interrupt must call ntb_msim_request_irq()
    to assign the interrupt handler (this function is functionally
    similar to devm_request_irq()) and the returned descriptor must be
    transferred to the peer which can use it to trigger the interrupt.
    The triggering peer, once having received the descriptor, can
    trigger the interrupt by calling ntb_msi_peer_trigger().

    Signed-off-by: Logan Gunthorpe
    Cc: Dave Jiang
    Cc: Allen Hubbe
    Signed-off-by: Jon Mason

    Logan Gunthorpe
     
  • The kbuild system does not support having multiple source files in
    a module if one of those source files has the same name as the module.

    Therefore, we must rename ntb.c to core.c, while the module remains
    ntb.ko.

    This is similar to the way the nvme modules are structured.

    Signed-off-by: Logan Gunthorpe
    Cc: Dave Jiang
    Cc: Allen Hubbe
    Signed-off-by: Jon Mason

    Logan Gunthorpe
     

21 May, 2019

1 commit


05 Jul, 2015

3 commits


02 Jul, 2015

1 commit

  • This patch only moves files to their new locations, before applying the
    next two patches adding the NTB Abstraction layer. Splitting this patch
    from the next is intended make distinct which code is changed only due
    to moving the files, versus which are substantial code changes in adding
    the NTB Abstraction layer.

    Signed-off-by: Allen Hubbe
    Signed-off-by: Jon Mason

    Allen Hubbe
     

18 Jan, 2013

1 commit

  • A PCI-Express non-transparent bridge (NTB) is a point-to-point PCIe bus
    connecting 2 systems, providing electrical isolation between the two subsystems.
    A non-transparent bridge is functionally similar to a transparent bridge except
    that both sides of the bridge have their own independent address domains. The
    host on one side of the bridge will not have the visibility of the complete
    memory or I/O space on the other side of the bridge. To communicate across the
    non-transparent bridge, each NTB endpoint has one (or more) apertures exposed to
    the local system. Writes to these apertures are mirrored to memory on the
    remote system. Communications can also occur through the use of doorbell
    registers that initiate interrupts to the alternate domain, and scratch-pad
    registers accessible from both sides.

    The NTB device driver is needed to configure these memory windows, doorbell, and
    scratch-pad registers as well as use them in such a way as they can be turned
    into a viable communication channel to the remote system. ntb_hw.[ch]
    determines the usage model (NTB to NTB or NTB to Root Port) and abstracts away
    the underlying hardware to provide access and a common interface to the doorbell
    registers, scratch pads, and memory windows. These hardware interfaces are
    exported so that other, non-mainlined kernel drivers can access these.
    ntb_transport.[ch] also uses the exported interfaces in ntb_hw.[ch] to setup a
    communication channel(s) and provide a reliable way of transferring data from
    one side to the other, which it then exports so that "client" drivers can access
    them. These client drivers are used to provide a standard kernel interface
    (i.e., Ethernet device) to NTB, such that Linux can transfer data from one
    system to the other in a standard way.

    Signed-off-by: Jon Mason
    Reviewed-by: Nicholas Bellinger
    Signed-off-by: Greg Kroah-Hartman

    Jon Mason