
Fix following '__NR_syscalls' undeclared error by add asm/unistd.h header file. arch/arm64/include/asm/xcall.h:13:31: error: '__NR_syscalls' undeclared here (not in a function); did you mean 'rseq_syscall'? DECLARE_BITMAP(xcall_enable, __NR_syscalls); ^ include/uapi/linux/const.h:34:40: note: in definition of macro '__KERNEL_DIV_ROUND_UP' #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ include/linux/types.h:11:21: note: in expansion of macro 'BITS_TO_LONGS' unsigned long name[BITS_TO_LONGS(bits)] ^~~~~~~~~~~~~ arch/arm64/include/asm/xcall.h:13:2: note: in expansion of macro 'DECLARE_BITMAP' DECLARE_BITMAP(xcall_enable, __NR_syscalls); Fixes: b5fb30ccdb3d ("arm64: Reserve a kabi in task_struct exclusively for xcall") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202508031142.M80c8vhN-lkp@intel.com/ Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> --- arch/arm64/include/asm/xcall.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/xcall.h b/arch/arm64/include/asm/xcall.h index 5765a96eed53..83dcda82f3e3 100644 --- a/arch/arm64/include/asm/xcall.h +++ b/arch/arm64/include/asm/xcall.h @@ -10,6 +10,7 @@ #include <asm/actlr.h> #include <asm/cpufeature.h> +#include <asm/unistd.h> DECLARE_STATIC_KEY_FALSE(xcall_enable); -- 2.34.1