Lines Matching refs:cpu
23 if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then
24 echo $msg cpu hotplug is not supported >&2
29 online_cpus=`cat $SYSFS/devices/system/cpu/online`
33 offline_cpus=`cat $SYSFS/devices/system/cpu/offline`
49 for cpu in $SYSFS/devices/system/cpu/cpu*; do
50 if [ -f $cpu/online ] && grep -q $state $cpu/online; then
51 echo ${cpu##/*/cpu}
68 grep -q 1 $SYSFS/devices/system/cpu/cpu$1/online
73 grep -q 0 $SYSFS/devices/system/cpu/cpu$1/online
78 echo 1 > $SYSFS/devices/system/cpu/cpu$1/online
83 echo 0 > $SYSFS/devices/system/cpu/cpu$1/online
88 local cpu=$1
90 if ! online_cpu $cpu; then
91 echo $FUNCNAME $cpu: unexpected fail >&2
92 elif ! cpu_is_online $cpu; then
93 echo $FUNCNAME $cpu: unexpected offline >&2
99 local cpu=$1
101 if online_cpu $cpu 2> /dev/null; then
102 echo $FUNCNAME $cpu: unexpected success >&2
103 elif ! cpu_is_offline $cpu; then
104 echo $FUNCNAME $cpu: unexpected online >&2
110 local cpu=$1
112 if ! offline_cpu $cpu; then
113 echo $FUNCNAME $cpu: unexpected fail >&2
114 elif ! cpu_is_offline $cpu; then
115 echo $FUNCNAME $cpu: unexpected offline >&2
121 local cpu=$1
123 if offline_cpu $cpu 2> /dev/null; then
124 echo $FUNCNAME $cpu: unexpected success >&2
125 elif ! cpu_is_online $cpu; then
126 echo $FUNCNAME $cpu: unexpected offline >&2
191 for cpu in `hotplaggable_offline_cpus`; do
192 online_cpu_expect_success $cpu
198 for cpu in `hotpluggable_online_cpus`; do
199 offline_cpu_expect_success $cpu
205 for cpu in `hotplaggable_offline_cpus`; do
206 online_cpu_expect_success $cpu
214 NOTIFIER_ERR_INJECT_DIR=$DEBUGFS/notifier-error-inject/cpu
220 /sbin/modprobe -q -r cpu-notifier-error-inject
221 /sbin/modprobe -q cpu-notifier-error-inject priority=$priority
229 echo $msg cpu-notifier-error-inject module is not available >&2
240 for cpu in `hotpluggable_online_cpus`; do
241 offline_cpu_expect_success $cpu
248 for cpu in `hotplaggable_offline_cpus`; do
249 online_cpu_expect_fail $cpu
256 for cpu in `hotplaggable_offline_cpus`; do
257 online_cpu_expect_success $cpu
264 for cpu in `hotpluggable_online_cpus`; do
265 offline_cpu_expect_fail $cpu
269 /sbin/modprobe -q -r cpu-notifier-error-inject