xnux.eu - site map - news

CPU Hotplug (A83T)

It's possible to shutdown CPU cores while running Linux if they are not necessary for the current workload by writing to sysfs files:

echo 0 > /sys/devices/system/cpu/cpu1/online
echo 0 > /sys/devices/system/cpu/cpu2/online
echo 0 > /sys/devices/system/cpu/cpu3/online
...
echo 0 > /sys/devices/system/cpu/cpu7/online

You need to have at least one core running.

To re-enable:

echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online
...
echo 1 > /sys/devices/system/cpu/cpu7/online

CPU hoptlug is handled by Linux code directly (via some platform specific code in arm/mach-sunxi).

To shutdown all ARM CPU cores, you need to run code on the arisc CPU, that will take care of shutting down the last ARM core and re-enabling it when necessary. This role will almost certainly be filled by crust firmware project.

Linux will be able to communicate with crust via shared memory via SCPI message protocol and some synchroniza­tion/notifi­cation mechanism (msgbox).

There's code that does this in my linux/tbs branch.