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

lowlatency kernel cannot use XDMA driver properly #41

Open
SYJ7895 opened this issue Dec 30, 2019 · 12 comments
Open

lowlatency kernel cannot use XDMA driver properly #41

SYJ7895 opened this issue Dec 30, 2019 · 12 comments

Comments

@SYJ7895
Copy link

SYJ7895 commented Dec 30, 2019

When I load the XDMA driver with a low-latency kernel on Ubuntu1604, a segmentation fault occurs when running run_test.sh. At this time, I can see the following information through dmesg:
BUG: scheduling while atomic: dma_from_device / 3266 / 0x00000000

@X-Ryl669
Copy link

This is likely an issue with the use of simple wait queues. Please try to use later kernel (at least 4.18 or better 5.0+) and report if it does not work.

@SYJ7895
Copy link
Author

SYJ7895 commented Feb 20, 2020

This is likely an issue with the use of simple wait queues. Please try to use later kernel (at least 4.18 or better 5.0+) and report if it does not work.

The "xdma_xfer_submit" function in libxdma.c calls "spin_lock (& engine-> desc_lock)" and then calls the "wait_event_interruptible_timeout" function with sleep nature. This caused the problem of "BUG: scheduling while atomic: dma_from_device / 3266 / 0x00000000" in the low-latency kernel, but there was no problem in the general kernel.

@hmaarrfk
Copy link

ive seen this in QDMA as well.

@chengts95
Copy link

Any suggestion to fix that?

@hmaarrfk
Copy link

Honestly, it could be related to: #49

I used aligned memory, and the problems lesssned (i think)

@chengts95
Copy link

On 5.3.15 x86_generic it will not cause this problem. It happens on my AARCH64 (kernel 4.9.140) board with RT patch. However, even on x86_generic the run_test.sh cannot work properly after I merged the 2 PRs.

@hmaarrfk
Copy link

I'm not sure. You should ping xilixn on their forums.

There was a XDMA driver written by others that fixed many aarch64 issues. It may fix yours.

It was on gitlab if I remember

@chengts95
Copy link

I suspect the usage of "swait.h" in this driver causes a lot of problems since the simple wait queue is "BROKEN wait queue" in the kernel now.

@bhathaway
Copy link
Contributor

I have personally tested the fix on AARCH64. I would appreciate feedback on the following pull request, which I believe fixes this issue:

#50

@SYJ7895 SYJ7895 closed this as completed Feb 26, 2020
@hmaarrfk
Copy link

Maybe keep this open until xilinx acknowledge s this?

@SYJ7895 SYJ7895 reopened this Feb 26, 2020
@chengts95
Copy link

Still very buggy on my device, I think it is related to kernel version.

@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

5 participants