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

Compile error xdna driver #339

Open
zamroni111 opened this issue Dec 26, 2024 · 0 comments
Open

Compile error xdna driver #339

zamroni111 opened this issue Dec 26, 2024 · 0 comments
Assignees

Comments

@zamroni111
Copy link

slab.h needs to be included:

`[INFO] Re-Generate BUILD_ROOT_DIR: /var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c: In function ‘mailbox_release_msg’:
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c:279:9: error: implicit declaration of function ‘kfree’; did you mean ‘vfree’? [-Werror=implicit-function-declaration]
279 | kfree(mb_msg);
| ^~~~~
| vfree
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c: In function ‘xdna_mailbox_send_msg’:
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c:652:18: error: implicit declaration of function ‘kzalloc’; did you mean ‘vzalloc’? [-Werror=implicit-function-declaration]
652 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
| ^~~~~~~
| vzalloc
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c:652:16: error: assignment to ‘struct mailbox_msg *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
652 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
| ^
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c: In function ‘xdna_mailbox_create_channel’:
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c:828:18: error: assignment to ‘struct mailbox_channel *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
828 | mb_chann = kzalloc(sizeof(*mb_chann), GFP_KERNEL);
| ^
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c: In function ‘xdna_mailbox_create’:
/var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.c:981:12: error: assignment to ‘struct mailbox *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
981 | mb = kzalloc(sizeof(*mb), GFP_KERNEL);
| ^
cc1: all warnings being treated as errors
make[7]: *** [scripts/Makefile.build:229: /var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna/amdxdna_mailbox.o] Error 1
make[6]: *** [/usr/src/linux-headers-6.12.6a/Makefile:1937: /var/tmp/xdna/xdna-driver/build/Release/src/driver/amdxdna/driver/amdxdna] Error 2
make[5]: *** [Makefile:224: __sub-make] Error 2
make[4]: *** [Makefile:29: modules] Error 2
make[3]: *** [/var/tmp/xdna/xdna-driver/build/Release/src/driver/driver/amdxdna/Makefile:20: all] Error 2
make[2]: *** [src/driver/CMakeFiles/driver.dir/build.make:73: src/driver/amdxdna.ko] Error 2
make[1]: *** [CMakeFiles/Makefile2:2390: src/driver/CMakeFiles/driver.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

`

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