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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

4,665件の閲覧回数
jayakumar2
Contributor V

Hi,

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/checksyscalls.sh
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.

arch/arm/mach-imx/Makefile
...
+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.

Thanks!

Original Attachment has been moved to: compile_works_with_busfreq_only_if_cpufreq.txt.zip

Original Attachment has been moved to: .config_without_cpu_freq.zip

Original Attachment has been moved to: compile_err_with_busfreq_without_cpufreq.txt.zip

ラベル(3)
0 件の賞賛
返信
5 返答(返信)

3,238件の閲覧回数
_angelo_
Contributor III

Sorry, not clear why to have imx busfreq on imx6, imx7 support m,ust be added.

Or, busfreq stuff is not needed on imx6, or, it may be a bug in Kconfigs ?

0 件の賞賛
返信

3,220件の閲覧回数
mikedubya
Contributor I

I'm not sure where the error lies, I just know that I encountered the same kernel compile error as the OP when I tried to build yocto linux 5.4.3 with Bus Frequency Scaling enabled in a build targeted for the LS1021A processor.

I stepped through all of the kernel System Type / Freescale i.MX Family menuconfig options individually and the error only went away when I also enabled the i.MX7 Dual Support System Type.  I posted my workaround in case someone else also hits this error.

 

0 件の賞賛
返信

3,289件の閲覧回数
mikedubya
Contributor I

I also encountered this error when building Linux kernel 5.4.3 with Frequency Scaling enabled.

I was able to resolve it by adding i.MX7 Dual Support to my .config options.

From kernel-source folder:

make menuconfig
select System Type / Freescale i.MX Family / i.MX7 Dual Support

 

0 件の賞賛
返信

3,619件の閲覧回数
adrien_sierra
Contributor II

Hello,

 

I know it's an old thread but I have the same problem. I'm using IMX6Q base SoC (Digi CCIMX6sbc) and I'm trying to compile linux kernel v4.9 with CPU Frequency scaling disabled. I have the same error compilation errors. Did you modify arch/arm/mach-imx/busfreq-imx.c to be able to compile ? Is there a patch or something ?

 

Thank you in advance,

Adrien

0 件の賞賛
返信

3,619件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Jaya

thank for knowledge sharing as it may be useful as

additional memory test option.

Best regards
igor

0 件の賞賛
返信