mirror.dongdigua.github.io/org/clear_kernel_compile_fix.org
dongdigua 65b8966dec add 3m@1l and postamble, collection
remenber Every Clojure Talk Ever
2022-11-06 15:41:33 +08:00

1.6 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 like the function on top of it and it is able to compile :)

--- /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;

Notice: I'm ignorant about C programming, so if anything's wrong, please contact me