Lines Matching refs:cpu
26 if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then
27 echo $msg cpu hotplug is not supported >&2
32 online_cpus=`cat $SYSFS/devices/system/cpu/online`
40 present_cpus=`cat $SYSFS/devices/system/cpu/present`
46 offline_cpus=`cat $SYSFS/devices/system/cpu/offline`
62 for cpu in $SYSFS/devices/system/cpu/cpu*; do
63 if [ -f $cpu/online ] && grep -q $state $cpu/online; then
64 echo ${cpu##/*/cpu}
81 grep -q 1 $SYSFS/devices/system/cpu/cpu$1/online
86 grep -q 0 $SYSFS/devices/system/cpu/cpu$1/online
91 echo 1 > $SYSFS/devices/system/cpu/cpu$1/online
96 echo 0 > $SYSFS/devices/system/cpu/cpu$1/online
101 local cpu=$1
103 if ! online_cpu $cpu; then
104 echo $FUNCNAME $cpu: unexpected fail >&2
106 elif ! cpu_is_online $cpu; then
107 echo $FUNCNAME $cpu: unexpected offline >&2
114 local cpu=$1
116 if online_cpu $cpu 2> /dev/null; then
117 echo $FUNCNAME $cpu: unexpected success >&2
119 elif ! cpu_is_offline $cpu; then
120 echo $FUNCNAME $cpu: unexpected online >&2
127 local cpu=$1
129 if ! offline_cpu $cpu; then
130 echo $FUNCNAME $cpu: unexpected fail >&2
132 elif ! cpu_is_offline $cpu; then
133 echo $FUNCNAME $cpu: unexpected offline >&2
140 local cpu=$1
142 if offline_cpu $cpu 2> /dev/null; then
143 echo $FUNCNAME $cpu: unexpected success >&2
145 elif ! cpu_is_online $cpu; then
146 echo $FUNCNAME $cpu: unexpected offline >&2
215 for cpu in `hotplaggable_offline_cpus`; do
216 online_cpu_expect_success $cpu
222 for cpu in `hotpluggable_online_cpus`; do
223 offline_cpu_expect_success $cpu
229 for cpu in `hotplaggable_offline_cpus`; do
230 online_cpu_expect_success $cpu
238 NOTIFIER_ERR_INJECT_DIR=$DEBUGFS/notifier-error-inject/cpu
244 /sbin/modprobe -q -r cpu-notifier-error-inject
245 /sbin/modprobe -q cpu-notifier-error-inject priority=$priority
253 echo $msg cpu-notifier-error-inject module is not available >&2
264 for cpu in `hotpluggable_online_cpus`; do
265 offline_cpu_expect_success $cpu
272 for cpu in `hotplaggable_offline_cpus`; do
273 online_cpu_expect_fail $cpu
280 for cpu in `hotplaggable_offline_cpus`; do
281 online_cpu_expect_success $cpu
288 for cpu in `hotpluggable_online_cpus`; do
289 offline_cpu_expect_fail $cpu
293 /sbin/modprobe -q -r cpu-notifier-error-inject