Skip to content

Commit 7f1e767

Browse files
authored
Release v1.3.8 (aws#408)
* Update xocl_bo.c * Update xocl_drv.c * Update hdk_version.txt * Update RELEASE_NOTES.md * Update ERRATA.md * Update description.json * Update .gitmodules * Remove all drivers before running runtime/driver tests to get into a clean state
1 parent 7dc2bee commit 7f1e767

File tree

12 files changed

+57
-52
lines changed

12 files changed

+57
-52
lines changed

.gitmodules

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
[submodule "SDAccel/examples/xilinx_2017.4"]
66
path = SDAccel/examples/xilinx_2017.4
77
url = https://github.com/Xilinx/SDAccel_Examples.git
8+
branch = aws_2017.4

ERRATA.md

-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,4 @@
2828
## Known Bugs/Issues
2929

3030
* AXI-L Interface ordering - The v071417d3 shell has an issues that impacts transaction ordering on the AXI-L interfaces (BAR1, OCL, SDA) only. The Shell should preserve PCIe ordering rules on these interfaces, but there is an issue where a read request may pass a previous write request. The shell terminates a write when the data is transferred on the W channel (WVALID/WREADY) rather than wait for the response on the B channel. A CL workaround for this issue is to backpressure reads (deassert ARREADY) when there are any writes pending.
31-
* Linux kernel 3.10.0-862.2.3.el7.x86_64. By default, the AWS Developer AMI GUI setup script updates the kernel version. We have provided a patch to prevent kernel updates during GUI setup. Instead of running the setup_gui.sh as documented/included within the developer AMI, please use the patched script as shown below:
32-
$curl https://s3.amazonaws.com/aws-fpga-developer-ami/1.4.0/Scripts/setup_gui.sh -o /home/centos/src/scripts/setup_gui.sh
33-
$/home/centos/src/scripts/setup_gui.sh
3431

RELEASE_NOTES.md

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
* 1 DDR controller implemented in the SH (always available)
2727
* 3 DDR controllers implemented in the CL (configurable number of implemented controllers allowed)
2828

29+
## Release 1.3.8 (See [ERRATA](./ERRATA.md) for unsupported features)
30+
* Fixed SDAccel XOCL driver compile fails that occur on linux kernels greater than 3.10.0-693.21.1.el7.x86_64
31+
2932
## Release 1.3.7 (See [ERRATA](./ERRATA.md) for unsupported features)
3033
* Support for Xilinx SDx/Vivado 2017.1 and Xilinx [SDx](https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_4/ug1238-sdx-rnil.pdf)/[Vivado](https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_4/ug973-vivado-release-notes-install-license.pdf) 2017.4 . * This release supports Xilinx SDx 2017.4 and 2017.1. The HDK and SDAccel setup scripts configure the development environment based on the tool version found in the PATH environment variable.
3134
* FPGA developer kit version is listed in [hdk_version.txt](./hdk/hdk_version.txt)

SDAccel/examples/aws/kernel_3ddr_bandwidth/description.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
"date" : "MAY2018",
3737
"version": "0.9",
3838
"description": "Test Example"
39-
},
39+
}
4040
]
4141
}

SDAccel/tests/test_run_sdaccel_example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def setup_class(cls):
6969
return
7070

7171
def teardown_method(self, test_method):
72-
aws_fpga_test_utils.remove_xdma_driver()
72+
aws_fpga_test_utils.remove_all_drivers()
7373

7474
def test_run_sdaccel_example(self, examplePath, rteName, xilinxVersion):
7575

hdk/hdk_version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
HDK_VERSION=1.3.7
1+
HDK_VERSION=1.3.8

hdk/tests/test_load_afi.py

+13-29
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ def setup_class(cls):
6666
assert AwsFpgaTestBase.running_on_f1_instance(), 'This test must be run on an F1 instance. Instance type={}'.format(aws_fpga_test_utils.get_instance_type())
6767
return
6868

69+
def setup_method(self, test_method):
70+
aws_fpga_test_utils.remove_all_drivers()
71+
6972
def teardown_method(self, test_method):
70-
aws_fpga_test_utils.remove_edma_driver()
73+
aws_fpga_test_utils.remove_all_drivers()
7174

7275
def get_agfi(self, cl, xilinxVersion, option_tag):
7376
'''
@@ -264,41 +267,22 @@ def base_test(self, cl, agfi, afi, install_edma_driver, slots_to_test, option_ta
264267
(rc, stdout_lines, stderr_lines) = self.run_cmd("cd {}/hdk/cl/examples/{}/software/runtime && make -f Makefile SDK_DIR={}/sdk".format(self.WORKSPACE, cl, self.WORKSPACE))
265268
assert rc == 0, "Runtime software build failed."
266269

267-
if install_edma_driver:
268-
# Uninstall drivers just in case a previous test left them installed
269-
aws_fpga_test_utils.remove_edma_driver()
270-
aws_fpga_test_utils.remove_xdma_driver()
271-
272-
# Load the AFI onto all available FPGAs
273-
# This is required for the EDMA driver to correctly installfor all slots
274-
# We do this because otherwise installation on slots 1-7 doesn't seem to work.
275-
logger.info("Loading the AFI into all slots before installing EDMA driver")
276-
for slot in range(self.num_slots):
277-
self.load_agfi(cl, agfi, afi, slot)
270+
# Load the AFI onto all available FPGAs
271+
# This is required for the EDMA driver to correctly install for all slots
272+
# We do this because otherwise installation on slots 1-7 doesn't seem to work.
273+
logger.info("Loading the AFI into all slots")
274+
for slot in slots_to_test:
275+
self.load_agfi(cl, agfi, afi, slot)
278276

277+
if install_edma_driver:
279278
aws_fpga_test_utils.install_edma_driver()
280-
# Make sure that driver was installed on all slots
281-
for slot in range(self.num_slots):
282-
device_name = "/dev/edma{}_queue_0".format(slot)
283-
assert os.path.exists(device_name), "EDMA driver not installed on slot {}".format(slot)
284-
else:
285-
# Load the AFI onto all the slots to be tested
286-
for slot in slots_to_test:
287-
self.load_agfi(cl, agfi, afi, slot)
288279

289280
for slot in slots_to_test:
290281
logger.info("Running runtime software on slot {}".format(slot))
291282
self.check_runtime_software(cl, slot)
292283

293-
if install_edma_driver:
294-
logger.info("Removing EDMA driver")
295-
aws_fpga_test_utils.remove_edma_driver()
296-
297-
for slot in range(self.num_slots):
298-
self.fpga_clear_local_image(slot)
299-
else:
300-
for slot in slots_to_test:
301-
self.fpga_clear_local_image(slot)
284+
for slot in slots_to_test:
285+
self.fpga_clear_local_image(slot)
302286

303287
def test_precompiled_cl_dram_dma(self, xilinxVersion):
304288
cl = 'cl_dram_dma'

sdk/linux_kernel_drivers/xocl/xocl_bo.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@
3333
#include "xocl_ioctl.h"
3434
#include "xocl_xdma.h"
3535

36-
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
36+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
37+
(defined(RHEL_RELEASE_CODE) && \
38+
RHEL_RELEASE_CODE >=RHEL_RELEASE_VERSION(7,5)))
3739
static inline void drm_free_large(void *ptr)
3840
{
3941
kvfree(ptr);
@@ -49,7 +51,9 @@ static inline int xocl_drm_mm_insert_node(struct drm_mm *mm,
4951
struct drm_mm_node *node,
5052
u64 size)
5153
{
52-
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
54+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
55+
(defined(RHEL_RELEASE_CODE) && \
56+
RHEL_RELEASE_CODE >=RHEL_RELEASE_VERSION(7,5)))
5357
return drm_mm_insert_node_generic(mm, node, size, PAGE_SIZE, 0, 0);
5458
#else
5559
return drm_mm_insert_node_generic(mm, node, size, PAGE_SIZE, 0, 0, 0);

sdk/linux_kernel_drivers/xocl/xocl_drv.c

+10-6
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ static int xocl_drm_unload(struct drm_device *drm)
312312
return 0;
313313
}
314314

315-
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
315+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
316+
(defined(RHEL_RELEASE_CODE) && \
317+
RHEL_RELEASE_CODE >=RHEL_RELEASE_VERSION(7,5)))
316318
static void xocl_drm_unload2(struct drm_device *drm)
317319
{
318320
xocl_drm_unload(drm);
@@ -420,7 +422,7 @@ int xocl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
420422
}
421423
}
422424

423-
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
425+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
424426
int xocl_gem_fault2(struct vm_fault *vmf)
425427
{
426428
return xocl_gem_fault(vmf->vma, vmf);
@@ -567,7 +569,7 @@ static const struct file_operations xocl_driver_fops = {
567569
};
568570

569571
static const struct vm_operations_struct xocl_vm_ops = {
570-
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
572+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
571573
.fault = xocl_gem_fault2,
572574
#else
573575
.fault = xocl_gem_fault,
@@ -582,7 +584,9 @@ static struct drm_driver xocl_drm_driver = {
582584
.postclose = xocl_client_release,
583585
.open = xocl_client_open,
584586
.load = xocl_drm_load,
585-
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
587+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
588+
(defined(RHEL_RELEASE_CODE) && \
589+
RHEL_RELEASE_CODE >=RHEL_RELEASE_VERSION(7,5)))
586590
.unload = xocl_drm_unload2,
587591
#else
588592
.unload = xocl_drm_unload,
@@ -740,7 +744,7 @@ void xocl_reset_notify(struct pci_dev *pdev, bool prepare)
740744
}
741745
EXPORT_SYMBOL_GPL(xocl_reset_notify);
742746

743-
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
747+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
744748
static void xocl_reset_prepare(struct pci_dev *pdev)
745749
{
746750
xocl_reset_notify(pdev, true);
@@ -756,7 +760,7 @@ static const struct pci_error_handlers xocl_err_handler = {
756760
.error_detected = xocl_error_detected,
757761
.slot_reset = xocl_slot_reset,
758762
.resume = xocl_error_resume,
759-
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
763+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
760764
.reset_prepare = xocl_reset_prepare,
761765
.reset_done = xocl_reset_done,
762766
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)

sdk/tests/test_edma.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,10 @@ def setup_class(cls):
5858
return
5959

6060
def setup_method(self, test_method):
61-
aws_fpga_test_utils.remove_edma_driver()
62-
aws_fpga_test_utils.remove_xdma_driver()
61+
aws_fpga_test_utils.remove_all_drivers()
6362

6463
def teardown_method(self, test_method):
65-
aws_fpga_test_utils.remove_edma_driver()
66-
aws_fpga_test_utils.remove_xdma_driver()
67-
64+
aws_fpga_test_utils.remove_all_drivers()
6865

6966
def test_unittest(self):
7067
self.load_msix_workaround(slot=0)

sdk/tests/test_xdma.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ def setup_class(cls):
6868
return
6969

7070
def setup_method(self, test_method):
71-
aws_fpga_test_utils.remove_edma_driver()
72-
aws_fpga_test_utils.remove_xdma_driver()
71+
aws_fpga_test_utils.remove_all_drivers()
7372

7473
def teardown_method(self, test_method):
75-
aws_fpga_test_utils.remove_edma_driver()
76-
aws_fpga_test_utils.remove_xdma_driver()
74+
aws_fpga_test_utils.remove_all_drivers()
7775

7876
def test_install(self):
7977
aws_fpga_test_utils.install_xdma_driver()

shared/lib/aws_fpga_test_utils/__init__.py

+17
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,23 @@ def install_xdma_driver():
126126
make && \
127127
sudo insmod xdma.ko poll_mode=1') == 0
128128

129+
def remove_xocl_driver():
130+
logger.info("Removing the xocl driver.")
131+
# This fails if the driver isn't installed
132+
os.system('sudo rmmod xocl')
133+
134+
xocl_driver_ko_list = find_files_in_path('/lib/modules', 'xocl.ko')
135+
for xocl_ko in xocl_driver_ko_list:
136+
logger.info("Removing {}".format(xocl_ko))
137+
assert os.system("sudo rm -f {}".format(xocl_ko)) == 0
138+
139+
assert os.system('sudo rm -f /etc/udev/rules.d/10-xocl.rules') == 0
140+
141+
def remove_all_drivers():
142+
remove_xdma_driver()
143+
remove_edma_driver()
144+
remove_xocl_driver()
145+
129146
class FpgaLocalImage:
130147
def __init__(self):
131148
self.type = None

0 commit comments

Comments
 (0)