Hello NXP Team,
I am working on a custom board based on i.MX6ULL processor. We have a yocto image working fine with Linux 4.9.88 for this processor and now, we are working on updating the kernel to 6.1.22.
With the new kernel version, I am facing an issue where the kernel hangs just sometime after the login prompt comes up. Following is the cpu0 device used in my custom dts file.
&cpu0 {
operating-points = <
/* kHz uV */
528000 1175000
396000 1175000
198000 1175000
>;
fsl,soc-operating-points = <
/* KHz uV */
528000 1175000
396000 1175000
198000 1175000
>;
fsl,arm-soc-shared = <1>;
};
With some trial and error on the values of operating-points for cpu0 I found that when I configure the value to only 528000kHZ, it works fine and does not hang during boot up. But with any other frequency,(single value or multiple values) the kernel hangs.
I am using the same dts file entry for Linux 4.9.88 where everything works fine. I don't understand why the same entry does not work for the newer kernel. Is there any difference related to CPU config and/or characteristics in these kernel versions?
Awaiting your response
Thanks & Regards
Meetali Patel
Hi Jimmy,
I enabled some debug prints in kernel and I found some new prints here.
[13036.803816] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13036.824055] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13037.363855] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13037.384036] cpu cpu0: 198 MHz, 1175 mV --> 528 MHz, 1175 mV
[13037.403941] cpu cpu0: 528 MHz, 1175 mV --> 396 MHz, 1175 mV
[13037.873851] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13037.894052] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13038.323965] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13038.344050] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13038.893840] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13038.914050] cpu cpu0: 198 MHz, 1175 mV --> 528 MHz, 1175 mV
[13038.933943] cpu cpu0: 528 MHz, 1175 mV --> 396 MHz, 1175 mV
[13039.403858] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13039.424056] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13039.913858] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13039.934041] cpu cpu0: 198 MHz, 1175 mV --> 528 MHz, 1175 mV
[13039.953939] cpu cpu0: 528 MHz, 1175 mV --> 396 MHz, 1175 mV
[13040.403938] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13040.424083] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13040.933841] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13040.954035] cpu cpu0: 198 MHz, 1175 mV --> 528 MHz, 1175 mV
[13040.973949] cpu cpu0: 528 MHz, 1175 mV --> 396 MHz, 1175 mV
[13041.443850] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13041.464058] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13041.843826] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13041.864050] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13042.281666] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13042.304048] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13042.323995] cpu cpu0: 396 MHz, 1175 mV --> 528 MHz, 1175 mV
[13042.343859] cpu cpu0: 528 MHz, 1175 mV --> 396 MHz, 1175 mV
[13042.483890] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13042.504053] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13042.973849] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13042.994056] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13043.035693] cpu cpu0: 396 MHz, 1175 mV --> 198 MHz, 1175 mV
[13046.084164]
[13046.084164] Bus freq set to 24000000 start...
[13046.090550] Bus freq set to 24000000 done!
[13046.109468] cpu cpu0: 198 MHz, 1175 mV --> 396 MHz, 1175 mV
[13046.151701]
[13046.151701] Bus freq set to 400000000 start...
It looks like when it switches the bus freq to 400000000, the CPU hangs.
Can you please guide here further?
Hi Jimmy,
Awaiting your response.
Here I am sharing a quick summary of the issue and debugging experiments that we have tried.
Regards
Meetali Patel
Hi Jimmy,
Any updates on this issue? I would like to know more details on why when using the ondemand governor, the device hangs but when using the userspace, it works fine.
Thanks & Regards
Meetali Patel
Hi Jimmy,
I would like to use multiple frequencies for the CPU. Even if I change the voltages, the problem persists. I tried the following values that are same as of EVK.
&cpu0 {
operating-points = <
/* kHz uV */
528000 1175000
396000 1025000
198000 950000
>;
fsl,soc-operating-points = <
/* KHz uV */
528000 1175000
396000 1175000
198000 1175000
>;
fsl,arm-soc-shared = <1>;
};
After the command prompt. It's not accepting any input from the keyboard.
Hi Jimmy,
I wanted to share something I observed today.
The current CPUFREQ governor used is "ondemand", when the hang issue is observed. If I change the default governor to "userspace", there's no hang issue seen. My device is battery-powered, so using the "userspace" governor is not an option for me.
One more thing, the release note says, CPUFreq can be used for CPU frequency adjustment. The Interactive governor is added and enabled by default.
But I cannot see the interactive governor defined in the kernel. Attaching the release note I am referring. Is the interactive governor removed from the kernel?
Thanks & Regards
Meetali Patel
Yes, I am using an older version of U-boot. In our project, we are trying to upgrade the kernel from 4.9.88 to 6.1.22. We already have our devices in the field and we will be updating the firmware by OTA. The update will only happen for kernel and rootfs. So, we want to use the new kernel with the older u-boot.
Thanks & Regards
Meetali Patel
Hi Jimmy,
Yes, it should work, but somehow it's not working! Any suggestions on how can I debug more on this?
Thanks & Regards
Meetali Patel
"when I configure the value to only 528000kHZ, it works fine and does not hang during boot up."
As you mentioned, you could only set the operating point at 528000kHz. You don't need to set other points as you set the same operating voltage.