AnsweredAssumed Answered

busfreq imx compile failure when CPU_FREQ is disabled in linux 4.1/yocto 2.1

Question asked by jayakumar2 on Nov 5, 2016
Latest reply on Nov 16, 2016 by igorpadykov


While debugging a memory instability problem with a 6sl board running 4.1 (Debugging memory instability with 4.1/yocto 2.1 jethro on 6sl ), I found that the root cause had to do with CONFIG_CPU_FREQ. When it is enabled, then I observe varying levels of instability ranging from memory corruption up to failure to boot or hang during bootup. When it is disabled, the system is stable.

I wanted to note that with the 4.1 kernel, there are problems when one tries to disable CONFIG_CPU_FREQ. You'll get the following compile errors:

test@test-VirtualBox:~/kernelwork/linux-4.1-1.0$ make
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/
CHK include/generated/compile.h
CC arch/arm/mach-imx/busfreq-imx.o
arch/arm/mach-imx/busfreq-imx.c:147:5: error: redefinition of 'register_busfreq_notifier'
int register_busfreq_notifier(struct notifier_block *nb)
In file included from arch/arm/mach-imx/busfreq-imx.c:21:0:
include/linux/busfreq-imx.h:57:19: note: previous definition of 'register_busfreq_notifier' was here
static inline int register_busfreq_notifier(struct notifier_block *nb)
<full log attached below>


One has to disable the busfreq inclusion line to get the compile to work.

+obj-y += busfreq_lpddr2.o busfreq-imx.o busfreq_ddr3.o


That seems like a bad problem as it should be reasonable to disable CPU_FREQ and still have a working kernel build. I hope it can be fixed. I have attached the .config and kernel compile logs showing the behavior with and without cpufreq.


Original Attachment has been moved to:

Original Attachment has been moved to:

Original Attachment has been moved to: