Fixed missing cpuinfo_max_freq on some Linux platforms

pull/136/head
Jeffrey Walton 2016-02-01 02:31:30 -05:00
parent 4274eaf030
commit 43ee9331e0
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ fi
# Benchmarks expect frequency in GHz.
CPU_FREQ=2.0
if [ "$IS_LINUX" -ne "0" ]; then
if [ "$IS_LINUX" -ne "0" ] && [ -e "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" ]; then
CPU_FREQ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq)
CPU_FREQ=$(awk "BEGIN {print $CPU_FREQ/1024/1024}")
fi