From 2e55408016c8ac1cb9f138951ea90339d9bd9020 Mon Sep 17 00:00:00 2001 From: Praveen Chidambaram Date: Wed, 27 Feb 2013 18:20:04 -0700 Subject: [PATCH] init.qcom.post_boot.sh: Disable core_control when setting cpu params Kernel thermal migitation restricts the number of cores that can be onlined, when in certain thermal situations. To set cpufreq parameters, the core should be online. If the core_control feature is not disabled, the cores cannot be brought online and the following commands will fail. Enable core_control after the parameters are set. CRs-Fixed: 460083 Change-Id: Icb8f073547483a1acdf97937cc1b6fae3add33a6 --- rootdir/etc/init.qcom.post_boot.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootdir/etc/init.qcom.post_boot.sh b/rootdir/etc/init.qcom.post_boot.sh index 6d616465..26545106 100755 --- a/rootdir/etc/init.qcom.post_boot.sh +++ b/rootdir/etc/init.qcom.post_boot.sh @@ -108,6 +108,7 @@ case "$target" in echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/idle_enabled echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/idle_enabled echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled + echo 0 > /sys/module/msm_thermal/core_control/enabled echo 1 > /sys/devices/system/cpu/cpu1/online echo 1 > /sys/devices/system/cpu/cpu2/online echo 1 > /sys/devices/system/cpu/cpu3/online @@ -140,6 +141,7 @@ case "$target" in chown system /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq chown system /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq chown system /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq + echo 1 > /sys/module/msm_thermal/core_control/enabled chown root.system /sys/devices/system/cpu/mfreq chmod 220 /sys/devices/system/cpu/mfreq chown root.system /sys/devices/system/cpu/cpu1/online @@ -265,6 +267,7 @@ case "$target" in echo 1 > /sys/module/pm_8x60/modes/cpu3/retention/idle_enabled ;; esac + echo 0 > /sys/module/msm_thermal/core_control/enabled echo 1 > /sys/devices/system/cpu/cpu1/online echo 1 > /sys/devices/system/cpu/cpu2/online echo 1 > /sys/devices/system/cpu/cpu3/online @@ -288,6 +291,7 @@ case "$target" in echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq + echo 1 > /sys/module/msm_thermal/core_control/enabled chown root.system /sys/devices/system/cpu/mfreq chmod 220 /sys/devices/system/cpu/mfreq chown root.system /sys/devices/system/cpu/cpu1/online