/kernel/linux/linux-5.10/include/linux/ |
D | ntb.h | 174 int (*probe)(struct ntb_client *client, struct ntb_dev *ntb); 175 void (*remove)(struct ntb_client *client, struct ntb_dev *ntb); 261 int (*port_number)(struct ntb_dev *ntb); 262 int (*peer_port_count)(struct ntb_dev *ntb); 263 int (*peer_port_number)(struct ntb_dev *ntb, int pidx); 264 int (*peer_port_idx)(struct ntb_dev *ntb, int port); 266 u64 (*link_is_up)(struct ntb_dev *ntb, 268 int (*link_enable)(struct ntb_dev *ntb, 270 int (*link_disable)(struct ntb_dev *ntb); 272 int (*mw_count)(struct ntb_dev *ntb, int pidx); [all …]
|
D | genl_magic_func.h | 144 struct nlattr **ntb = nested_attr_tb; \ 151 err = drbd_nla_parse_nested(ntb, maxtype, tla, s_name ## _nl_policy); \ 170 nla = ntb[attr_nr]; \
|
/kernel/linux/linux-5.10/drivers/ntb/ |
D | core.c | 101 int ntb_register_device(struct ntb_dev *ntb) in ntb_register_device() argument 103 if (!ntb) in ntb_register_device() 105 if (!ntb->pdev) in ntb_register_device() 107 if (!ntb->ops) in ntb_register_device() 109 if (!ntb_dev_ops_is_valid(ntb->ops)) in ntb_register_device() 112 init_completion(&ntb->released); in ntb_register_device() 114 ntb->dev.bus = &ntb_bus; in ntb_register_device() 115 ntb->dev.parent = &ntb->pdev->dev; in ntb_register_device() 116 ntb->dev.release = ntb_dev_release; in ntb_register_device() 117 dev_set_name(&ntb->dev, "%s", pci_name(ntb->pdev)); in ntb_register_device() [all …]
|
D | msi.c | 31 int ntb_msi_init(struct ntb_dev *ntb, in ntb_msi_init() argument 42 peers = ntb_peer_port_count(ntb); in ntb_msi_init() 46 struct_size = sizeof(*ntb->msi) + sizeof(*ntb->msi->peer_mws) * peers; in ntb_msi_init() 48 ntb->msi = devm_kzalloc(&ntb->dev, struct_size, GFP_KERNEL); in ntb_msi_init() 49 if (!ntb->msi) in ntb_msi_init() 52 ntb->msi->desc_changed = desc_changed; in ntb_msi_init() 55 peer_widx = ntb_peer_mw_count(ntb) - 1 - i; in ntb_msi_init() 57 ret = ntb_peer_mw_get_addr(ntb, peer_widx, &mw_phys_addr, in ntb_msi_init() 62 ntb->msi->peer_mws[i] = devm_ioremap(&ntb->dev, mw_phys_addr, in ntb_msi_init() 64 if (!ntb->msi->peer_mws[i]) { in ntb_msi_init() [all …]
|
D | Makefile | 2 obj-$(CONFIG_NTB) += ntb.o hw/ test/ 5 ntb-y := core.o 6 ntb-$(CONFIG_NTB_MSI) += msi.o
|
D | Kconfig | 9 ntb Linux driver uses this point-to-point communication as a method to 27 source "drivers/ntb/hw/Kconfig" 29 source "drivers/ntb/test/Kconfig" 35 messages over the ntb hardware. The transport exposes a queue pair api
|
/kernel/linux/linux-5.10/drivers/ntb/test/ |
D | ntb_pingpong.c | 100 struct ntb_dev *ntb; member 121 link = ntb_link_is_up(pp->ntb, NULL, NULL); in pp_find_next_peer() 131 out_db = BIT_ULL(ntb_peer_port_number(pp->ntb, pidx)); in pp_find_next_peer() 145 ntb_db_set_mask(pp->ntb, pp->in_db); in pp_setup() 151 dev_dbg(&pp->ntb->dev, "Got no peers, so cancel\n"); in pp_setup() 155 dev_dbg(&pp->ntb->dev, "Ping-pong started with port %d, db %#llx\n", in pp_setup() 156 ntb_peer_port_number(pp->ntb, pp->out_pidx), pp->out_db); in pp_setup() 165 ntb_db_set_mask(pp->ntb, pp->in_db); in pp_clear() 167 dev_dbg(&pp->ntb->dev, "Ping-pong cancelled\n"); in pp_clear() 177 ntb_peer_spad_write(pp->ntb, pp->out_pidx, 0, count); in pp_ping() [all …]
|
D | ntb_msi_test.c | 20 struct ntb_dev *ntb; member 48 dev_dbg(&nm->ntb->dev, "Interrupt Occurred: %d", in ntb_msit_isr() 65 ret = ntb_msi_setup_mws(nm->ntb); in ntb_msit_setup_work() 67 dev_err(&nm->ntb->dev, "Unable to setup MSI windows: %d\n", in ntb_msit_setup_work() 77 irq = ntbm_msi_request_irq(nm->ntb, ntb_msit_isr, in ntb_msit_setup_work() 87 ret = ntb_spad_write(nm->ntb, 2 * i + 1, in ntb_msit_setup_work() 92 ret = ntb_spad_write(nm->ntb, 2 * i + 2, in ntb_msit_setup_work() 100 ntb_spad_write(nm->ntb, 0, irq_count); in ntb_msit_setup_work() 101 ntb_peer_db_set(nm->ntb, BIT(ntb_port_number(nm->ntb))); in ntb_msit_setup_work() 109 dev_dbg(&nm->ntb->dev, "MSI Descriptors Changed\n"); in ntb_msit_desc_changed() [all …]
|
D | ntb_perf.c | 188 struct ntb_dev *ntb; member 253 link = ntb_link_is_up(peer->perf->ntb, NULL, NULL); in perf_link_is_up() 264 dev_dbg(&perf->ntb->dev, "CMD send: %d 0x%llx\n", cmd, data); in perf_spad_cmd_send() 277 sts = ntb_peer_spad_read(perf->ntb, peer->pidx, in perf_spad_cmd_send() 284 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send() 287 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send() 290 ntb_peer_spad_write(perf->ntb, peer->pidx, in perf_spad_cmd_send() 293 ntb_peer_db_set(perf->ntb, PERF_SPAD_NOTIFY(peer->gidx)); in perf_spad_cmd_send() 295 dev_dbg(&perf->ntb->dev, "DB ring peer %#llx\n", in perf_spad_cmd_send() 310 ntb_db_clear(perf->ntb, PERF_SPAD_NOTIFY(perf->gidx)); in perf_spad_cmd_recv() [all …]
|
D | ntb_tool.c | 257 struct ntb_dev *ntb; member 296 up = ntb_link_is_up(tc->ntb, &speed, &width); in tool_link_event() 298 dev_dbg(&tc->ntb->dev, "link is %s speed %d width %d\n", in tool_link_event() 309 db_mask = ntb_db_vector_mask(tc->ntb, vec); in tool_db_event() 310 db_bits = ntb_db_read(tc->ntb); in tool_db_event() 312 dev_dbg(&tc->ntb->dev, "doorbell vec %d mask %#llx bits %#llx\n", in tool_db_event() 323 msg_sts = ntb_msg_read_sts(tc->ntb); in tool_msg_event() 325 dev_dbg(&tc->ntb->dev, "message bits %#llx\n", msg_sts); in tool_msg_event() 354 pos = scnprintf(buf, buf_size, "%#llx\n", fn_read(tc->ntb)); in tool_fn_read() 394 ret = fn_set(tc->ntb, bits); in tool_fn_write() [all …]
|
D | Kconfig | 6 doorbells of the ntb hardware. This driver may be used to test that 7 your ntb hardware and drivers are functioning at a basic level. 17 This driver may be used to test that your ntb hardware and drivers are
|
/kernel/linux/linux-5.10/drivers/ntb/hw/amd/ |
D | ntb_hw_amd.c | 84 static int amd_ntb_mw_count(struct ntb_dev *ntb, int pidx) in amd_ntb_mw_count() argument 89 return ntb_ndev(ntb)->mw_count; in amd_ntb_mw_count() 92 static int amd_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, int idx, in amd_ntb_mw_get_align() argument 97 struct amd_ntb_dev *ndev = ntb_ndev(ntb); in amd_ntb_mw_get_align() 114 *size_max = pci_resource_len(ndev->ntb.pdev, bar); in amd_ntb_mw_get_align() 119 static int amd_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int idx, in amd_ntb_mw_set_trans() argument 122 struct amd_ntb_dev *ndev = ntb_ndev(ntb); in amd_ntb_mw_set_trans() 136 mw_size = pci_resource_len(ntb->pdev, bar); in amd_ntb_mw_set_trans() 145 base_addr = pci_resource_start(ntb->pdev, bar); in amd_ntb_mw_set_trans() 206 if (ndev->ntb.topo == NTB_TOPO_SEC) { in amd_ntb_get_link_status() [all …]
|
D | ntb_hw_amd.h | 181 struct ntb_dev ntb; member 216 #define ntb_ndev(__ntb) container_of(__ntb, struct amd_ntb_dev, ntb)
|
/kernel/linux/linux-5.10/drivers/ntb/hw/intel/ |
D | ntb_hw_gen1.h | 158 int intel_ntb_mw_count(struct ntb_dev *ntb, int pidx); 159 int intel_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, int idx, 162 int intel_ntb_peer_mw_count(struct ntb_dev *ntb); 163 int intel_ntb_peer_mw_get_addr(struct ntb_dev *ntb, int idx, 165 u64 intel_ntb_link_is_up(struct ntb_dev *ntb, enum ntb_speed *speed, 167 int intel_ntb_link_disable(struct ntb_dev *ntb); 168 u64 intel_ntb_db_valid_mask(struct ntb_dev *ntb); 169 int intel_ntb_db_vector_count(struct ntb_dev *ntb); 170 u64 intel_ntb_db_vector_mask(struct ntb_dev *ntb, int db_vector); 171 int intel_ntb_db_set_mask(struct ntb_dev *ntb, u64 db_bits); [all …]
|
D | ntb_hw_gen3.c | 102 rc = pci_read_config_word(ndev->ntb.pdev, in gen3_poll_link() 150 pdev = ndev->ntb.pdev; in gen3_setup_b2b_mw() 187 switch (ndev->ntb.topo) { in gen3_init_ntb() 194 if (ndev->ntb.topo == NTB_TOPO_B2B_USD) { in gen3_init_ntb() 232 pdev = ndev->ntb.pdev; in gen3_init_dev() 240 ndev->ntb.topo = xeon_ppd_topo(ndev, ppd); in gen3_init_dev() 242 ntb_topo_string(ndev->ntb.topo)); in gen3_init_dev() 243 if (ndev->ntb.topo == NTB_TOPO_NONE) in gen3_init_dev() 281 ntb_topo_string(ndev->ntb.topo)); in ndev_ntb3_debugfs_read() 347 if (ntb_topo_is_b2b(ndev->ntb.topo)) { in ndev_ntb3_debugfs_read() [all …]
|
D | ntb_hw_gen1.c | 152 if (!ntb_topo_is_b2b(ndev->ntb.topo)) in ndev_reset_unsafe_flags() 193 dev_dbg(&ndev->ntb.pdev->dev, "Peer db addr %llx\n", *db_addr); in ndev_db_addr() 198 dev_dbg(&ndev->ntb.pdev->dev, "Peer db size %llx\n", *db_size); in ndev_db_addr() 289 dev_dbg(&ndev->ntb.pdev->dev, "Peer spad addr %llx\n", in ndev_spad_addr() 331 dev_dbg(&ndev->ntb.pdev->dev, "vec %d vec_mask %llx\n", vec, vec_mask); in ndev_interrupt() 337 ntb_link_event(&ndev->ntb); in ndev_interrupt() 341 ntb_db_event(&ndev->ntb, vec); in ndev_interrupt() 350 dev_dbg(&nvec->ndev->ntb.pdev->dev, "irq: %d nvec->num: %d\n", in ndev_vec_isr() 360 return ndev_interrupt(ndev, irq - ndev->ntb.pdev->irq); in ndev_irq_isr() 370 pdev = ndev->ntb.pdev; in ndev_init_isr() [all …]
|
D | ntb_hw_gen4.c | 104 pdev = ndev->ntb.pdev; in gen4_setup_b2b_mw() 141 if (ndev->ntb.topo == NTB_TOPO_B2B_USD) in gen4_init_ntb() 185 struct pci_dev *pdev = ndev->ntb.pdev; in gen4_init_dev() 197 ndev->ntb.topo = gen4_ppd_topo(ndev, ppd1); in gen4_init_dev() 199 ndev->ntb.topo = spr_ppd_topo(ndev, ppd1); in gen4_init_dev() 201 ntb_topo_string(ndev->ntb.topo)); in gen4_init_dev() 202 if (ndev->ntb.topo == NTB_TOPO_NONE) in gen4_init_dev() 243 ntb_topo_string(ndev->ntb.topo)); in ndev_ntb4_debugfs_read() 311 if (!pci_read_config_word(ndev->ntb.pdev, in ndev_ntb4_debugfs_read() 320 if (!pci_read_config_dword(ndev->ntb.pdev, in ndev_ntb4_debugfs_read() [all …]
|
D | ntb_hw_gen3.h | 107 int intel_ntb3_link_enable(struct ntb_dev *ntb, enum ntb_speed max_speed, 109 u64 intel_ntb3_db_read(struct ntb_dev *ntb); 110 int intel_ntb3_db_clear(struct ntb_dev *ntb, u64 db_bits); 111 int intel_ntb3_peer_db_set(struct ntb_dev *ntb, u64 db_bits); 112 int intel_ntb3_peer_db_addr(struct ntb_dev *ntb, phys_addr_t *db_addr,
|
D | ntb_hw_intel.h | 141 struct ntb_dev ntb; member 192 #define ntb_ndev(__ntb) container_of(__ntb, struct intel_ntb_dev, ntb)
|
/kernel/linux/linux-5.10/drivers/ntb/hw/idt/ |
D | ntb_hw_idt.c | 530 dev_dbg(&ndev->ntb.pdev->dev, "Local port: %hhu, num of peers: %hhu\n", in idt_scan_ports() 535 dev_warn(&ndev->ntb.pdev->dev, "No active peer found\n"); in idt_scan_ports() 548 static int idt_ntb_port_number(struct ntb_dev *ntb) in idt_ntb_port_number() argument 550 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_port_number() 563 static int idt_ntb_peer_port_count(struct ntb_dev *ntb) in idt_ntb_peer_port_count() argument 565 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_count() 577 static int idt_ntb_peer_port_number(struct ntb_dev *ntb, int pidx) in idt_ntb_peer_port_number() argument 579 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_number() 598 static int idt_ntb_peer_port_idx(struct ntb_dev *ntb, int port) in idt_ntb_peer_port_idx() argument 600 struct idt_ntb_dev *ndev = to_ndev_ntb(ntb); in idt_ntb_peer_port_idx() [all …]
|
/kernel/linux/linux-5.10/drivers/ntb/hw/mscc/ |
D | ntb_hw_switchtec.c | 46 struct ntb_dev ntb; member 93 static struct switchtec_ntb *ntb_sndev(struct ntb_dev *ntb) in ntb_sndev() argument 95 return container_of(ntb, struct switchtec_ntb, ntb); in ntb_sndev() 166 static int switchtec_ntb_mw_count(struct ntb_dev *ntb, int pidx) in switchtec_ntb_mw_count() argument 168 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_count() 191 static int switchtec_ntb_mw_get_align(struct ntb_dev *ntb, int pidx, in switchtec_ntb_mw_get_align() argument 196 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_get_align() 270 static int switchtec_ntb_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx, in switchtec_ntb_mw_set_trans() argument 273 struct switchtec_ntb *sndev = ntb_sndev(ntb); in switchtec_ntb_mw_set_trans() 285 if (widx >= switchtec_ntb_mw_count(ntb, pidx)) in switchtec_ntb_mw_set_trans() [all …]
|
/kernel/linux/linux-5.10/drivers/ntb/hw/ |
D | Kconfig | 2 source "drivers/ntb/hw/amd/Kconfig" 3 source "drivers/ntb/hw/idt/Kconfig" 4 source "drivers/ntb/hw/intel/Kconfig" 5 source "drivers/ntb/hw/mscc/Kconfig"
|
/kernel/linux/linux-5.10/Documentation/driver-api/ |
D | ntb.rst | 17 NTB Core Driver (ntb) 31 as ntb hardware, or hardware drivers, are inserted and removed. The 42 inbound translation configured on the local ntb port and outbound translation 43 configured by the peer, on the peer ntb port. The first type is 123 NTB Transport Client (ntb\_transport) and NTB Netdev (ntb\_netdev) 128 across the ntb, to exchange packets of network data. The Transport client 135 NTB Ping Pong Test Client (ntb\_pingpong) 163 NTB Tool Test Client (ntb\_tool) 166 The Tool test client serves for debugging, primarily, ntb hardware and drivers. 174 * *debugfs*/ntb\_tool/*hw*/ [all …]
|
/kernel/linux/linux-5.10/drivers/net/ |
D | ntb_netdev.c | 403 struct ntb_dev *ntb; in ntb_netdev_probe() local 409 ntb = dev_ntb(client_dev->parent); in ntb_netdev_probe() 410 pdev = ntb->pdev; in ntb_netdev_probe()
|
/kernel/linux/linux-5.10/tools/testing/selftests/ntb/ |
D | ntb_test.sh | 608 ls -1 /sys/bus/ntb/devices 613 ssh $REMOTE_HOST ls -1 /sys/bus/ntb/devices
|