Lines Matching refs:cpu
93 static bool IsCpuOnline(int cpu, bool* has_error) { in IsCpuOnline() argument
94 std::string filename = android::base::StringPrintf("/sys/devices/system/cpu/cpu%d/online", cpu); in IsCpuOnline()
106 static bool SetCpuOnline(int cpu, bool online) { in SetCpuOnline() argument
108 bool ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline()
115 std::string filename = android::base::StringPrintf("/sys/devices/system/cpu/cpu%d/online", cpu); in SetCpuOnline()
119 ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline()
132 ret = IsCpuOnline(cpu, &has_error); in SetCpuOnline()
142 LOG(ERROR) << "setting cpu " << cpu << (online ? " online" : " offline") in SetCpuOnline()
158 for (int cpu = 1; cpu < GetCpuCount(); ++cpu) { in CpuOnlineRestorer() local
160 bool ret = IsCpuOnline(cpu, &has_error); in CpuOnlineRestorer()
164 online_map_[cpu] = ret; in CpuOnlineRestorer()
183 for (int cpu = 1; cpu < GetCpuCount(); ++cpu) { in FindAHotpluggableCpu() local
185 bool online = IsCpuOnline(cpu, &has_error); in FindAHotpluggableCpu()
189 if (SetCpuOnline(cpu, !online)) { in FindAHotpluggableCpu()
190 *hotpluggable_cpu = cpu; in FindAHotpluggableCpu()
203 CpuToggleThreadArg(int cpu) : toggle_cpu(cpu), end_flag(false), cpu_hotplug_failed(false) {} in CpuToggleThreadArg()