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 */
102 u64 nbcon_seq_read(struct console *con);
103 void nbcon_seq_force(struct console *con, u64 seq);
104 bool nbcon_alloc(struct console *con);
105 void nbcon_free(struct console *con);
108 bool nbcon_legacy_emit_next_record(struct console *con, bool *handover,
110 bool nbcon_kthread_create(struct console *con);
111 void nbcon_kthread_stop(struct console *con);
115 * Check if the given console is currently capable and allowed to print
120 static inline bool console_is_usable(struct console *con, short flags, bool use_atomic) in console_is_usable()
130 if (use_atomic && !con->write_atomic) in console_is_usable()
140 if (!con->write) in console_is_usable()
145 * Console drivers may assume that per-cpu resources have been in console_is_usable()
156 * nbcon_kthread_wake - Wake up a console printing thread
157 * @con: Console to operate on
159 static inline void nbcon_kthread_wake(struct console *con) in nbcon_kthread_wake()
172 rcuwait_wake_up(&con->rcuwait); /* LMM(nbcon_kthread_wake:A) */ in nbcon_kthread_wake()
185 * semaphore and some of console functions (console_unlock()/etc.), so
186 * printk-safe must preserve the existing local IRQ guarantees.
194 static inline u64 nbcon_seq_read(struct console *con) { return 0; } in nbcon_seq_read()
195 static inline void nbcon_seq_force(struct console *con, u64 seq) { } in nbcon_seq_force()
196 static inline bool nbcon_alloc(struct console *con) { return false; } in nbcon_alloc()
197 static inline void nbcon_free(struct console *con) { } in nbcon_free()
200 static inline bool nbcon_legacy_emit_next_record(struct console *con, bool *handover, in nbcon_legacy_emit_next_record()
202 static inline void nbcon_kthread_wake(struct console *con) { } in nbcon_kthread_wake()
205 static inline bool console_is_usable(struct console *con, short flags, in console_is_usable()
216 * struct console_flush_type - Define available console flush methods
232 * Identify which console flushing methods should be used in the context of
243 ft->nbcon_offload = true; in printk_get_console_flush_type()
245 ft->nbcon_atomic = true; in printk_get_console_flush_type()
251 ft->legacy_direct = true; in printk_get_console_flush_type()
253 ft->legacy_offload = true; in printk_get_console_flush_type()
259 ft->nbcon_atomic = true; in printk_get_console_flush_type()
264 ft->legacy_direct = true; in printk_get_console_flush_type()
266 ft->legacy_offload = true; in printk_get_console_flush_type()
276 ft->nbcon_atomic = true; in printk_get_console_flush_type()
287 ft->legacy_direct = true; in printk_get_console_flush_type()
294 if (ft->nbcon_atomic && !legacy_allow_panic_sync) in printk_get_console_flush_type()
295 ft->legacy_direct = false; in printk_get_console_flush_type()
308 * struct printk_buffers - Buffers to read/format/output printk messages.
310 * @scratchbuf: Used as temporary ringbuffer reading and string-print space.
318 * struct printk_message - Container for a prepared printk message.
320 * @outbuf_len: The length of prepared text in @pbufs->outbuf to output. This
323 * @seq: The sequence number of the record used for @pbufs->outbuf.