Skip to main content

CPU (Linux)

This article shows how to enable/disable CPU cores on Toradex modules. It only applies to modules that have more than one core.

NXP i.MX-Based SoMs

Boot-up CPU Configuration

The Linux kernel parameter maxcpus can be used to configure the maximum SMP processors Linux should make use of. Use the U-Boot serial console to add the maxcpus boot argument:

Colibri iMX6 # setenv defargs $defargs maxcpus=1
Colibri iMX6 # saveenv

CPU Hotplugging

The CPU hotplugging allows to enable/disable CPU cores without a system reboot, see below:

root@colibri-imx7:~# echo 0 > /sys/devices/system/cpu/cpu1/online 
[ 25.213855] CPU1: shutdown

NVIDIA Tegra-Based SoMs

Boot-up CPU Configuration

The Linux kernel parameter maxcpus can be used to configure the maximum SMP processors Linux should make use of. Use the U-Boot serial console to add the maxcpus boot argument:

Colibri T30 # setenv defargs $defargs maxcpus=1
Colibri T30 # saveenv

CPU Hotplugging

The CPU hotplugging allows to enable/disable CPU cores without a system reboot.

Manual

Manually turn off CPU cores:

root@colibri-t30:~# echo 0 > /sys/devices/system/cpu/cpu3/online
[ 1190.700711] CPU3: shutdown
info

This is only useful if automatic CPU hotplugging (mentioned below) is turned off.

Automatic

The Linux Kernel supports automatic core aka CPU hotplugging based on the current load in order to minimize power usage.

info

On T30 the low-power core migration is disabled as it has some issues.

Turn off low-power core migration:

root@colibri-t30:~# echo Y > /sys/module/cpu_tegra3/parameters/no_lp

Turn on automatic CPU hotplugging:

root@colibri-t30:~# echo 1 > /sys/module/cpu_tegra3/parameters/auto_hotplug
[ 2043.597297] Tegra auto-hotplug enabled

For more information on the Tegra specific CPU hotplugging driver refer to the documentation file within the L4T Linux kernel trees: Documentation/arm/nvidia/tegra_parameters.txt resp. Documentation/arm/nvidia/tegra_parameters.txt



Send Feedback!