Lines Matching full:console

2  *  linux/include/linux/console.h
42 * @owner: the module to get references of when this console is used
43 * @con_startup: set up the console and return its name (like VGA, EGA, ...)
44 * @con_init: initialize the console on @vc. @init is true for the very first
46 * @con_deinit: deinitialize the console from @vc.
54 * Invoked by csi_M and printing to the console.
55 * @con_switch: notifier about the console switch; it is supposed to return
57 * @con_blank: blank/unblank the console. The target mode is passed in @blank.
60 * @con_font_set: set console @vc font to @font with height @vpitch. @flags can
66 * @con_resize: resize the @vc console to @width x @height. @from_user is true
68 * @con_set_palette: sets the palette of the console @vc to @table (optional)
69 * @con_scrolldelta: the contents of the console should be scrolled by @lines.
81 * @con_debug_enter: prepare the console for the debugger. This includes, but
82 * is not limited to, unblanking the console, loading an
85 * @con_debug_leave: restore the console to its pre-debug state as closely as
131 extern const struct consw dummy_con; /* dummy console buffer */
132 extern const struct consw vga_con; /* VGA text console */
133 extern const struct consw newport_con; /* SGI Newport console */
155 * The interface for a console, or any other device that wants to capture
156 * console messages (printer driver?)
160 * enum cons_flags - General console flags
164 * @CON_CONSDEV: Indicates that the console driver is backing
165 * /dev/console.
166 * @CON_ENABLED: Indicates if a console is allowed to print records. If
167 * false, the console also will not advance to later
169 * @CON_BOOT: Marks the console driver as early console driver which
172 * when the real console driver is registered unless
175 * that the legacy @console::write callback can be invoked
182 * @CON_EXTENDED: The console supports the extended output format of
184 * @CON_SUSPENDED: Indicates if a console is suspended. If true, the
186 * @CON_NBCON: Console can operate outside of the legacy style console_lock
202 * struct nbcon_state - console state for nbcon consoles
207 * @unsafe: Console is busy in a non takeover region
209 * past. The console cannot be safe until re-initialized.
213 * state variable @console::nbcon_state.
234 * are stored in the @console::nbcon_state variable. Ensure this struct stays
241 * enum nbcon_prio - console owner priority for nbcon consoles
248 * A higher priority context can takeover the console when it is
260 struct console;
264 * struct nbcon_context - Context for console acquire/release
265 * @console: The associated console
270 * might cause a system freeze when the console
278 struct console *console; member
293 * @ctxt: The core console context
306 * struct console - The console descriptor structure
307 * @name: The name of the console driver
309 * @read: Read callback for console input (Optional)
311 * @unblank: Callback to unblank the console (Optional)
312 * @setup: Callback for initializing the console (Optional)
313 * @exit: Callback for teardown of the console (Optional)
314 * @match: Callback for matching a console (Optional)
315 * @flags: Console flags. See enum cons_flags
316 * @index: Console index, e.g. port number
323 * @node: hlist node for the console list
330 * @kthread: Printer kthread for this console
334 struct console { struct
336 void (*write)(struct console *co, const char *s, unsigned int count); argument
337 int (*read)(struct console *co, char *s, unsigned int count); argument
338 struct tty_driver *(*device)(struct console *co, int *index); argument
340 int (*setup)(struct console *co, char *options); argument
341 int (*exit)(struct console *co); argument
342 int (*match)(struct console *co, char *name, int idx, char *options); argument
353 /* nbcon console specific members */ argument
360 * This callback is called with the console already acquired. However,
367 * nbcon_enter_unsafe() will fail if the context has lost the console
382 * on the console ownership for synchronization.
384 void (*write_atomic)(struct console *con, struct nbcon_write_context *wctxt); argument
392 * device_lock() and the nbcon console acquired with
395 * The same rules for console ownership verification and unsafe
398 * The console ownership handling is necessary for synchronization
415 void (*write_thread)(struct console *con, struct nbcon_write_context *wctxt); argument
422 * Console drivers typically must deal with access to the hardware
433 * IMPORTANT: The callback MUST disable migration. The console driver
442 void (*device_lock)(struct console *con, unsigned long *flags); argument
458 void (*device_unlock)(struct console *con, unsigned long flags); argument
498 * console
499 * @con: struct console pointer of console to read flags from
506 * be a registered console. The purpose of holding console_srcu_read_lock is
507 * to guarantee that the console state is valid (CON_SUSPENDED/CON_ENABLED)
508 * and that no exit/cleanup routines will run if the console is currently
518 static inline short console_srcu_read_flags(const struct console *con) in console_srcu_read_flags()
530 * console_srcu_write_flags - Write flags for a registered console
531 * @con: struct console pointer of console to write flags to
539 static inline void console_srcu_write_flags(struct console *con, short flags) in console_srcu_write_flags()
548 static inline bool console_is_registered_locked(const struct console *con) in console_is_registered_locked()
555 * console_is_registered - Check if the console is registered
556 * @con: struct console pointer of console to check
558 * Context: Process context. May sleep while acquiring console list lock.
559 * Return: true if the console is in the console list, otherwise false.
561 * If false is returned for a console that was previously registered, it
562 * can be assumed that the console's unregistration is fully completed,
563 * including the exit() callback after console list removal.
565 static inline bool console_is_registered(const struct console *con) in console_is_registered()
577 * @con: struct console pointer used as loop cursor
579 * Although SRCU guarantees the console list will be consistent, the
580 * struct console fields may be updated by other CPUs while iterating.
591 * @con: struct console pointer used as loop cursor
593 * The console list and the &console.flags are immutable while iterating.
618 extern struct console *early_console;
626 extern void console_force_preferred_locked(struct console *con);
627 extern void register_console(struct console *);
628 extern int unregister_console(struct console *);
636 extern void console_stop(struct console *);
637 extern void console_start(struct console *);
639 extern int braille_register_console(struct console *, int index,
641 extern int braille_unregister_console(struct console *);
650 /* Suspend and resume console messages over PM events */
671 /* For deferred console takeover */