Followup-For: Bug #1121155

I've sent a few fixes for regressions in supporting older kernels
directly to the corresponding upstream bugs.

Two more changes that are maybe not perfectly suited for upstream:

1)
Please add
    BUILD_EXCLUSIVE_KERNEL_MIN="4.18"
to the generated dkms.conf
struct_size() was added by 610b15c50e86eb1e4b77274fabcaea29ac72d6a8 in
v4.18 and is used unconditionally in xrt-xocl-dkms
(That minimum setting is not perfect, since struct_size() was
backported to a few stable kernel branches but for Debian and
derivatives it should be sufficient).

2)
--- a/xrt/XRT/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h
+++ b/xrt/XRT/src/runtime_src/core/pcie/driver/linux/xocl/xocl_drv.h
@@ -44,6 +44,9 @@
 #include <linux/moduleparam.h>
 #include <linux/cdev.h>
 #include <linux/vmalloc.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/sched/signal.h>
+#endif
 
 #include "xocl_types.h"
 #include "xclbin.h"

signal.h is not included transitively by all (old) kernel versions,
e.g. 5.5.0. There is a RHEL specific conditional further down to include
signal.h, I'm not sure how they would interact, maybe the two could be
merged.


Andreas

Reply via email to