mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCI/P2PDMA: Add Zhaoxin host bridges to whitelist
@ 2026-09-01  8:36 LeoLiu-oc
  2026-09-03 22:17 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: LeoLiu-oc @ 2026-09-01  8:36 UTC (permalink / raw)
  To: Bjorn Helgaas, Logan Gunthorpe
  Cc: linux-pci, linux-kernel, Eros Zhang, Cobe Chen, Tony W . Wang, LeoLiu-oc

Zhaoxin host bridges support peer-to-peer DMA. Add their device IDs
(0x1003, 0x1005-0x1008) to the whitelist so that p2pdma works on these
platforms.

The entries cover the KX-6000, KH-40000, KX-6000G, KX-7000 and KH-50000
families.

The KX-6000/KH-40000/KX-6000G/KX-7000 entries are marked
REQ_SAME_HOST_BRIDGE because P2P requests crossing different host bridges
are not supported on these parts. The KH-50000 entry is whitelisted
without this restriction.

Signed-off-by: LeoLiu-oc <leoliu-oc@zhaoxin.com>
---
 drivers/pci/p2pdma.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index 9334eb314663..9fbbf1692f0e 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -569,6 +569,12 @@ static const struct pci_p2pdma_whitelist_entry {
 	{PCI_VENDOR_ID_NVIDIA, 0x2f96, 0},
 	{PCI_VENDOR_ID_NVIDIA, 0x2f97, 0},
 	{PCI_VENDOR_ID_NVIDIA, 0x2f98, 0},
+	/* Zhaoxin KX-6000/KH-40000/KX-6000G/KX-7000/KH-50000 */
+	{PCI_VENDOR_ID_ZHAOXIN, 0x1003, REQ_SAME_HOST_BRIDGE},
+	{PCI_VENDOR_ID_ZHAOXIN, 0x1005, REQ_SAME_HOST_BRIDGE},
+	{PCI_VENDOR_ID_ZHAOXIN, 0x1006, REQ_SAME_HOST_BRIDGE},
+	{PCI_VENDOR_ID_ZHAOXIN, 0x1007, REQ_SAME_HOST_BRIDGE},
+	{PCI_VENDOR_ID_ZHAOXIN, 0x1008, 0},
 	{}
 };
 
-- 
2.43.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-03 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-01  8:36 [PATCH] PCI/P2PDMA: Add Zhaoxin host bridges to whitelist LeoLiu-oc
2026-09-03 22:17 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®