Lines Matching +full:console +full:- +full:size
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * internal.h - printk internal definitions
5 #include <linux/console.h>
20 (con->flags & CON_NBCON) ? "" : "legacy ", \
21 (con->flags & CON_BOOT) ? "boot" : "", \
22 con->name, con->index, ##__VA_ARGS__)
26 * true, all printing via console lock occurs within a dedicated
46 * the maximum size of a formatted record (i.e. with prefix added
51 /* the maximum size allowed to be reserved for a record */
56 /* always show on console, ignore console_loglevel */
103 u64 nbcon_seq_read(struct console *con);
104 void nbcon_seq_force(struct console *con, u64 seq);
105 bool nbcon_alloc(struct console *con);
106 void nbcon_free(struct console *con);
109 bool nbcon_legacy_emit_next_record(struct console *con, bool *handover,
111 bool nbcon_kthread_create(struct console *con);
112 void nbcon_kthread_stop(struct console *con);
116 * Check if the given console is currently capable and allowed to print
121 static inline bool console_is_usable(struct console *con, short flags, bool use_atomic) in console_is_usable()
131 if (use_atomic && !con->write_atomic) in console_is_usable()
141 if (!con->write) in console_is_usable()
146 * Console drivers may assume that per-cpu resources have been in console_is_usable()
157 * nbcon_kthread_wake - Wake up a console printing thread
158 * @con: Console to operate on
160 static inline void nbcon_kthread_wake(struct console *con) in nbcon_kthread_wake()
173 rcuwait_wake_up(&con->rcuwait); /* LMM(nbcon_kthread_wake:A) */ in nbcon_kthread_wake()
186 * semaphore and some of console functions (console_unlock()/etc.), so
187 * printk-safe must preserve the existing local IRQ guarantees.
195 static inline u64 nbcon_seq_read(struct console *con) { return 0; } in nbcon_seq_read()
196 static inline void nbcon_seq_force(struct console *con, u64 seq) { } in nbcon_seq_force()
197 static inline bool nbcon_alloc(struct console *con) { return false; } in nbcon_alloc()
198 static inline void nbcon_free(struct console *con) { } in nbcon_free()
201 static inline bool nbcon_legacy_emit_next_record(struct console *con, bool *handover, in nbcon_legacy_emit_next_record()
203 static inline void nbcon_kthread_wake(struct console *con) { } in nbcon_kthread_wake()
206 static inline bool console_is_usable(struct console *con, short flags, in console_is_usable()
217 * struct console_flush_type - Define available console flush methods
233 * Identify which console flushing methods should be used in the context of
244 ft->nbcon_offload = true; in printk_get_console_flush_type()
246 ft->nbcon_atomic = true; in printk_get_console_flush_type()
252 ft->legacy_direct = true; in printk_get_console_flush_type()
254 ft->legacy_offload = true; in printk_get_console_flush_type()
260 ft->nbcon_atomic = true; in printk_get_console_flush_type()
265 ft->legacy_direct = true; in printk_get_console_flush_type()
267 ft->legacy_offload = true; in printk_get_console_flush_type()
277 ft->nbcon_atomic = true; in printk_get_console_flush_type()
288 ft->legacy_direct = true; in printk_get_console_flush_type()
295 if (ft->nbcon_atomic && !legacy_allow_panic_sync) in printk_get_console_flush_type()
296 ft->legacy_direct = false; in printk_get_console_flush_type()
309 * struct printk_buffers - Buffers to read/format/output printk messages.
311 * @scratchbuf: Used as temporary ringbuffer reading and string-print space.
319 * struct printk_message - Container for a prepared printk message.
321 * @outbuf_len: The length of prepared text in @pbufs->outbuf to output. This
324 * @seq: The sequence number of the record used for @pbufs->outbuf.