Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 92) sorted by relevance

1234

/kernel/power/
Dsuspend.c162 static bool valid_state(suspend_state_t state) in valid_state() argument
169 return suspend_ops && suspend_ops->valid && suspend_ops->valid(state); in valid_state()
186 suspend_state_t state; in mem_sleep_default_setup() local
188 for (state = PM_SUSPEND_TO_IDLE; state <= PM_SUSPEND_MEM; state++) in mem_sleep_default_setup()
189 if (mem_sleep_labels[state] && in mem_sleep_default_setup()
190 !strcmp(str, mem_sleep_labels[state])) { in mem_sleep_default_setup()
191 mem_sleep_default = state; in mem_sleep_default_setup()
232 int suspend_valid_only_mem(suspend_state_t state) in suspend_valid_only_mem() argument
234 return state == PM_SUSPEND_MEM; in suspend_valid_only_mem()
238 static bool sleep_state_supported(suspend_state_t state) in sleep_state_supported() argument
[all …]
Dmain.c149 suspend_state_t state; in decode_suspend_state() local
156 for (state = PM_SUSPEND_MIN; state < PM_SUSPEND_MAX; state++) { in decode_suspend_state()
157 const char *label = mem_sleep_states[state]; in decode_suspend_state()
160 return state; in decode_suspend_state()
169 suspend_state_t state; in mem_sleep_store() local
181 state = decode_suspend_state(buf, n); in mem_sleep_store()
182 if (state < PM_SUSPEND_MAX && state > PM_SUSPEND_ON) in mem_sleep_store()
183 mem_sleep_current = state; in mem_sleep_store()
617 suspend_state_t state; in decode_state() local
630 for (state = PM_SUSPEND_MIN; state < PM_SUSPEND_MAX; state++) { in decode_state()
[all …]
Dsuspend_test.c62 static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state) in test_wakealarm() argument
96 if (state == PM_SUSPEND_MEM) { in test_wakealarm()
97 printk(info_test, pm_states[state]); in test_wakealarm()
98 status = pm_suspend(state); in test_wakealarm()
100 state = PM_SUSPEND_STANDBY; in test_wakealarm()
102 if (state == PM_SUSPEND_STANDBY) { in test_wakealarm()
103 printk(info_test, pm_states[state]); in test_wakealarm()
104 status = pm_suspend(state); in test_wakealarm()
106 state = PM_SUSPEND_TO_IDLE; in test_wakealarm()
108 if (state == PM_SUSPEND_TO_IDLE) { in test_wakealarm()
[all …]
Dautosleep.c90 int pm_autosleep_set_state(suspend_state_t state) in pm_autosleep_set_state() argument
94 if (state >= PM_SUSPEND_MAX) in pm_autosleep_set_state()
102 autosleep_state = state; in pm_autosleep_set_state()
106 if (state > PM_SUSPEND_ON) { in pm_autosleep_set_state()
/kernel/
Dcpu.c66 enum cpuhp_state state; member
142 static struct cpuhp_step *cpuhp_get_step(enum cpuhp_state state) in cpuhp_get_step() argument
144 return cpuhp_hp_states + state; in cpuhp_get_step()
157 static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state state, in cpuhp_invoke_callback() argument
162 struct cpuhp_step *step = cpuhp_get_step(state); in cpuhp_invoke_callback()
167 if (st->fail == state) { in cpuhp_invoke_callback()
181 trace_cpuhp_enter(cpu, st->target, state, cb); in cpuhp_invoke_callback()
183 trace_cpuhp_exit(cpu, st->state, state, ret); in cpuhp_invoke_callback()
193 trace_cpuhp_multi_enter(cpu, st->target, state, cbm, node); in cpuhp_invoke_callback()
195 trace_cpuhp_exit(cpu, st->state, state, ret); in cpuhp_invoke_callback()
[all …]
Dcontext_tracking.c62 void noinstr __context_tracking_enter(enum ctx_state state) in __context_tracking_enter() argument
70 if ( __this_cpu_read(context_tracking.state) != state) { in __context_tracking_enter()
79 if (state == CONTEXT_USER) { in __context_tracking_enter()
100 __this_cpu_write(context_tracking.state, state); in __context_tracking_enter()
106 void context_tracking_enter(enum ctx_state state) in context_tracking_enter() argument
122 __context_tracking_enter(state); in context_tracking_enter()
146 void noinstr __context_tracking_exit(enum ctx_state state) in __context_tracking_exit() argument
151 if (__this_cpu_read(context_tracking.state) == state) { in __context_tracking_exit()
158 if (state == CONTEXT_USER) { in __context_tracking_exit()
165 __this_cpu_write(context_tracking.state, CONTEXT_KERNEL); in __context_tracking_exit()
[all …]
Dstackleak.c26 int state = !static_branch_unlikely(&stack_erasing_bypass); in stack_erasing_sysctl() local
27 int prev_state = state; in stack_erasing_sysctl()
29 table->data = &state; in stack_erasing_sysctl()
32 state = !!state; in stack_erasing_sysctl()
33 if (ret || !write || state == prev_state) in stack_erasing_sysctl()
36 if (state) in stack_erasing_sysctl()
42 state ? "enabled" : "disabled"); in stack_erasing_sysctl()
Dsoftirq.c86 if (tsk && tsk->state != TASK_RUNNING) in wakeup_softirqd()
564 &t->state)) in tasklet_action_common()
604 t->state = 0; in tasklet_setup()
616 t->state = 0; in tasklet_init()
629 while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { in tasklet_kill()
632 } while (test_bit(TASKLET_STATE_SCHED, &t->state)); in tasklet_kill()
635 clear_bit(TASKLET_STATE_SCHED, &t->state); in tasklet_kill()
690 BUG_ON(test_bit(TASKLET_STATE_RUN, &t->state)); in tasklet_kill_immediate()
692 if (!test_bit(TASKLET_STATE_SCHED, &t->state)) in tasklet_kill_immediate()
/kernel/cgroup/
Dlegacy_freezer.c45 unsigned int state; member
70 ret = task_freezer(task)->state & CGROUP_FREEZING; in cgroup_freezing()
76 static const char *freezer_state_strs(unsigned int state) in freezer_state_strs() argument
78 if (state & CGROUP_FROZEN) in freezer_state_strs()
80 if (state & CGROUP_FREEZING) in freezer_state_strs()
112 freezer->state |= CGROUP_FREEZER_ONLINE; in freezer_css_online()
114 if (parent && (parent->state & CGROUP_FREEZING)) { in freezer_css_online()
115 freezer->state |= CGROUP_FREEZING_PARENT | CGROUP_FROZEN; in freezer_css_online()
136 if (freezer->state & CGROUP_FREEZING) in freezer_css_offline()
139 freezer->state = 0; in freezer_css_offline()
[all …]
/kernel/livepatch/
Dstate.c15 #define klp_for_each_state(patch, state) \ argument
16 for (state = patch->states; state && state->id; state++)
33 struct klp_state *state; in klp_get_state() local
35 klp_for_each_state(patch, state) { in klp_get_state()
36 if (state->id == id) in klp_get_state()
37 return state; in klp_get_state()
67 struct klp_state *state, *last_state = NULL; in klp_get_prev_state() local
76 state = klp_get_state(patch, id); in klp_get_prev_state()
77 if (state) in klp_get_prev_state()
78 last_state = state; in klp_get_prev_state()
[all …]
/kernel/sched/
Dcputime.c675 WARN_ON_ONCE(vtime->state == VTIME_INACTIVE); in get_vtime_delta()
705 if (vtime->state == VTIME_GUEST) in __vtime_account_kernel()
729 vtime->state = VTIME_USER; in vtime_user_enter()
743 vtime->state = VTIME_SYS; in vtime_user_exit()
760 vtime->state = VTIME_GUEST; in vtime_guest_enter()
772 vtime->state = VTIME_SYS; in vtime_guest_exit()
787 if (vtime->state == VTIME_IDLE) in vtime_task_switch_generic()
791 vtime->state = VTIME_INACTIVE; in vtime_task_switch_generic()
799 vtime->state = VTIME_IDLE; in vtime_task_switch_generic()
801 vtime->state = VTIME_GUEST; in vtime_task_switch_generic()
[all …]
Dcompletion.c72 long (*action)(long), long timeout, int state) in do_wait_for_common() argument
78 if (signal_pending_state(state, current)) { in do_wait_for_common()
83 __set_current_state(state); in do_wait_for_common()
99 long (*action)(long), long timeout, int state) in __wait_for_common() argument
106 timeout = do_wait_for_common(x, action, timeout, state); in __wait_for_common()
115 wait_for_common(struct completion *x, long timeout, int state) in wait_for_common() argument
117 return __wait_for_common(x, schedule_timeout, timeout, state); in wait_for_common()
121 wait_for_common_io(struct completion *x, long timeout, int state) in wait_for_common_io() argument
123 return __wait_for_common(x, io_schedule_timeout, timeout, state); in wait_for_common_io()
Dswait.c92 void prepare_to_swait_exclusive(struct swait_queue_head *q, struct swait_queue *wait, int state) in prepare_to_swait_exclusive() argument
98 set_current_state(state); in prepare_to_swait_exclusive()
103 long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state) in prepare_to_swait_event() argument
109 if (signal_pending_state(state, current)) { in prepare_to_swait_event()
118 set_current_state(state); in prepare_to_swait_event()
Dpsi.c226 static bool test_state(unsigned int *tasks, enum psi_states state) in test_state() argument
228 switch (state) { in test_state()
507 group->total[PSI_POLL][t->state], 0); in init_triggers()
527 if (group->polling_total[t->state] == total[t->state]) in update_triggers()
539 growth = window_update(&t->win, now, total[t->state]); in update_triggers()
1148 enum psi_states state; in psi_trigger_create() local
1156 state = PSI_IO_SOME + res * 2; in psi_trigger_create()
1158 state = PSI_IO_FULL + res * 2; in psi_trigger_create()
1162 if (state >= PSI_NONIDLE) in psi_trigger_create()
1178 t->state = state; in psi_trigger_create()
[all …]
Dwait.c250 prepare_to_wait(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) in prepare_to_wait() argument
258 set_current_state(state); in prepare_to_wait()
265 …re_to_wait_exclusive(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) in prepare_to_wait_exclusive() argument
276 set_current_state(state); in prepare_to_wait_exclusive()
291 …repare_to_wait_event(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry, int state) in prepare_to_wait_event() argument
297 if (signal_pending_state(state, current)) { in prepare_to_wait_event()
319 set_current_state(state); in prepare_to_wait_event()
/kernel/locking/
Dqspinlock_paravirt.h53 u8 state; member
272 return READ_ONCE(prev->state) != vcpu_running; in pv_wait_early()
285 pn->state = vcpu_running; in pv_init_node()
320 smp_store_mb(pn->state, vcpu_halted); in pv_wait_node()
325 pv_wait(&pn->state, vcpu_halted); in pv_wait_node()
333 cmpxchg(&pn->state, vcpu_halted, vcpu_running); in pv_wait_node()
380 if (cmpxchg_relaxed(&pn->state, vcpu_halted, vcpu_hashed) in pv_kick_node()
414 if (READ_ONCE(pn->state) == vcpu_hashed) in pv_wait_head_or_lock()
427 WRITE_ONCE(pn->state, vcpu_running); in pv_wait_head_or_lock()
467 WRITE_ONCE(pn->state, vcpu_hashed); in pv_wait_head_or_lock()
Drwsem.c718 enum owner_state state; in rwsem_spin_on_owner() local
723 state = rwsem_owner_state(owner, flags, nonspinnable); in rwsem_spin_on_owner()
724 if (state != OWNER_WRITER) in rwsem_spin_on_owner()
725 return state; in rwsem_spin_on_owner()
740 state = rwsem_owner_state(new, new_flags, nonspinnable); in rwsem_spin_on_owner()
753 state = OWNER_NONSPINNABLE; in rwsem_spin_on_owner()
761 return state; in rwsem_spin_on_owner()
1003 rwsem_down_read_slowpath(struct rw_semaphore *sem, int state) in rwsem_down_read_slowpath() argument
1108 set_current_state(state); in rwsem_down_read_slowpath()
1113 if (signal_pending_state(state, current)) { in rwsem_down_read_slowpath()
[all …]
/kernel/bpf/
Dverifier.c223 static void bpf_map_key_store(struct bpf_insn_aux_data *aux, u64 state) in bpf_map_key_store() argument
227 aux->map_key_state = state | BPF_MAP_KEY_SEEN | in bpf_map_key_store()
580 const struct bpf_func_state *state) in print_verifier_state() argument
586 if (state->frameno) in print_verifier_state()
587 verbose(env, " frame%d:", state->frameno); in print_verifier_state()
589 reg = &state->regs[i]; in print_verifier_state()
667 for (i = 0; i < state->allocated_stack / BPF_REG_SIZE; i++) { in print_verifier_state()
673 if (state->stack[i].slot_type[j] != STACK_INVALID) in print_verifier_state()
676 state->stack[i].slot_type[j]]; in print_verifier_state()
682 print_liveness(env, state->stack[i].spilled_ptr.live); in print_verifier_state()
[all …]
Dbtf.c358 } state; member
772 const struct btf_member *m = show->state.member; in btf_show_name()
773 const struct btf_type *t = show->state.type; in btf_show_name()
775 u32 id = show->state.type_id; in btf_show_name()
781 show->state.name[0] = '\0'; in btf_show_name()
788 if (show->state.array_member) in btf_show_name()
900 snprintf(show->state.name, sizeof(show->state.name), "%s", in btf_show_name()
903 snprintf(show->state.name, sizeof(show->state.name), in btf_show_name()
918 return show->state.name; in btf_show_name()
926 if ((indent - show->state.depth) >= indents) in __btf_show_indent()
[all …]
Dbpf_struct_ops.c23 enum bpf_struct_ops_state state
247 enum bpf_struct_ops_state state; in bpf_struct_ops_map_sys_lookup_elem() local
254 state = smp_load_acquire(&kvalue->state); in bpf_struct_ops_map_sys_lookup_elem()
255 if (state == BPF_STRUCT_OPS_STATE_INIT) { in bpf_struct_ops_map_sys_lookup_elem()
265 uvalue->state = state; in bpf_struct_ops_map_sys_lookup_elem()
344 if (uvalue->state || refcount_read(&uvalue->refcnt)) in bpf_struct_ops_map_update_elem()
356 if (kvalue->state != BPF_STRUCT_OPS_STATE_INIT) { in bpf_struct_ops_map_update_elem()
464 smp_store_release(&kvalue->state, BPF_STRUCT_OPS_STATE_INUSE); in bpf_struct_ops_map_update_elem()
494 prev_state = cmpxchg(&st_map->kvalue.state, in bpf_struct_ops_map_delete_elem()
/kernel/trace/
Dtrace_events_synth.c1521 struct synth_event_trace_state state; in synth_event_trace() local
1525 ret = __synth_event_trace_init(file, &state); in synth_event_trace()
1532 if (state.event->n_dynamic_fields) { in synth_event_trace()
1535 for (i = 0; i < state.event->n_fields; i++) { in synth_event_trace()
1538 if (state.event->fields[i]->is_string && in synth_event_trace()
1539 state.event->fields[i]->is_dynamic) { in synth_event_trace()
1549 ret = __synth_event_trace_start(file, &state, data_size); in synth_event_trace()
1553 if (n_vals != state.event->n_fields) { in synth_event_trace()
1561 for (i = 0, n_u64 = 0; i < state.event->n_fields; i++) { in synth_event_trace()
1566 if (state.event->fields[i]->is_string) { in synth_event_trace()
[all …]
/kernel/debug/
Ddebug_core.c106 [0 ... KGDB_MAX_BREAKPOINTS-1] = { .state = BP_UNDEFINED }
316 if (kgdb_break[i].state != BP_SET) in dbg_activate_sw_breakpoints()
328 kgdb_break[i].state = BP_ACTIVE; in dbg_activate_sw_breakpoints()
344 if ((kgdb_break[i].state == BP_SET) && in dbg_set_sw_break()
349 if (kgdb_break[i].state == BP_REMOVED && in dbg_set_sw_break()
358 if (kgdb_break[i].state == BP_UNDEFINED) { in dbg_set_sw_break()
368 kgdb_break[breakno].state = BP_SET; in dbg_set_sw_break()
382 if (kgdb_break[i].state != BP_ACTIVE) in dbg_deactivate_sw_breakpoints()
392 kgdb_break[i].state = BP_SET; in dbg_deactivate_sw_breakpoints()
403 if ((kgdb_break[i].state == BP_SET) && in dbg_remove_sw_break()
[all …]
/kernel/debug/kdb/
Dkdb_support.c624 char state; in kdb_task_state_char() local
632 state = (p->state == 0) ? 'R' : in kdb_task_state_char()
633 (p->state < 0) ? 'U' : in kdb_task_state_char()
634 (p->state & TASK_UNINTERRUPTIBLE) ? 'D' : in kdb_task_state_char()
635 (p->state & TASK_STOPPED) ? 'T' : in kdb_task_state_char()
636 (p->state & TASK_TRACED) ? 'C' : in kdb_task_state_char()
639 (p->state & TASK_INTERRUPTIBLE) ? 'S' : '?'; in kdb_task_state_char()
645 state = 'I'; /* idle task */ in kdb_task_state_char()
647 } else if (!p->mm && state == 'S') { in kdb_task_state_char()
648 state = 'M'; /* sleeping system daemon */ in kdb_task_state_char()
[all …]
/kernel/irq/
Dirq_sim.c57 enum irqchip_irq_state which, bool *state) in irq_sim_get_irqchip_state() argument
65 *state = test_bit(hwirq, irq_ctx->work_ctx->pending); in irq_sim_get_irqchip_state()
75 enum irqchip_irq_state which, bool state) in irq_sim_set_irqchip_state() argument
83 assign_bit(hwirq, irq_ctx->work_ctx->pending, state); in irq_sim_set_irqchip_state()
84 if (state) in irq_sim_set_irqchip_state()
/kernel/time/
Dhrtimer.c356 static bool hrtimer_fixup_init(void *addr, enum debug_obj_state state) in hrtimer_fixup_init() argument
360 switch (state) { in hrtimer_fixup_init()
375 static bool hrtimer_fixup_activate(void *addr, enum debug_obj_state state) in hrtimer_fixup_activate() argument
377 switch (state) { in hrtimer_fixup_activate()
390 static bool hrtimer_fixup_free(void *addr, enum debug_obj_state state) in hrtimer_fixup_free() argument
394 switch (state) { in hrtimer_fixup_free()
945 if (WARN_ON(timer->state & HRTIMER_STATE_ENQUEUED)) in hrtimer_forward()
987 WRITE_ONCE(timer->state, HRTIMER_STATE_ENQUEUED); in enqueue_hrtimer()
1007 u8 state = timer->state; in __remove_hrtimer() local
1010 WRITE_ONCE(timer->state, newstate); in __remove_hrtimer()
[all …]

1234