File cpufreq_ondemand_vars_global.patch of Package pm-profiler
---
tools/enable-profile | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
Index: pm-profiler-0.1_git20090812/tools/enable-profile
===================================================================
--- pm-profiler-0.1_git20090812.orig/tools/enable-profile
+++ pm-profiler-0.1_git20090812/tools/enable-profile
@@ -42,25 +42,15 @@ function cpufreq_governor {
}
function cpufreq_ondemand_up_threshold {
- for I in /sys/devices/system/cpu/cpu*/cpufreq/ondemand/up_threshold; do
- echo $CPUFREQ_ONDEMAND_UP_THRESHOLD > $I
- done
+ echo $CPUFREQ_ONDEMAND_UP_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;
}
function cpufreq_ondemand_sampling_rate {
- local SAMPLE_RATE
- for I in /sys/devices/system/cpu/cpu*/cpufreq; do
- if [ -e $I/cpuinfo_transition_latency ] && \
- [ -w $I/ondemand/sampling_rate ]; then
- SAMPLE_RATE=$(($(cat $I/cpuinfo_transition_latency) \
- * $CPUFREQ_ONDEMAND_SAMPLING_RATE / 1000))
- echo $SAMPLE_RATE > $I/ondemand/sampling_rate
- fi
- done
+ echo $CPUFREQ_ONDEMAND_SAMPLING_RATE >/sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
}
function cpufreq_ondemand_powersave_bias {
- for I in /sys/devices/system/cpu/cpu*/cpufreq/ondemand/powersave_bias; do
+ for I in /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias; do
echo $CPUFREQ_ONDEMAND_POWERSAVE_BIAS > $I
done
}