2 # SPDX-License-Identifier: GPL-2.0
6 # protect against multiple inclusion
17 cpus
=$
(ls $CPUROOT |
grep "cpu[0-9].*")
23 for_each_non_boot_cpu
()
25 cpus
=$
(ls $CPUROOT |
grep "cpu[1-9].*")
35 echo 0 > $CPUROOT/$1/online
42 echo 1 > $CPUROOT/$1/online
53 # param: number of times we want to run the loop
56 printf "** Test: Running ${FUNCNAME[0]} for $1 loops **\n\n"
58 for i
in `seq 1 $1`; do
59 for_each_non_boot_cpu offline_cpu
60 for_each_non_boot_cpu online_cpu
64 printf "\n%s\n\n" "------------------------------------------------"
67 # Prints warning for all CPUs with missing cpufreq directory
68 print_unmanaged_cpus
()
70 for_each_cpu cpu_should_have_cpufreq_directory
73 # Counts CPUs with cpufreq directories
74 count_cpufreq_managed_cpus
()
78 for cpu
in `ls $CPUROOT | grep "cpu[0-9].*"`; do
79 if [ -d $CPUROOT/$cpu/cpufreq
]; then