Lines Matching refs:con
2511 static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress);
2523 static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress) { return true; } in __pr_flush() argument
2787 struct console *con; in console_suspend_all() local
2805 for_each_console(con) in console_suspend_all()
2806 console_srcu_write_flags(con, con->flags | CON_SUSPENDED); in console_suspend_all()
2821 struct console *con; in console_resume_all() local
2832 for_each_console(con) in console_resume_all()
2833 console_srcu_write_flags(con, con->flags & ~CON_SUSPENDED); in console_resume_all()
3126 static bool console_emit_next_record(struct console *con, bool *handover, int cookie) in console_emit_next_record() argument
3128 bool is_extended = console_srcu_read_flags(con) & CON_EXTENDED; in console_emit_next_record()
3137 if (!printk_get_next_message(&pmsg, con->seq, is_extended, true)) in console_emit_next_record()
3140 con->dropped += pmsg.dropped; in console_emit_next_record()
3144 con->seq = pmsg.seq + 1; in console_emit_next_record()
3148 if (con->dropped && !is_extended) { in console_emit_next_record()
3149 console_prepend_dropped(&pmsg, con->dropped); in console_emit_next_record()
3150 con->dropped = 0; in console_emit_next_record()
3163 con->write(con, outbuf, pmsg.outbuf_len); in console_emit_next_record()
3164 con->seq = pmsg.seq + 1; in console_emit_next_record()
3183 con->write(con, outbuf, pmsg.outbuf_len); in console_emit_next_record()
3188 con->seq = pmsg.seq + 1; in console_emit_next_record()
3199 static bool console_emit_next_record(struct console *con, bool *handover, int cookie) in console_emit_next_record() argument
3239 struct console *con; in console_flush_one_record() local
3247 for_each_console_srcu(con) { in console_flush_one_record()
3248 short flags = console_srcu_read_flags(con); in console_flush_one_record()
3260 if (!console_is_usable(con, flags, !do_cond_resched)) in console_flush_one_record()
3265 progress = nbcon_legacy_emit_next_record(con, handover, cookie, in console_flush_one_record()
3268 progress = console_emit_next_record(con, handover, cookie); in console_flush_one_record()
3283 printk_seq = nbcon_seq_read(con); in console_flush_one_record()
3285 printk_seq = con->seq; in console_flush_one_record()
3659 struct console *con; in legacy_kthread_should_wakeup() local
3669 for_each_console_srcu(con) { in legacy_kthread_should_wakeup()
3670 short flags = console_srcu_read_flags(con); in legacy_kthread_should_wakeup()
3681 if (!console_is_usable(con, flags, false)) in legacy_kthread_should_wakeup()
3685 printk_seq = nbcon_seq_read(con); in legacy_kthread_should_wakeup()
3691 printk_seq = con->seq; in legacy_kthread_should_wakeup()
3761 struct console *con; in printk_kthreads_shutdown() local
3767 for_each_console(con) { in printk_kthreads_shutdown()
3768 if (con->flags & CON_NBCON) in printk_kthreads_shutdown()
3769 nbcon_kthread_stop(con); in printk_kthreads_shutdown()
3798 struct console *con; in printk_kthreads_check_locked() local
3815 hlist_for_each_entry_safe(con, tmp, &console_list, node) { in printk_kthreads_check_locked()
3816 if (con->flags & CON_NBCON) in printk_kthreads_check_locked()
3819 unregister_console_locked(con); in printk_kthreads_check_locked()
3843 hlist_for_each_entry_safe(con, tmp, &console_list, node) { in printk_kthreads_check_locked()
3844 if (!(con->flags & CON_NBCON)) in printk_kthreads_check_locked()
3847 if (!nbcon_kthread_create(con)) in printk_kthreads_check_locked()
3848 unregister_console_locked(con); in printk_kthreads_check_locked()
3961 struct console *con; in get_init_console_seq() local
4007 for_each_console(con) { in get_init_console_seq()
4010 if (!(con->flags & CON_BOOT) || in get_init_console_seq()
4011 !(con->flags & CON_ENABLED)) { in get_init_console_seq()
4015 if (con->flags & CON_NBCON) in get_init_console_seq()
4016 seq = nbcon_seq_read(con); in get_init_console_seq()
4018 seq = con->seq; in get_init_console_seq()
4061 struct console *con; in register_console() local
4068 for_each_console(con) { in register_console()
4069 if (WARN(con == newcon, "console '%s%d' already registered\n", in register_console()
4070 con->name, con->index)) { in register_console()
4074 if (con->flags & CON_BOOT) in register_console()
4218 hlist_for_each_entry_safe(con, tmp, &console_list, node) { in register_console()
4219 if (con->flags & CON_BOOT) in register_console()
4220 unregister_console_locked(con); in register_console()
4346 void console_force_preferred_locked(struct console *con) in console_force_preferred_locked() argument
4350 if (!console_is_registered_locked(con)) in console_force_preferred_locked()
4356 if (cur_pref_con == con) in console_force_preferred_locked()
4364 hlist_del_rcu(&con->node); in console_force_preferred_locked()
4373 con->flags |= CON_CONSDEV; in console_force_preferred_locked()
4374 WARN_ON(!con->device); in console_force_preferred_locked()
4378 hlist_add_head_rcu(&con->node, &console_list); in console_force_preferred_locked()
4434 struct console *con; in printk_late_init() local
4438 hlist_for_each_entry_safe(con, tmp, &console_list, node) { in printk_late_init()
4439 if (!(con->flags & CON_BOOT)) in printk_late_init()
4443 if (init_section_intersects(con, sizeof(*con)) || in printk_late_init()
4444 init_section_contains(con->write, 0) || in printk_late_init()
4445 init_section_contains(con->read, 0) || in printk_late_init()
4446 init_section_contains(con->device, 0) || in printk_late_init()
4447 init_section_contains(con->unblank, 0) || in printk_late_init()
4448 init_section_contains(con->data, 0)) { in printk_late_init()
4454 con->name, con->index); in printk_late_init()
4455 unregister_console_locked(con); in printk_late_init()
4473 static bool __pr_flush(struct console *con, int timeout_ms, bool reset_on_progress) in __pr_flush() argument
4525 if (con && con != c) in __pr_flush()