Skip to content

Commit fce8a7b

Browse files
Jon Masongregkh
authored andcommitted
PCI-Express Non-Transparent Bridge Support
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 <jon.mason@intel.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ea8a83a commit fce8a7b

File tree

10 files changed

+3012
-0
lines changed

10 files changed

+3012
-0
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5394,6 +5394,12 @@ S: Maintained
53945394
F: Documentation/scsi/NinjaSCSI.txt
53955395
F: drivers/scsi/nsp32*
53965396

5397+
NTB DRIVER
5398+
M: Jon Mason <jon.mason@intel.com>
5399+
S: Supported
5400+
F: drivers/ntb/
5401+
F: include/linux/ntb.h
5402+
53975403
NTFS FILESYSTEM
53985404
M: Anton Altaparmakov <anton@tuxera.com>
53995405
L: linux-ntfs-dev@lists.sourceforge.net

drivers/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ source "drivers/memory/Kconfig"
150150

151151
source "drivers/iio/Kconfig"
152152

153+
source "drivers/ntb/Kconfig"
154+
153155
source "drivers/vme/Kconfig"
154156

155157
source "drivers/pwm/Kconfig"

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,4 @@ obj-$(CONFIG_MEMORY) += memory/
146146
obj-$(CONFIG_IIO) += iio/
147147
obj-$(CONFIG_VME_BUS) += vme/
148148
obj-$(CONFIG_IPACK_BUS) += ipack/
149+
obj-$(CONFIG_NTB) += ntb/

drivers/ntb/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
config NTB
2+
tristate "Intel Non-Transparent Bridge support"
3+
depends on PCI
4+
depends on X86
5+
help
6+
The PCI-E Non-transparent bridge hardware is a point-to-point PCI-E bus
7+
connecting 2 systems. When configured, writes to the device's PCI
8+
mapped memory will be mirrored to a buffer on the remote system. The
9+
ntb Linux driver uses this point-to-point communication as a method to
10+
transfer data from one system to the other.
11+
12+
If unsure, say N.
13+

drivers/ntb/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
obj-$(CONFIG_NTB) += ntb.o
2+
3+
ntb-objs := ntb_hw.o ntb_transport.o

0 commit comments

Comments
 (0)