Knowledge Base Article

Why does the R-Tile Avalon® Streaming FPGA IP for PCI Express* example driver fail to install correctly? It can't be installed in CentOS* 8?

Description

When trying to install the example driver generated by the R-Tile Avalon® Streaming FPGA IP for PCI Express* Design Example in CentOS* 8, error messages like those shown below will be seen:

 

error: macro "access_ok" passed 3 arguments, but takes just 2

     if(! access_ok(VERIFY_WRITE, buf, sizeof(buf))) {

error: ‘access_ok’ undeclared (first use in this function)

     if(! access_ok(VERIFY_WRITE, buf, sizeof(buf))) {

 

 

Resolution

A Linux* kernel mismatch causes these errors. The following steps can help to resolve this issue:

  • In intel_fpga_pcie_chr.c, delete the first argument (VERIFY_WRITE/VERIFY_READ) of function "access_ok"
  • In intel_fpga_pcie_ioctl.c, replace the name of function "dma_zalloc_coherent" with "dma_alloc_coherent"
  • In intel_fpga_pcie_ioctl.c, in "access_ok(uarg, sizeof(uarg))", change the argument uarg to (void__user *)uarg
  • In intel_fpga_pcie_setup.c, replace the name of function "ioremap_nocache" with "ioremap_cache"
  • In intel_fpga_pcie_setup.c, comment the line of codes "MODULE_SUPPORTED_DEVICE("Intel(R) Stratix 10 FPGA")"

The driver can be installed successfully and works correctly after these modifications.

This problem isn't currently scheduled to be fixed.

Updated 2 months ago
Version 2.0
No CommentsBe the first to comment