tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: b3492b88408a530f644afcd9e80b98cbf9883a82 commit: 822da186955cbcd69b4715b8a307053e6c756f30 [29221/30000] x86/ibt,paravirt: Use text_gen_insn() for paravirt_patch() config: x86_64-buildonly-randconfig-005-20240829 (https://download.01.org/0day-ci/archive/20240829/202408290612.YVWkhiUH-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/20240829/202408290612.YVWkhiUH-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/202408290612.YVWkhiUH-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/x86/kernel/paravirt.c: In function 'paravirt_patch_call':
arch/x86/kernel/paravirt.c:65:9: error: implicit declaration of function '__text_gen_insn' [-Werror=implicit-function-declaration]
65 | __text_gen_insn(insn_buff, CALL_INSN_OPCODE, | ^~~~~~~~~~~~~~~
arch/x86/kernel/paravirt.c:65:36: error: 'CALL_INSN_OPCODE' undeclared (first use in this function)
65 | __text_gen_insn(insn_buff, CALL_INSN_OPCODE, | ^~~~~~~~~~~~~~~~ arch/x86/kernel/paravirt.c:65:36: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/kernel/paravirt.c:66:47: error: 'CALL_INSN_SIZE' undeclared (first use in this function)
66 | (void *)addr, target, CALL_INSN_SIZE); | ^~~~~~~~~~~~~~ arch/x86/kernel/paravirt.c: At top level: arch/x86/kernel/paravirt.c:99:13: warning: no previous prototype for 'native_pv_lock_init' [-Wmissing-prototypes] 99 | void __init native_pv_lock_init(void) | ^~~~~~~~~~~~~~~~~~~ arch/x86/kernel/paravirt.c: In function 'paravirt_patch_call': arch/x86/kernel/paravirt.c:68:1: warning: control reaches end of non-void function [-Wreturn-type] 68 | } | ^ cc1: some warnings being treated as errors
vim +/__text_gen_insn +65 arch/x86/kernel/paravirt.c
61 62 static unsigned paravirt_patch_call(void *insn_buff, const void *target, 63 unsigned long addr, unsigned len) 64 {
65 __text_gen_insn(insn_buff, CALL_INSN_OPCODE, 66 (void *)addr, target, CALL_INSN_SIZE);
67 return CALL_INSN_SIZE; 68 } 69