Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configs: Enable HOTPLUG_CPU #6409

Merged
merged 1 commit into from
Oct 14, 2024
Merged

Conversation

popcornmix
Copy link
Collaborator

@popcornmix popcornmix commented Oct 10, 2024

This works and can be useful for
debugging/benchmarking/low power use

$ nproc
4
$ echo 0 | sudo tee /sys/devices/system/cpu/cpu3/online
0
$ echo 0 | sudo tee /sys/devices/system/cpu/cpu2/online
0
$ echo 0 | sudo tee /sys/devices/system/cpu/cpu1/online
0
$ nproc
1

This works and can be useful for
debugging/benchmarking/low power use

$ nproc
4
$ echo 0 | sudo tee  /sys/devices/system/cpu/cpu3/online
0
$ echo 0 | sudo tee  /sys/devices/system/cpu/cpu2/online
0
$ echo 0 | sudo tee  /sys/devices/system/cpu/cpu1/online
0
$ nproc
1

Signed-off-by: Dom Cobley <[email protected]>
@popcornmix
Copy link
Collaborator Author

Tested on Pi4 and while nothing bad happens, we are unable to offline a cpu (as you can on pi5).
The online and offline nodes are not present in /sys/devices/system/cpu/cpuN/.

I think this is due to PSCI support in pi5 arm stub (using arm-trusted-firmware), which is not present in the more minimal stubs of Pi0-4.

I suspect this is the code that checks:

static bool cpu_psci_cpu_can_disable(unsigned int cpu)

I've restricted the config changes to arch/arm64/configs/bcm2712_defconfig and arch/arm64/configs/bcm2712_defconfig.

@popcornmix popcornmix marked this pull request as ready for review October 14, 2024 13:15
@pelwell pelwell merged commit dd3f9f7 into raspberrypi:rpi-6.6.y Oct 14, 2024
12 checks passed
@popcornmix popcornmix deleted the hotplug_cpu branch October 14, 2024 15:12
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Oct 16, 2024
See: raspberrypi/linux#6412

kernel: dtoverlays: Fix up imx500 overlays to have unique clock nodes
See: raspberrypi/linux#6415

kernel: configs: Enable HOTPLUG_CPU
See: raspberrypi/linux#6409

kernel: dtoverlays: Add an overlay for Waveshare's 800x480 4.3" DSI screen
See: raspberrypi/linux#6417

kernel: drm/vc4: Remove request for min clocks when hdmi output is disabled
See: raspberrypi/linux#6416
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Oct 16, 2024
See: raspberrypi/linux#6412

kernel: dtoverlays: Fix up imx500 overlays to have unique clock nodes
See: raspberrypi/linux#6415

kernel: configs: Enable HOTPLUG_CPU
See: raspberrypi/linux#6409

kernel: dtoverlays: Add an overlay for Waveshare's 800x480 4.3" DSI screen
See: raspberrypi/linux#6417

kernel: drm/vc4: Remove request for min clocks when hdmi output is disabled
See: raspberrypi/linux#6416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants