[FS#910] Raspberry Pi 3 keeps attempting to change CPU frequency and failing

LEDE Bugs lede-bugs at lists.infradead.org
Sun Jul 16 08:57:00 PDT 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Jon Burgess (jburgess777) 

Attached to Project - LEDE Project
Summary - Raspberry Pi 3 keeps attempting to change CPU frequency and failing
Task Type - Bug Report
Category - Kernel
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Medium
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - I recently updated a Raspberry Pi 3 to a recent LEDE git master build: Reboot (SNAPSHOT, r4576-9fe9175)

The kernel keeps logging the following errors:

[  103.041158] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[  103.044492] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[  103.047857] cpufreq: __target_index: Failed to change cpu frequency: -22
[  103.401167] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[  103.404517] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[  103.407890] cpufreq: __target_index: Failed to change cpu frequency: -22
[  103.761155] bcm2835-cpufreq:bcm2835_cpufreq_set_clock:84: Failed to set clock: 600000 (-12)
[  103.764491] bcm2835-cpufreq:bcm2835_cpufreq_driver_target_index:183: Error occurred setting a new frequency (600000)
[  103.767870] cpufreq: __target_index: Failed to change cpu frequency: -22


I am seeing ~10ms latency spikes for traffic through the device and I believe these errors are the reason. If I force the scheduler to only run the CPU at its maximum speed with the command below then then errors cease and the latency spikes disappear:

# echo 1200000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq


I looked into the kernel sources and the messages above appear to be saying that there was an error when asking the Pi firmware to change the CPU speed.

I know there is a HW quirk in the RPi3 which means the UART is effected by the CPU speed. I wonder whether this has anything to do with the firmware rejecting the speed change:
https://github.com/RPi-Distro/repo/issues/22

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=910



More information about the lede-bugs mailing list