Skip to main content
frenchie68
Associate
February 22, 2023
Solved

After a Linux Kernel Rebuild I see only one CPU

  • February 22, 2023
  • 5 replies
  • 3215 views

Hello,

I am using the STM32MP157F-DK2 and recently went through a textbook rebuild of the Linux kernel, the modules and the gcnano driver (for GL support). All is well and yet, I see only one of the two CPUS. dmesg tells me the following:

[   0.000000] ------------[ cut here ]------------

[   0.000000] WARNING: CPU: 0 PID: 0 at arch/arm/kernel/devtree.c:148 arm_dt_init_cpu_maps+0x168/0x250

[   0.000000] DT /cpu 2 nodes greater than max cores 1, capping them

[   0.000000] Modules linked in:

[   0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.67 #1

[   0.000000] Hardware name: STM32 (Device Tree Support)

[   0.000000] [<c010e8ec>] (unwind_backtrace) from [<c010c158>] (show_stack+0x10/0x14)

[   0.000000] [<c010c158>] (show_stack) from [<c0122404>] (__warn+0xec/0x148)

[   0.000000] [<c0122404>] (__warn) from [<c0c33034>] (warn_slowpath_fmt+0x78/0xac)

[   0.000000] [<c0c33034>] (warn_slowpath_fmt) from [<c1105094>] (arm_dt_init_cpu_maps+0x168/0x250)

[   0.000000] [<c1105094>] (arm_dt_init_cpu_maps) from [<c1104b1c>] (setup_arch+0x13c/0x170)

[   0.000000] [<c1104b1c>] (setup_arch) from [<c1100c2c>] (start_kernel+0x6c/0x61c)

[   0.000000] [<c1100c2c>] (start_kernel) from [<00000000>] (0x0)

[   0.000000] ---[ end trace 58996bc4bee07162 ]---

How do I reconfigure the system to have both CPUs active?

Thanks in advance.

Francois

This topic has been closed for replies.
Best answer by Bernard PUEL

Hello,

fragment-06-smp-config has to be applied only in case of single cpu use case. It is not clearly mentioned in the README file, and therefore, this is under correction (README file update).

fragment-05-signature.config as well is only required for secure boot.

So probably in your case, you need to apply only the fragments 03 and 04 (on top of the kernel fragments already set).

Hope it is clear.

5 replies

frenchie68
Associate
February 25, 2023

According to https://bootlin.com/blog/building-a-linux-system-for-the-stm32mp1-basic-system/ (buildroot based guidelines for the STM32MP157F-DK2), I should have SMP displayed before PREEMT when u-boot transfers control to he Linux kernel and I don't.

More research is needed to straighten this out.

frenchie68
Associate
February 25, 2023

At some point (git checkout of the kernel source tree), fragment-06-smp.config surfaced and I applied it dutifully. It appears to be meant to disable the SMP feature altogether:

# CONFIG_SMP is not set

Any particular reason for this?

frenchie68
Associate
February 26, 2023

It turns out that the developer package supplies fragment-06-smp-config as in en.SOURCES-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23.tar. I'd really like to hear someone from ST with an official position with respect to SMP support on the SMT32MP157.

Bernard PUEL
Bernard PUELBest answer
Technical Moderator
February 27, 2023

Hello,

fragment-06-smp-config has to be applied only in case of single cpu use case. It is not clearly mentioned in the README file, and therefore, this is under correction (README file update).

fragment-05-signature.config as well is only required for secure boot.

So probably in your case, you need to apply only the fragments 03 and 04 (on top of the kernel fragments already set).

Hope it is clear.

frenchie68
Associate
February 28, 2023

Yes it is quite clear, thank you Bernard. I suspected that much since I came across boot logs dating back from September last year that indicated that SMP was originally enabled.

frenchie68
Associate
February 28, 2023

The system now comes up as SMP.

root@stm32mp157:~# uname -a

Linux stm32mp157 5.15.67 #2 SMP PREEMPT Mon Feb 27 19:22:34 CET 2023 armv7l armv7l armv7l GNU/Linux

Now to rebuild the gcnano driver.