0

I'm compiling kernel of Centos 7.6.1810 for Arm. The kernel version is 4.14.0-115.el7a.0.1.aarch64. I download the source file kernel-alt-4.14.0-115.el7a.0.1.src.rpm.

I wanna to compile a new kernel with different configuration from that of original kernel, and keep the version the same. So I change the value of EXTRAVERSION in Makefile to '-115.el7a.0.1.aarch64'. During installing the new kernel, I found there are warnings depmod: WARNING: /lib/modules/4.14.0-115.el7a.0.1.aarch64/extra/iBMA_driver/host_kbox_drv.ko needs unknown symbol queued_spin_lock_slowpath.

When I install some drivers there are also warnings like this.

In compiling directory there is Module.symvers and I did not find symbol queued_spin_lock_slowpath in it.

But in the file /boot/symvers-4.14.0-115.el7a.0.1.aarch64.gz, there is queued_spin_lock_slowpath.

Why there is not symbol queued_spin_lock_slowpath in the kernel I compiled and it's in the original kernel of the same version?

How can I fix it?

oleotiger
  • 105
  • 2
  • 11
  • Do you use DKMS to update the third party (out-of-tree) modules? Perhaps they never got rebuilt automatically because the kernel version has not changed. – Ian Abbott Aug 11 '21 at 10:27
  • I think it is better to use a custom EXTRAVERSION if you are building your own kernel to avoid conflicts with the distro's kernel binary packages. – Ian Abbott Aug 11 '21 at 10:31
  • Does your rebuilt kernel have `CONFIG_ARCH_USE_QUEUED_SPINLOCKS` and `CONFIG_QUEUED_SPINLOCKS` configured to `y`? I guess queued spin-lock support for aarch64 is something that RedHat have added to their 4.14 kernel because the upstream "stable" 4.14 kernel does not have them for aarch64 (only mips, sparc and x86 have them). – Ian Abbott Aug 11 '21 at 11:03
  • The driver is distributed by ventors so I didn't have the source code. Is there a way to update third party modules without source code? – oleotiger Aug 12 '21 at 01:00
  • The way I update my kernel is `make -j && make modules_install && make install` or `make rpm-pkg -j` and install the kernel/kernel-devel/kernel-headers rpm packages. – oleotiger Aug 12 '21 at 01:04
  • I tried set CONFIG_ARCH_USE_QUEUED_SPINLOCKS and CONFIG_QUEUED_SPINLOCKS to y in .config file. But it seems not work. In `make menuconfig`, these two config can not be modified. I can only see that they are defined in Kconfig.lock and `CONFIG_QUEUED_SPINLOCKS[=n]`. – oleotiger Aug 12 '21 at 02:04
  • I google ARCH_USE_QUEUED_SPINLOCKS and found that currently only X86 arch supports MCS spinlock and ARCH_USE_QUEUED_SPINLOCKS and CONFIG_QUEUED_SPINLOCKS are enabled default on X86(2019.5). Is it still true now? Is it the reason that arm disable MCS spin lock? – oleotiger Aug 12 '21 at 02:25
  • If yes, why is there queued_spin_lock_slowpath symbol in the default kernel? – oleotiger Aug 12 '21 at 02:28
  • The upstream 4.19 kernel has ARCH_USE_QUEUED_SPINLOCKS for arm64 (aarch64). RedHat often backport features from later kernels to their enterprise kernels. The source code for the kernel should be available under the terms of the GNU Public License (GPL). – Ian Abbott Aug 12 '21 at 08:43
  • Installing the "dkms" package (from the EPEL repository) should install enough dependencies for building third-party kernel modules without the full kernel sources. – Ian Abbott Aug 12 '21 at 08:46

0 Answers0