1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Description: Compatibility with newer kernels
Author: Mario Limonciello <superm1@gmail.com>
Origin: other
Forwarded: https://github.com/Xilinx/XRT/pull/9411
Last-Update: 2025-11-18
From 516ce3da0423c52205cd5c827619eca05e3d9af4 Mon Sep 17 00:00:00 2001
From: "Mario Limonciello (AMD)" <superm1@kernel.org>
Date: Thu, 6 Nov 2025 10:56:14 -0600
Subject: [PATCH 1/9] Fix p2p.c compilation on newer kernels
Link: https://git.kernel.org/torvalds/c/6632863226d88
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
src/runtime_src/core/pcie/driver/linux/xocl/subdev/p2p.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xrt/XRT/src/runtime_src/core/pcie/driver/linux/xocl/subdev/p2p.c b/src/runtime_src/core/pcie/driver/linux/xocl/subdev/p2p.c
index 040002241..eb96a9366 100644
--- a/xrt/XRT/src/runtime_src/core/pcie/driver/linux/xocl/subdev/p2p.c
+++ b/xrt/XRT/src/runtime_src/core/pcie/driver/linux/xocl/subdev/p2p.c
@@ -513,7 +513,11 @@ static void p2p_read_addr_mgmtpf(struct p2p *p2p)
mb_req->req = XCL_MAILBOX_REQ_READ_P2P_BAR_ADDR;
mb_p2p = (struct xcl_mailbox_p2p_bar_addr *)mb_req->data;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
if (!iommu_present(&pci_bus_type)){
+#else
+ if (!device_iommu_mapped(&pcidev->dev)) {
+#endif
mb_p2p->p2p_bar_len = pci_resource_len(pcidev, p2p->p2p_bar_idx);
mb_p2p->p2p_bar_addr = pci_resource_start(pcidev,
p2p->p2p_bar_idx);
--
2.43.0
|