ROCK-Kernel-Driver
ROCK-Kernel-Driver copied to clipboard
Fix kcl_kthread.h:24:6: error: redefinition of ‘kthread_use_mm’
Testing on OpenSUSE 15.2 with the 5.3.18-lp152.57-default kernel, the rock-dkms package fails to compile due to:
/var/lib/dkms/amdgpu/4.0-23.el7/build/include/kcl/kcl_kthread.h:24:6: error: redefinition of ‘kthread_use_mm’
void kthread_use_mm(struct mm_struct *mm)
Updates the m4 macro AC_AMDGPU_KTHREAD_USE_MM, to use AC_KERNEL_TRY_COMPILE to try to include the header and call kthread_use_mm and kthread_unuse_mm functions.
It appears the issue with using AC_KERNEL_CHECK_SYMBOL_EXPORT on at least OpenSUSE 15.2, is it doesn't appear this 5.3 kernel exports those functions:
# grep -E 'kthread_use_mm|kthread_unuse_mm' /usr/src/linux-5.3.18-lp152.57-obj/x86_64/default/Module.symvers
#
Signed-off-by: Benjamin S. Allen [email protected]
We've got this fixed in 4.1. Thanks for contributing!