From 4203eaccfa925dd11019163560297a5353b01638 Mon Sep 17 00:00:00 2001 From: Youling Tang Date: Sat, 4 Mar 2023 11:09:10 +0800 Subject: kexec: __NR_kexec_file_load is set to undefined on LoongArch The initial reason is that after the merger of 29fe5067ed07 ("kexec: make -a the default"), kexec cannot be used on LoongArch architectures. We need to add "-c" for normal use. The current kexec_file_load system call is not implemented in architectures such as LoongArch, so it needs to pass kexec_load. So we need to set __NR_kexec_file_load to undefined in unsupported architectures. This will return EFALLBACK via is_kexec_file_load_implemented, and then via kexec_load. Signed-off-by: Youling Tang Signed-off-by: Simon Horman --- kexec/kexec-syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h index be6ccd55..1e2d12f8 100644 --- a/kexec/kexec-syscall.h +++ b/kexec/kexec-syscall.h @@ -59,7 +59,7 @@ #endif #endif /*ifndef __NR_kexec_load*/ -#ifdef __arm__ +#if defined(__arm__) || defined(__loongarch__) #undef __NR_kexec_file_load #endif -- cgit 1.2.3-korg