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

error: impossible constraint in ‘asm’ asm volatile("rdtscp" : "=a" (low), "=d" (high)) for ARM64 #186

Closed
jumpmanhou opened this issue Dec 22, 2022 · 2 comments

Comments

@jumpmanhou
Copy link

I try to build the QDMA driver for the ARM64 arch, but there is an error, here is the error log:
#######################

Driver

#######################
make -C driver modulesymfile=/home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src/Module.symvers
make[1]: Entering directory '/home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver'
"distro=, dmajor= dminor= "
5.10.134-15852-gf17a528bd1c2-dirty: GIT,,, -DGITSP -DGIT
CROSS_COMPILE_FLAG = .
ARCH = aarch64.
#######################

PF src

#######################
make[2]: Entering directory '/home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src'
srcdir = /home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src.
KSRC = /home/m1_sw/chunpeng/kernel-5.10.
VF = 0.
CROSS_COMPILE_FLAG = .
ARCH = aarch64.
EXTRA_FLAGS = .
ccflags-y = .
make[3]: Entering directory '/home/m1_sw/chunpeng/kernel-5.10'
srcdir = /home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src.
KSRC = /home/m1_sw/chunpeng/kernel-5.10.
VF = 0.
CROSS_COMPILE_FLAG = .
ARCH = arm64.
EXTRA_FLAGS = .
ccflags-y = .
CC [M] /home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src/libqdma/qdma_descq.o
/home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src/libqdma/qdma_descq.c: In function ‘rdtsc_gettime’:
/home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src/libqdma/qdma_descq.c:68:2: error: impossible constraint in ‘asm’
asm volatile("rdtscp" : "=a" (low), "=d" (high));
^~~
make[4]: *** [scripts/Makefile.build:286: /home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src/libqdma/qdma_descq.o] Error 1
make[3]: *** [Makefile:1831: /home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src] Error 2
make[3]: Leaving directory '/home/m1_sw/chunpeng/kernel-5.10'
make[2]: *** [Makefile:135: bin] Error 2
make[2]: Leaving directory '/home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver/src'
make[1]: *** [Makefile:206: mod_pf] Error 2
make[1]: Leaving directory '/home/m1_sw/chunpeng/dma_ip_drivers/QDMA/linux-kernel/driver'
make: *** [Makefile:94: driver] Error 2

Does this driver support on ARM64 platform?

@hmaarrfk
Copy link

No it does not to my knowledge.

Xilinx doesn't like to answer on github. if you want to go through the upgrade collaboratively, I'll help review and move you along when i can:

https://github.com/hmaarrfk/dma_ip_drivers/

@jumpmanhou
Copy link
Author

Thanks, mark. The "rdtscp" is X86 instruction, I modified the function according to this link:https://lore.kernel.org/lkml/20200914115311.2201-3-leo.yan@linaro.org/ and it worked.

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

2 participants