mirror.dongdigua.github.io/org/clear_kernel_compile_fix.org

1.4 KiB

Clear Kernel Build Error? Fix It

when I compile clear kernel with LLVM enabled, I got this error:

  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.

it's obvious that the sched_set_itmt_power_ratio function is undeclared so I added the following and it is able to compile :)

--- /home/gentoo/linux/topology.h       2022-11-04 16:40:18.500113117 +0800
+++ arch/x86/include/asm/topology.h     2022-11-04 16:41:03.676782505 +0800
@@ -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.