Skip to content

kbuild: Fix building in external dir due to missing asm/qspinlock.h

JIRA: https://issues.redhat.com/browse/RHEL-33669

Attempting to build the kernel for aarch64 (automotive) as of kernel-5.14.0-441.el9 fails:

arch/arm64/include/asm/spinlock.h:8:10: fatal error: asm/qspinlock.h: No such file or directory
    8 | #include <asm/qspinlock.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

asm/qspinlock.h is a generated header, and it's not generated because arch/arm64/include/asm/Kbuild fails to be included. This seems to be related to the recent removal of the --include-dir flag from the top Makefile in RHEL-25415.

Backport patches from upstream that fix the make search/include path when the kernel is built in an external directory.

Signed-off-by: Radu Rendec rrendec@redhat.com

Merge request reports