From 52d603a711b305828f2317e85569566b3412cfa0 Mon Sep 17 00:00:00 2001 From: kszaq Date: Mon, 22 Apr 2019 22:00:01 +0200 Subject: [PATCH] init: set ondemand up_threshold for multi-cluster CPUs For multi-cluster CPUs (e.g. Amlogic S912) there is a separate policy for each CPU cluster. Add a case in init script to cover setting up_threshold for all clusters. --- packages/sysutils/busybox/scripts/init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index 5b91180a4a..809f71bd79 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -933,6 +933,10 @@ echo '1 4 1 7' > /proc/sys/kernel/printk # set ondemand up_threshold if [ -e /sys/devices/system/cpu/cpufreq/ondemand/up_threshold ]; then echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold +else + for f in $(ls /sys/devices/system/cpu/cpufreq/policy*/ondemand/up_threshold 2>/dev/null) ; do + echo 50 > $f + done fi # run platform_init script if exists