Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDMA: Kernel module does not compile correctly for Linux Kernel versions >= 5.0 #30

Open
byzantic opened this issue Aug 28, 2019 · 4 comments

Comments

@byzantic
Copy link

When trying to make xdma on a system that has a Kernel version 5.0, the compile fails twice with error messages like:

xdma_drv_linux/xdma/cdev_ctrl.c: In function ‘char_ctrl_ioctl’:
xdma_drv_linux/xdma/cdev_ctrl.c:138:19: error: macro "access_ok" passed 3 arguments, but takes just 2
     _IOC_SIZE(cmd));
                   ^

I think this is because kernel 5.0 and onwards have dropped the first argument in the access_ok macro. So I think lines like:

		result = !access_ok(VERIFY_READ, (void __user *)arg,

should be changed to:

		result = !access_ok((void __user *)arg,

If I change the two offending lines in this way, make succeeds, as does the load_driver.sh script.

@byzantic byzantic changed the title Kernem module does not compile correctly for Linux Kernel versions >= 5.0 Kernel module does not compile correctly for Linux Kernel versions >= 5.0 Aug 28, 2019
@lesjokolat
Copy link

I couldnt get it to work in Ubuntu LTS 18.04.2, i went back to older 65444 drivers and got kernel 5 working.

@X-Ryl669
Copy link

See #44 for a fix

@lesjokolat
Copy link

Byzantic can this be closed now?

@sujathabanoth-xlnx sujathabanoth-xlnx changed the title Kernel module does not compile correctly for Linux Kernel versions >= 5.0 XDMA: Kernel module does not compile correctly for Linux Kernel versions >= 5.0 Jan 29, 2021
@hmaarrfk
Copy link

Hello,

My name is Mark Harfouche. I am not affiliated with Xilinx in any way. Over the
years of using QDMA, I've been wanted better community organization.

I've created a fork of dma_ip_drivers which I intend to maintain and work with the
community at large to improve.

The fork can be found https://github.com/hmaarrfk/dma_ip_drivers

For now, I am stating the main goals of the repository in
hmaarrfk#2

If you are interested in working together, feel free to open an issue or PR to
my fork.

Best,

Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants