#+TITLE: Clear Kernel Build Error? Fix It #+DATE: <2022-11-04 δΊ”> #+DESCRIPTION: arch/x86/kernel/cpu/intel_epb.c:171:2: error: call to undeclared function 'sched _set_itmt_power_ratio' when I compile [[https://github.com/clearlinux-pkgs/linux][clear]] kernel with LLVM enabled, I got this error: #+BEGIN_SRC text arch/x86/kernel/cpu/intel_epb.c:172:2: error: call to undeclared function 'sched_set_itmt_power_ratio'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] sched_set_itmt_power_ratio(256 - val * 2, cpu); ^ arch/x86/kernel/cpu/intel_epb.c:172:2: note: did you mean 'sched_set_itmt_core_prio'? ./arch/x86/include/asm/topology.h:189:20: note: 'sched_set_itmt_core_prio' declared here static inline void sched_set_itmt_core_prio(int prio, int core_cpu) ^ 1 error generated. #+END_SRC it's obvious that the [[https://github.com/clearlinux-pkgs/linux/blob/main/0128-itmt_epb-use-epb-to-scale-itmt.patch][sched_set_itmt_power_ratio]] function is undeclared so I added the following like the function on top of it and it is able to compile :) #+BEGIN_SRC diff --- /home/gentoo/linux/topology.h +++ arch/x86/include/asm/topology.h @@ -189,6 +189,9 @@ static inline void sched_set_itmt_core_prio(int prio, int core_cpu) { } +static inline void sched_set_itmt_power_ratio(int prio, int core_cpu) +{ +} static inline int sched_set_itmt_support(void) { return 0; #+END_SRC Notice: I'm ignorant about C programming, so if anything's wrong, please contact me