Skip to contentSkip to conversation

PCI/P2PDMA: Add Zhaoxin host bridges to whitelist

PATCH Applied LeoLiu-oc 3 participants 3 messages Sep 1 – Sep 3

Subsystems (2)
lore
Share & tools
lore

LeoLiu-oc

author
#0 lore raw

PATCH 1/1 PCI/P2PDMA: Add Zhaoxin host bridges to whitelist

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.

---
 drivers/pci/p2pdma.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/pci/p2pdma.c +6 -0
index 9334eb314663..9fbbf1692f0e 100644
@@ -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},
 	{}
 };
 
Signature · 1 line
2.43.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 7 lines

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.

Quoted 6 lines

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.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw
In reply to LeoLiu-oc
Quoted 7 lines · 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.

Quoted 6 lines

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.

Applied to pci/p2pdma for v7.4, thank you!

Quoted 25 lines
---
 drivers/pci/p2pdma.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/pci/p2pdma.c +6 -0
index 9334eb314663..9fbbf1692f0e 100644
@@ -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},
 	{}
 };
 
Signature · 1 line
2.43.0