Lines Matching refs:cpu

27 	if ! ls $SYSFS/devices/system/cpu/cpu* > /dev/null 2>&1; then
28 echo $msg cpu hotplug is not supported >&2
33 online_cpus=`cat $SYSFS/devices/system/cpu/online`
41 present_cpus=`cat $SYSFS/devices/system/cpu/present`
47 offline_cpus=`cat $SYSFS/devices/system/cpu/offline`
63 for cpu in $SYSFS/devices/system/cpu/cpu*; do
64 if [ -f $cpu/online ] && grep -q $state $cpu/online; then
65 echo ${cpu##/*/cpu}
82 grep -q 1 $SYSFS/devices/system/cpu/cpu$1/online
87 grep -q 0 $SYSFS/devices/system/cpu/cpu$1/online
92 echo 1 > $SYSFS/devices/system/cpu/cpu$1/online
97 echo 0 > $SYSFS/devices/system/cpu/cpu$1/online
102 local cpu=$1
104 if ! online_cpu $cpu; then
105 echo $FUNCNAME $cpu: unexpected fail >&2
107 elif ! cpu_is_online $cpu; then
108 echo $FUNCNAME $cpu: unexpected offline >&2
115 local cpu=$1
117 if online_cpu $cpu 2> /dev/null; then
118 echo $FUNCNAME $cpu: unexpected success >&2
120 elif ! cpu_is_offline $cpu; then
121 echo $FUNCNAME $cpu: unexpected online >&2
128 local cpu=$1
130 if ! offline_cpu $cpu; then
131 echo $FUNCNAME $cpu: unexpected fail >&2
133 elif ! cpu_is_offline $cpu; then
134 echo $FUNCNAME $cpu: unexpected offline >&2
141 local cpu=$1
143 if offline_cpu $cpu 2> /dev/null; then
144 echo $FUNCNAME $cpu: unexpected success >&2
146 elif ! cpu_is_online $cpu; then
147 echo $FUNCNAME $cpu: unexpected offline >&2
154 for cpu in `hotplaggable_offline_cpus`; do
155 online_cpu_expect_success $cpu
162 for cpu in `hotpluggable_online_cpus`; do
164 if [ $cpu -eq $reserve_cpu ];then
167 offline_cpu_expect_success $cpu