[openeuler:OLK-6.6 2007/2007] kernel/kexec_core.c:1066: undefined reference to `machine_crash_shutdown'

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 944ce05f6b83ba40c4382c6b90b7b94f529118d3 commit: 47ff774cbb440dfc3cf5d5bc7cf82b41d4d99966 [2007/2007] x86, crash: wrap crash dumping code into crash related ifdefs config: x86_64-randconfig-r121-20250309 (https://download.01.org/0day-ci/archive/20250309/202503091909.W4esTcVo-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250309/202503091909.W4esTcVo-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202503091909.W4esTcVo-lkp@intel.com/ All errors (new ones prefixed by >>): ld: kernel/kexec_core.o: in function `__crash_kexec':
kernel/kexec_core.c:1066: undefined reference to `machine_crash_shutdown' ld: kernel/kexec.o: in function `do_kexec_load': kernel/kexec.c:105: undefined reference to `arch_kexec_unprotect_crashkres' ld: kernel/kexec.c:166: undefined reference to `arch_kexec_protect_crashkres' ld: kernel/kexec_file.o: in function `__do_sys_kexec_file_load': kernel/kexec_file.c:350: undefined reference to `arch_kexec_unprotect_crashkres' ld: kernel/kexec_file.c:415: undefined reference to `arch_kexec_protect_crashkres'
vim +1066 kernel/kexec_core.c 7e99f8b69c11c1 Ricardo Ribalda 2023-01-04 1044 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 1045 /* 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 1046 * No panic_cpu check version of crash_kexec(). This function is called 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 1047 * only when panic_cpu holds the current CPU number; this is the only CPU 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 1048 * which processes crash_kexec routines. 7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 1049 */ c207aee48037ab Josh Poimboeuf 2017-06-28 1050 void __noclone __crash_kexec(struct pt_regs *regs) 2965faa5e03d1e Dave Young 2015-09-09 1051 { 05c6257433b721 Valentin Schneider 2022-06-30 1052 /* Take the kexec_lock here to prevent sys_kexec_load 2965faa5e03d1e Dave Young 2015-09-09 1053 * running on one cpu from replacing the crash kernel 2965faa5e03d1e Dave Young 2015-09-09 1054 * we are using after a panic on a different cpu. 2965faa5e03d1e Dave Young 2015-09-09 1055 * 2965faa5e03d1e Dave Young 2015-09-09 1056 * If the crash kernel was not located in a fixed area 2965faa5e03d1e Dave Young 2015-09-09 1057 * of memory the xchg(&kexec_crash_image) would be 2965faa5e03d1e Dave Young 2015-09-09 1058 * sufficient. But since I reuse the memory... 2965faa5e03d1e Dave Young 2015-09-09 1059 */ 05c6257433b721 Valentin Schneider 2022-06-30 1060 if (kexec_trylock()) { 2965faa5e03d1e Dave Young 2015-09-09 1061 if (kexec_crash_image) { 2965faa5e03d1e Dave Young 2015-09-09 1062 struct pt_regs fixed_regs; 2965faa5e03d1e Dave Young 2015-09-09 1063 2965faa5e03d1e Dave Young 2015-09-09 1064 crash_setup_regs(&fixed_regs, regs); 2965faa5e03d1e Dave Young 2015-09-09 1065 crash_save_vmcoreinfo(); 2965faa5e03d1e Dave Young 2015-09-09 @1066 machine_crash_shutdown(&fixed_regs); 2965faa5e03d1e Dave Young 2015-09-09 1067 machine_kexec(kexec_crash_image); 2965faa5e03d1e Dave Young 2015-09-09 1068 } 05c6257433b721 Valentin Schneider 2022-06-30 1069 kexec_unlock(); 2965faa5e03d1e Dave Young 2015-09-09 1070 } 2965faa5e03d1e Dave Young 2015-09-09 1071 } c207aee48037ab Josh Poimboeuf 2017-06-28 1072 STACK_FRAME_NON_STANDARD(__crash_kexec); 2965faa5e03d1e Dave Young 2015-09-09 1073 :::::: The code at line 1066 was first introduced by commit :::::: 2965faa5e03d1e71e9ff9aa143fff39e0a77543a kexec: split kexec_load syscall from kexec core code :::::: TO: Dave Young <dyoung@redhat.com> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot