Lines Matching refs:target

52  * @target:    The target state
65 enum cpuhp_state target;
179 trace_cpuhp_enter(cpu, st->target, state, cb);
192 trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node);
206 trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node);
236 trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node);
480 static inline enum cpuhp_state cpuhp_set_state(struct cpuhp_cpu_state *st, enum cpuhp_state target)
487 st->target = target;
489 st->bringup = st->state < target;
510 st->target = prev_state;
517 if (!st->single && st->state == st->target) {
532 static int cpuhp_kick_ap(struct cpuhp_cpu_state *st, enum cpuhp_state target)
537 prev_state = cpuhp_set_state(st, target);
557 /* Unpark the hotplug thread of the target cpu */
571 if (st->target <= CPUHP_AP_ONLINE_IDLE) {
575 return cpuhp_kick_ap(st, st->target);
627 for (st->state--; st->state > st->target; st->state--) {
647 static int cpuhp_up_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, enum cpuhp_state target)
652 while (st->state < target) {
657 st->target = prev_state;
693 * - up: runs ++st->state, while st->state < st->target
694 * - down: runs st->state--, while st->state > st->target
729 st->should_run = (st->state < st->target);
730 WARN_ON_ONCE(st->state > st->target);
734 st->should_run = (st->state > st->target);
735 WARN_ON_ONCE(st->state < st->target);
836 trace_cpuhp_enter(cpu, st->target, prev_state, cpuhp_kick_ap_work);
837 ret = cpuhp_kick_ap(st, st->target);
957 enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
974 for (; st->state > target; st->state--) {
1063 for (st->state++; st->state < st->target; st->state++) {
1068 static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st, enum cpuhp_state target)
1073 for (; st->state > target; st->state--) {
1076 st->target = prev_state;
1087 static int __ref _cpu_down(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
1110 prev_state = cpuhp_set_state(st, target);
1116 st->target = max((int)target, CPUHP_TEARDOWN_CPU);
1134 st->target = target;
1140 ret = cpuhp_down_callbacks(cpu, st, target);
1158 static int cpu_down_maps_locked(unsigned int cpu, enum cpuhp_state target)
1163 return _cpu_down(cpu, 0, target);
1166 static int cpu_down(unsigned int cpu, enum cpuhp_state target)
1171 err = cpu_down_maps_locked(cpu, target);
1259 enum cpuhp_state target = min((int)st->target, CPUHP_AP_ONLINE);
1264 while (st->state < target) {
1299 static int _cpu_up(unsigned int cpu, int tasks_frozen, enum cpuhp_state target)
1316 if (st->state >= target) {
1331 cpuhp_set_state(st, target);
1348 * Try to reach the target state. We max out on the BP at
1350 * responsible for bringing it up to the target state.
1352 target = min((int)target, CPUHP_BRINGUP_CPU);
1353 ret = cpuhp_up_callbacks(cpu, st, target);
1361 static int cpu_up(unsigned int cpu, enum cpuhp_state target)
1389 err = _cpu_up(cpu, 0, target);
2304 int target, ret;
2306 ret = kstrtoint(buf, 10, &target);
2312 if (target < CPUHP_OFFLINE || target > CPUHP_ONLINE) {
2316 if (target != CPUHP_OFFLINE && target != CPUHP_ONLINE) {
2327 sp = cpuhp_get_step(target);
2334 if (st->state < target) {
2335 ret = cpu_up(dev->id, target);
2337 ret = cpu_down(dev->id, target);
2348 return sprintf(buf, "%d\n", st->target);
2350 static DEVICE_ATTR(target, 0644, show_cpuhp_target, write_cpuhp_target);