init.qcom.post_boot: Offline CPU5-7 before disabling thermal hotplug
post_boot script is also executed during framework reboot, where all A57s might be online running at max frequency. Disabling thermal hotplug then could lead into thermal runaway. Explicitly offline CPU 5-7 to make sure at most one A57 is online, and limit its frequency to 960MHz when thermal hotplug is disabled. Change-Id: I53b7541348ba0b14303006dba4b3c21770d36225
This commit is contained in:
parent
fc7d402fd7
commit
8c2c925e3a
|
@ -744,6 +744,12 @@ esac
|
|||
|
||||
case "$target" in
|
||||
"msm8994")
|
||||
# ensure at most one A57 is online when thermal hotplug is disabled
|
||||
echo 0 > /sys/devices/system/cpu/cpu5/online
|
||||
echo 0 > /sys/devices/system/cpu/cpu6/online
|
||||
echo 0 > /sys/devices/system/cpu/cpu7/online
|
||||
# in case CPU4 is online, limit its frequency
|
||||
echo 960000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
|
||||
# disable thermal bcl hotplug to switch governor
|
||||
echo 0 > /sys/module/msm_thermal/core_control/enabled
|
||||
echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode
|
||||
|
@ -779,6 +785,8 @@ case "$target" in
|
|||
echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
|
||||
echo 80000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
|
||||
echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||
# restore A57's max
|
||||
cat /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
|
||||
# re-enable thermal and BCL hotplug
|
||||
echo 1 > /sys/module/msm_thermal/core_control/enabled
|
||||
echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode
|
||||
|
|
Loading…
Reference in New Issue