sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget*/translations/zh_CN/driver-api/tty/consolemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/driver-api/tty/consolemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/driver-api/tty/consolemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/driver-api/tty/consolemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/driver-api/tty/consolemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/driver-api/tty/consolemodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhD/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console.rsthKubhsection)}(hhh](htitle)}(hConsoleh]hConsole}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtopic)}(hhh]h bullet_list)}(hhh](h list_item)}(hhh](h paragraph)}(hhh]h reference)}(hhh]hStruct Console}(hhhhhNhNubah}(h]id2ah ]h"]h$]h&]refidstruct-consoleuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h)}(hhh]h Internals}(hhhhhNhNubah}(h]id3ah ]h"]h$]h&]refid internalsuh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh]h)}(hhh]h)}(hhh]h Struct Consw}(hj,hhhNhNubah}(h]id4ah ]h"]h$]h&]refid struct-conswuh1hhj)ubah}(h]h ]h"]h$]h&]uh1hhj&ubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hhh](h)}(hhh]h)}(hhh]hConsole functions}(hjNhhhNhNubah}(h]id5ah ]h"]h$]h&]refidconsole-functionsuh1hhjKubah}(h]h ]h"]h$]h&]uh1hhjHubh)}(hhh]h)}(hhh]h)}(hhh]h)}(hhh]h Internals}(hjmhhhNhNubah}(h]id6ah ]h"]h$]h&]refidid1uh1hhjjubah}(h]h ]h"]h$]h&]uh1hhjgubah}(h]h ]h"]h$]h&]uh1hhjdubah}(h]h ]h"]h$]h&]uh1hhjHubeh}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhNhNubah}(h]contentsah ](contentslocaleh"]contentsah$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hStruct Consoleh]hStruct Console}(hjhhhNhNubah}(h]h ]h"]h$]h&]refidhuh1hhjhhhhhK ubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlecons_flags (C enum) c.cons_flagshNtauh1jhjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h cons_flagsh]hdesc_signature_line)}(henum cons_flagsh](hdesc_sig_keyword)}(henumh]henum}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKubhdesc_sig_space)}(h h]h }(hjhhhNhNubah}(h]h ]wah"]h$]h&]uh1jhjhhhjhKubh desc_name)}(h cons_flagsh]h desc_sig_name)}(hjh]h cons_flags}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhjhKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhjhKhjhhubh desc_content)}(hhh]h)}(hGeneral console flagsh]hGeneral console flags}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhj0hhubah}(h]h ]h"]h$]h&]uh1j.hjhhhjhKubeh}(h]h ](cenumeh"]h$]h&]domainjKobjtypejLdesctypejLnoindex noindexentrynocontentsentryuh1jhhhjhNhNubh container)}(hX**Constants** ``CON_PRINTBUFFER`` Used by newly registered consoles to avoid duplicate output of messages that were already shown by boot consoles or read by userspace via syslog() syscall. ``CON_CONSDEV`` Indicates that the console driver is backing /dev/console. ``CON_ENABLED`` Indicates if a console is allowed to print records. If false, the console also will not advance to later records. ``CON_BOOT`` Marks the console driver as early console driver which is used during boot before the real driver becomes available. It will be automatically unregistered when the real console driver is registered unless "keep_bootcon" parameter is used. ``CON_ANYTIME`` A misnomed historical flag which tells the core code that the legacy **console**::write callback can be invoked on a CPU which is marked OFFLINE. That is misleading as it suggests that there is no contextual limit for invoking the callback. The original motivation was readiness of the per-CPU areas. ``CON_BRL`` Indicates a braille device which is exempt from receiving the printk spam for obvious reasons. ``CON_EXTENDED`` The console supports the extended output format of /dev/kmesg which requires a larger output buffer. ``CON_SUSPENDED`` Indicates if a console is suspended. If true, the printing callbacks must not be called. ``CON_NBCON`` Console can operate outside of the legacy style console_lock constraints.h](h)}(h **Constants**h]hstrong)}(hj^h]h Constants}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj\ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjXubhdefinition_list)}(hhh](hdefinition_list_item)}(h``CON_PRINTBUFFER`` Used by newly registered consoles to avoid duplicate output of messages that were already shown by boot consoles or read by userspace via syslog() syscall. h](hterm)}(h``CON_PRINTBUFFER``h]hliteral)}(hjh]hCON_PRINTBUFFER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhj}ubh definition)}(hhh]h)}(hUsed by newly registered consoles to avoid duplicate output of messages that were already shown by boot consoles or read by userspace via syslog() syscall.h]hUsed by newly registered consoles to avoid duplicate output of messages that were already shown by boot consoles or read by userspace via syslog() syscall.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjxubj|)}(hK``CON_CONSDEV`` Indicates that the console driver is backing /dev/console. h](j)}(h``CON_CONSDEV``h]j)}(hjh]h CON_CONSDEV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubj)}(hhh]h)}(h:Indicates that the console driver is backing /dev/console.h]h:Indicates that the console driver is backing /dev/console.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjxubj|)}(h``CON_ENABLED`` Indicates if a console is allowed to print records. If false, the console also will not advance to later records. h](j)}(h``CON_ENABLED``h]j)}(hjh]h CON_ENABLED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubj)}(hhh]h)}(hqIndicates if a console is allowed to print records. If false, the console also will not advance to later records.h]hqIndicates if a console is allowed to print records. If false, the console also will not advance to later records.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjxubj|)}(h``CON_BOOT`` Marks the console driver as early console driver which is used during boot before the real driver becomes available. It will be automatically unregistered when the real console driver is registered unless "keep_bootcon" parameter is used. h](j)}(h ``CON_BOOT``h]j)}(hj7h]hCON_BOOT}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhj1ubj)}(hhh]h)}(hMarks the console driver as early console driver which is used during boot before the real driver becomes available. It will be automatically unregistered when the real console driver is registered unless "keep_bootcon" parameter is used.h]hMarks the console driver as early console driver which is used during boot before the real driver becomes available. It will be automatically unregistered when the real console driver is registered unless “keep_bootcon” parameter is used.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjMubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1j{hjLhKhjxubj|)}(hX=``CON_ANYTIME`` A misnomed historical flag which tells the core code that the legacy **console**::write callback can be invoked on a CPU which is marked OFFLINE. That is misleading as it suggests that there is no contextual limit for invoking the callback. The original motivation was readiness of the per-CPU areas. h](j)}(h``CON_ANYTIME``h]j)}(hjqh]h CON_ANYTIME}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjkubj)}(hhh]h)}(hX,A misnomed historical flag which tells the core code that the legacy **console**::write callback can be invoked on a CPU which is marked OFFLINE. That is misleading as it suggests that there is no contextual limit for invoking the callback. The original motivation was readiness of the per-CPU areas.h](hEA misnomed historical flag which tells the core code that the legacy }(hjhhhNhNubja)}(h **console**h]hconsole}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh::write callback can be invoked on a CPU which is marked OFFLINE. That is misleading as it suggests that there is no contextual limit for invoking the callback. The original motivation was readiness of the per-CPU areas.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjxubj|)}(hk``CON_BRL`` Indicates a braille device which is exempt from receiving the printk spam for obvious reasons. h](j)}(h ``CON_BRL``h]j)}(hjh]hCON_BRL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubj)}(hhh]h)}(h^Indicates a braille device which is exempt from receiving the printk spam for obvious reasons.h]h^Indicates a braille device which is exempt from receiving the printk spam for obvious reasons.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjxubj|)}(hv``CON_EXTENDED`` The console supports the extended output format of /dev/kmesg which requires a larger output buffer. h](j)}(h``CON_EXTENDED``h]j)}(hjh]h CON_EXTENDED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjubj)}(hhh]h)}(hdThe console supports the extended output format of /dev/kmesg which requires a larger output buffer.h]hdThe console supports the extended output format of /dev/kmesg which requires a larger output buffer.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hj hKhjxubj|)}(hk``CON_SUSPENDED`` Indicates if a console is suspended. If true, the printing callbacks must not be called. h](j)}(h``CON_SUSPENDED``h]j)}(hj1h]h CON_SUSPENDED}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhj+ubj)}(hhh]h)}(hXIndicates if a console is suspended. If true, the printing callbacks must not be called.h]hXIndicates if a console is suspended. If true, the printing callbacks must not be called.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjGubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1j{hjFhKhjxubj|)}(hW``CON_NBCON`` Console can operate outside of the legacy style console_lock constraints.h](j)}(h ``CON_NBCON``h]j)}(hjkh]h CON_NBCON}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKhjeubj)}(hhh]h)}(hIConsole can operate outside of the legacy style console_lock constraints.h]hIConsole can operate outside of the legacy style console_lock constraints.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjeubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjxubeh}(h]h ]h"]h$]h&]uh1jvhjXubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhjhhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jconsole (C struct) c.consolehNtauh1jhjhhhNhNubj)}(hhh](j)}(hconsoleh]j)}(hstruct consoleh](j)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(hconsoleh]j)}(hjh]hconsole}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hjhhhjhKubah}(h]jah ](j&j'eh"]h$]h&]j+j,)j-huh1jhjhKhjhhubj/)}(hhh]h)}(h The console descriptor structureh]h The console descriptor structure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM2hjhhubah}(h]h ]h"]h$]h&]uh1j.hjhhhjhKubeh}(h]h ](jKstructeh"]h$]h&]jPjKjQjjRjjSjTjUuh1jhhhjhNhNubjW)}(hX/**Definition**:: struct console { char name[16]; void (*write)(struct console *co, const char *s, unsigned int count); int (*read)(struct console *co, char *s, unsigned int count); struct tty_driver *(*device)(struct console *co, int *index); void (*unblank)(void); int (*setup)(struct console *co, char *options); int (*exit)(struct console *co); int (*match)(struct console *co, char *name, int idx, char *options); short flags; short index; int cflag; uint ispeed; uint ospeed; u64 seq; unsigned long dropped; void *data; struct hlist_node node; void (*write_atomic)(struct console *con, struct nbcon_write_context *wctxt); void (*write_thread)(struct console *con, struct nbcon_write_context *wctxt); void (*device_lock)(struct console *con, unsigned long *flags); void (*device_unlock)(struct console *con, unsigned long flags); atomic_t __private nbcon_state; atomic_long_t __private nbcon_seq; struct nbcon_context __private nbcon_device_ctxt; atomic_long_t __private nbcon_prev_seq; struct printk_buffers *pbufs; struct task_struct *kthread; struct rcuwait rcuwait; struct irq_work irq_work; }; **Members** ``name`` The name of the console driver ``write`` Legacy write callback to output messages (Optional) ``read`` Read callback for console input (Optional) ``device`` The underlying TTY device driver (Optional) ``unblank`` Callback to unblank the console (Optional) ``setup`` Callback for initializing the console (Optional) ``exit`` Callback for teardown of the console (Optional) ``match`` Callback for matching a console (Optional) ``flags`` Console flags. See enum cons_flags ``index`` Console index, e.g. port number ``cflag`` TTY control mode flags ``ispeed`` TTY input speed ``ospeed`` TTY output speed ``seq`` Sequence number of the next ringbuffer record to print ``dropped`` Number of unreported dropped ringbuffer records ``data`` Driver private data ``node`` hlist node for the console list ``write_atomic`` NBCON callback to write out text in any context. (Optional) This callback is called with the console already acquired. However, a higher priority context is allowed to take it over by default. The callback must call nbcon_enter_unsafe() and nbcon_exit_unsafe() around any code where the takeover is not safe, for example, when manipulating the serial port registers. nbcon_enter_unsafe() will fail if the context has lost the console ownership in the meantime. In this case, the callback is no longer allowed to go forward. It must back out immediately and carefully. The buffer content is also no longer trusted since it no longer belongs to the context. The callback should allow the takeover whenever it is safe. It increases the chance to see messages when the system is in trouble. If the driver must reacquire ownership in order to finalize or revert hardware changes, nbcon_reacquire_nobuf() can be used. However, on reacquire the buffer content is no longer available. A reacquire cannot be used to resume printing. The callback can be called from any context (including NMI). Therefore it must avoid usage of any locking and instead rely on the console ownership for synchronization. ``write_thread`` NBCON callback to write out text in task context. This callback must be called only in task context with both device_lock() and the nbcon console acquired with NBCON_PRIO_NORMAL. The same rules for console ownership verification and unsafe sections handling applies as with write_atomic(). The console ownership handling is necessary for synchronization against write_atomic() which is synchronized only via the context. The device_lock() provides the primary serialization for operations on the device. It might be as relaxed (mutex)[*] or as tight (disabled preemption and interrupts) as needed. It allows the kthread to operate in the least restrictive mode[**]. [*] Standalone nbcon_context_try_acquire() is not safe with the preemption enabled, see nbcon_owner_matches(). But it can be safe when always called in the preemptive context under the device_lock(). [**] The device_lock() makes sure that nbcon_context_try_acquire() would never need to spin which is important especially with PREEMPT_RT. ``device_lock`` NBCON callback to begin synchronization with driver code. Console drivers typically must deal with access to the hardware via user input/output (such as an interactive login shell) and output of kernel messages via printk() calls. This callback is called by the printk-subsystem whenever it needs to synchronize with hardware access by the driver. It should be implemented to use whatever synchronization mechanism the driver is using for itself (for example, the port lock for uart serial consoles). The callback is always called from task context. It may use any synchronization method required by the driver. IMPORTANT: The callback MUST disable migration. The console driver may be using a synchronization mechanism that already takes care of this (such as spinlocks). Otherwise this function must explicitly call migrate_disable(). The flags argument is provided as a convenience to the driver. It will be passed again to device_unlock(). It can be ignored if the driver does not need it. ``device_unlock`` NBCON callback to finish synchronization with driver code. It is the counterpart to device_lock(). This callback is always called from task context. It must appropriately re-enable migration (depending on how device_lock() disabled migration). The flags argument is the value of the same variable that was passed to device_lock(). ``nbcon_state`` State for nbcon consoles ``nbcon_seq`` Sequence number of the next record for nbcon to print ``nbcon_device_ctxt`` Context available for non-printing operations ``nbcon_prev_seq`` Seq num the previous nbcon owner was assigned to print ``pbufs`` Pointer to nbcon private buffer ``kthread`` Printer kthread for this console ``rcuwait`` RCU-safe wait object for **kthread** waking ``irq_work`` Defer **kthread** waking to IRQ work contexth](h)}(h**Definition**::h](ja)}(h**Definition**h]h Definition}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj'ubh:}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM6hj#ubh literal_block)}(hXstruct console { char name[16]; void (*write)(struct console *co, const char *s, unsigned int count); int (*read)(struct console *co, char *s, unsigned int count); struct tty_driver *(*device)(struct console *co, int *index); void (*unblank)(void); int (*setup)(struct console *co, char *options); int (*exit)(struct console *co); int (*match)(struct console *co, char *name, int idx, char *options); short flags; short index; int cflag; uint ispeed; uint ospeed; u64 seq; unsigned long dropped; void *data; struct hlist_node node; void (*write_atomic)(struct console *con, struct nbcon_write_context *wctxt); void (*write_thread)(struct console *con, struct nbcon_write_context *wctxt); void (*device_lock)(struct console *con, unsigned long *flags); void (*device_unlock)(struct console *con, unsigned long flags); atomic_t __private nbcon_state; atomic_long_t __private nbcon_seq; struct nbcon_context __private nbcon_device_ctxt; atomic_long_t __private nbcon_prev_seq; struct printk_buffers *pbufs; struct task_struct *kthread; struct rcuwait rcuwait; struct irq_work irq_work; };h]hXstruct console { char name[16]; void (*write)(struct console *co, const char *s, unsigned int count); int (*read)(struct console *co, char *s, unsigned int count); struct tty_driver *(*device)(struct console *co, int *index); void (*unblank)(void); int (*setup)(struct console *co, char *options); int (*exit)(struct console *co); int (*match)(struct console *co, char *name, int idx, char *options); short flags; short index; int cflag; uint ispeed; uint ospeed; u64 seq; unsigned long dropped; void *data; struct hlist_node node; void (*write_atomic)(struct console *con, struct nbcon_write_context *wctxt); void (*write_thread)(struct console *con, struct nbcon_write_context *wctxt); void (*device_lock)(struct console *con, unsigned long *flags); void (*device_unlock)(struct console *con, unsigned long flags); atomic_t __private nbcon_state; atomic_long_t __private nbcon_seq; struct nbcon_context __private nbcon_device_ctxt; atomic_long_t __private nbcon_prev_seq; struct printk_buffers *pbufs; struct task_struct *kthread; struct rcuwait rcuwait; struct irq_work irq_work; };}hjFsbah}(h]h ]h"]h$]h&]hhuh1jDh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM8hj#ubh)}(h **Members**h]ja)}(hjWh]hMembers}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjUubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMXhj#ubjw)}(hhh](j|)}(h(``name`` The name of the console driver h](j)}(h``name``h]j)}(hjvh]hname}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM4hjpubj)}(hhh]h)}(hThe name of the console driverh]hThe name of the console driver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM4hjubah}(h]h ]h"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]uh1j{hjhM4hjmubj|)}(h>``write`` Legacy write callback to output messages (Optional) h](j)}(h ``write``h]j)}(hjh]hwrite}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM5hjubj)}(hhh]h)}(h3Legacy write callback to output messages (Optional)h]h3Legacy write callback to output messages (Optional)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM5hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM5hjmubj|)}(h4``read`` Read callback for console input (Optional) h](j)}(h``read``h]j)}(hjh]hread}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM6hjubj)}(hhh]h)}(h*Read callback for console input (Optional)h]h*Read callback for console input (Optional)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM6hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM6hjmubj|)}(h7``device`` The underlying TTY device driver (Optional) h](j)}(h ``device``h]j)}(hj!h]hdevice}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM7hjubj)}(hhh]h)}(h+The underlying TTY device driver (Optional)h]h+The underlying TTY device driver (Optional)}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hM7hj7ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hj6hM7hjmubj|)}(h7``unblank`` Callback to unblank the console (Optional) h](j)}(h ``unblank``h]j)}(hjZh]hunblank}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM8hjTubj)}(hhh]h)}(h*Callback to unblank the console (Optional)h]h*Callback to unblank the console (Optional)}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohM8hjpubah}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]uh1j{hjohM8hjmubj|)}(h;``setup`` Callback for initializing the console (Optional) h](j)}(h ``setup``h]j)}(hjh]hsetup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM9hjubj)}(hhh]h)}(h0Callback for initializing the console (Optional)h]h0Callback for initializing the console (Optional)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM9hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM9hjmubj|)}(h9``exit`` Callback for teardown of the console (Optional) h](j)}(h``exit``h]j)}(hjh]hexit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM:hjubj)}(hhh]h)}(h/Callback for teardown of the console (Optional)h]h/Callback for teardown of the console (Optional)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM:hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM:hjmubj|)}(h5``match`` Callback for matching a console (Optional) h](j)}(h ``match``h]j)}(hjh]hmatch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM;hjubj)}(hhh]h)}(h*Callback for matching a console (Optional)h]h*Callback for matching a console (Optional)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM;hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM;hjmubj|)}(h-``flags`` Console flags. See enum cons_flags h](j)}(h ``flags``h]j)}(hj>h]hflags}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM<hj8ubj)}(hhh]h)}(h"Console flags. See enum cons_flagsh]h"Console flags. See enum cons_flags}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShM<hjTubah}(h]h ]h"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]uh1j{hjShM<hjmubj|)}(h*``index`` Console index, e.g. port number h](j)}(h ``index``h]j)}(hjwh]hindex}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM=hjqubj)}(hhh]h)}(hConsole index, e.g. port numberh]hConsole index, e.g. port number}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM=hjubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1j{hjhM=hjmubj|)}(h!``cflag`` TTY control mode flags h](j)}(h ``cflag``h]j)}(hjh]hcflag}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM>hjubj)}(hhh]h)}(hTTY control mode flagsh]hTTY control mode flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM>hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM>hjmubj|)}(h``ispeed`` TTY input speed h](j)}(h ``ispeed``h]j)}(hjh]hispeed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM?hjubj)}(hhh]h)}(hTTY input speedh]hTTY input speed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM?hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM?hjmubj|)}(h``ospeed`` TTY output speed h](j)}(h ``ospeed``h]j)}(hj"h]hospeed}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM@hjubj)}(hhh]h)}(hTTY output speedh]hTTY output speed}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hM@hj8ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hj7hM@hjmubj|)}(h?``seq`` Sequence number of the next ringbuffer record to print h](j)}(h``seq``h]j)}(hj[h]hseq}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMAhjUubj)}(hhh]h)}(h6Sequence number of the next ringbuffer record to printh]h6Sequence number of the next ringbuffer record to print}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphMAhjqubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]uh1j{hjphMAhjmubj|)}(h<``dropped`` Number of unreported dropped ringbuffer records h](j)}(h ``dropped``h]j)}(hjh]hdropped}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMBhjubj)}(hhh]h)}(h/Number of unreported dropped ringbuffer recordsh]h/Number of unreported dropped ringbuffer records}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMBhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhMBhjmubj|)}(h``data`` Driver private data h](j)}(h``data``h]j)}(hjh]hdata}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMChjubj)}(hhh]h)}(hDriver private datah]hDriver private data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMChjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhMChjmubj|)}(h)``node`` hlist node for the console list h](j)}(h``node``h]j)}(hj h]hnode}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMDhj ubj)}(hhh]h)}(hhlist node for the console listh]hhlist node for the console list}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMDhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMDhjmubj|)}(hX``write_atomic`` NBCON callback to write out text in any context. (Optional) This callback is called with the console already acquired. However, a higher priority context is allowed to take it over by default. The callback must call nbcon_enter_unsafe() and nbcon_exit_unsafe() around any code where the takeover is not safe, for example, when manipulating the serial port registers. nbcon_enter_unsafe() will fail if the context has lost the console ownership in the meantime. In this case, the callback is no longer allowed to go forward. It must back out immediately and carefully. The buffer content is also no longer trusted since it no longer belongs to the context. The callback should allow the takeover whenever it is safe. It increases the chance to see messages when the system is in trouble. If the driver must reacquire ownership in order to finalize or revert hardware changes, nbcon_reacquire_nobuf() can be used. However, on reacquire the buffer content is no longer available. A reacquire cannot be used to resume printing. The callback can be called from any context (including NMI). Therefore it must avoid usage of any locking and instead rely on the console ownership for synchronization. h](j)}(h``write_atomic``h]j)}(hj? h]h write_atomic}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj= ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM}hj9 ubj)}(hhh](h)}(h;NBCON callback to write out text in any context. (Optional)h]h;NBCON callback to write out text in any context. (Optional)}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMehjU ubh)}(hThis callback is called with the console already acquired. However, a higher priority context is allowed to take it over by default.h]hThis callback is called with the console already acquired. However, a higher priority context is allowed to take it over by default.}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMghjU ubh)}(hThe callback must call nbcon_enter_unsafe() and nbcon_exit_unsafe() around any code where the takeover is not safe, for example, when manipulating the serial port registers.h]hThe callback must call nbcon_enter_unsafe() and nbcon_exit_unsafe() around any code where the takeover is not safe, for example, when manipulating the serial port registers.}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMjhjU ubh)}(hX nbcon_enter_unsafe() will fail if the context has lost the console ownership in the meantime. In this case, the callback is no longer allowed to go forward. It must back out immediately and carefully. The buffer content is also no longer trusted since it no longer belongs to the context.h]hX nbcon_enter_unsafe() will fail if the context has lost the console ownership in the meantime. In this case, the callback is no longer allowed to go forward. It must back out immediately and carefully. The buffer content is also no longer trusted since it no longer belongs to the context.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMnhjU ubh)}(hXoThe callback should allow the takeover whenever it is safe. It increases the chance to see messages when the system is in trouble. If the driver must reacquire ownership in order to finalize or revert hardware changes, nbcon_reacquire_nobuf() can be used. However, on reacquire the buffer content is no longer available. A reacquire cannot be used to resume printing.h]hXoThe callback should allow the takeover whenever it is safe. It increases the chance to see messages when the system is in trouble. If the driver must reacquire ownership in order to finalize or revert hardware changes, nbcon_reacquire_nobuf() can be used. However, on reacquire the buffer content is no longer available. A reacquire cannot be used to resume printing.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMthjU ubh)}(hThe callback can be called from any context (including NMI). Therefore it must avoid usage of any locking and instead rely on the console ownership for synchronization.h]hThe callback can be called from any context (including NMI). Therefore it must avoid usage of any locking and instead rely on the console ownership for synchronization.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhM{hjU ubeh}(h]h ]h"]h$]h&]uh1jhj9 ubeh}(h]h ]h"]h$]h&]uh1j{hjT hM}hjmubj|)}(hX``write_thread`` NBCON callback to write out text in task context. This callback must be called only in task context with both device_lock() and the nbcon console acquired with NBCON_PRIO_NORMAL. The same rules for console ownership verification and unsafe sections handling applies as with write_atomic(). The console ownership handling is necessary for synchronization against write_atomic() which is synchronized only via the context. The device_lock() provides the primary serialization for operations on the device. It might be as relaxed (mutex)[*] or as tight (disabled preemption and interrupts) as needed. It allows the kthread to operate in the least restrictive mode[**]. [*] Standalone nbcon_context_try_acquire() is not safe with the preemption enabled, see nbcon_owner_matches(). But it can be safe when always called in the preemptive context under the device_lock(). [**] The device_lock() makes sure that nbcon_context_try_acquire() would never need to spin which is important especially with PREEMPT_RT. h](j)}(h``write_thread``h]j)}(hj h]h write_thread}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubj)}(hhh](h)}(h1NBCON callback to write out text in task context.h]h1NBCON callback to write out text in task context.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubh)}(hThis callback must be called only in task context with both device_lock() and the nbcon console acquired with NBCON_PRIO_NORMAL.h]hThis callback must be called only in task context with both device_lock() and the nbcon console acquired with NBCON_PRIO_NORMAL.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubh)}(hnThe same rules for console ownership verification and unsafe sections handling applies as with write_atomic().h]hnThe same rules for console ownership verification and unsafe sections handling applies as with write_atomic().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubh)}(hThe console ownership handling is necessary for synchronization against write_atomic() which is synchronized only via the context.h]hThe console ownership handling is necessary for synchronization against write_atomic() which is synchronized only via the context.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubh)}(hThe device_lock() provides the primary serialization for operations on the device. It might be as relaxed (mutex)[*] or as tight (disabled preemption and interrupts) as needed. It allows the kthread to operate in the least restrictive mode[**].h]hThe device_lock() provides the primary serialization for operations on the device. It might be as relaxed (mutex)[*] or as tight (disabled preemption and interrupts) as needed. It allows the kthread to operate in the least restrictive mode[**].}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubjw)}(hhh](j|)}(h[*] Standalone nbcon_context_try_acquire() is not safe with the preemption enabled, see nbcon_owner_matches(). But it can be safe when always called in the preemptive context under the device_lock(). h](j)}(h;[*] Standalone nbcon_context_try_acquire() is not safe withh]h;[*] Standalone nbcon_context_try_acquire() is not safe with}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj+ ubj)}(hhh]h)}(hthe preemption enabled, see nbcon_owner_matches(). But it can be safe when always called in the preemptive context under the device_lock().h]hthe preemption enabled, see nbcon_owner_matches(). But it can be safe when always called in the preemptive context under the device_lock().}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj> ubah}(h]h ]h"]h$]h&]uh1jhj+ ubeh}(h]h ]h"]h$]h&]uh1j{hj= hMhj( ubj|)}(h[**] The device_lock() makes sure that nbcon_context_try_acquire() would never need to spin which is important especially with PREEMPT_RT. h](j)}(hB[**] The device_lock() makes sure that nbcon_context_try_acquire()h]hB[**] The device_lock() makes sure that nbcon_context_try_acquire()}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj hMhj\ ubj)}(hhh]h)}(hGwould never need to spin which is important especially with PREEMPT_RT.h]hGwould never need to spin which is important especially with PREEMPT_RT.}(hjq hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhjn ubah}(h]h ]h"]h$]h&]uh1jhj\ ubeh}(h]h ]h"]h$]h&]uh1j{hj hMhj( ubeh}(h]h ]h"]h$]h&]uh1jvhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMhjmubj|)}(hX``device_lock`` NBCON callback to begin synchronization with driver code. Console drivers typically must deal with access to the hardware via user input/output (such as an interactive login shell) and output of kernel messages via printk() calls. This callback is called by the printk-subsystem whenever it needs to synchronize with hardware access by the driver. It should be implemented to use whatever synchronization mechanism the driver is using for itself (for example, the port lock for uart serial consoles). The callback is always called from task context. It may use any synchronization method required by the driver. IMPORTANT: The callback MUST disable migration. The console driver may be using a synchronization mechanism that already takes care of this (such as spinlocks). Otherwise this function must explicitly call migrate_disable(). The flags argument is provided as a convenience to the driver. It will be passed again to device_unlock(). It can be ignored if the driver does not need it. h](j)}(h``device_lock``h]j)}(hj h]h device_lock}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubj)}(hhh](h)}(h9NBCON callback to begin synchronization with driver code.h]h9NBCON callback to begin synchronization with driver code.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubh)}(hXConsole drivers typically must deal with access to the hardware via user input/output (such as an interactive login shell) and output of kernel messages via printk() calls. This callback is called by the printk-subsystem whenever it needs to synchronize with hardware access by the driver. It should be implemented to use whatever synchronization mechanism the driver is using for itself (for example, the port lock for uart serial consoles).h]hXConsole drivers typically must deal with access to the hardware via user input/output (such as an interactive login shell) and output of kernel messages via printk() calls. This callback is called by the printk-subsystem whenever it needs to synchronize with hardware access by the driver. It should be implemented to use whatever synchronization mechanism the driver is using for itself (for example, the port lock for uart serial consoles).}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubh)}(hnThe callback is always called from task context. It may use any synchronization method required by the driver.h]hnThe callback is always called from task context. It may use any synchronization method required by the driver.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubjw)}(hhh]j|)}(hIMPORTANT: The callback MUST disable migration. The console driver may be using a synchronization mechanism that already takes care of this (such as spinlocks). Otherwise this function must explicitly call migrate_disable(). h](j)}(hBIMPORTANT: The callback MUST disable migration. The console driverh]hBIMPORTANT: The callback MUST disable migration. The console driver}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubj)}(hhh]h)}(hmay be using a synchronization mechanism that already takes care of this (such as spinlocks). Otherwise this function must explicitly call migrate_disable().h]hmay be using a synchronization mechanism that already takes care of this (such as spinlocks). Otherwise this function must explicitly call migrate_disable().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMhj ubah}(h]h ]h"]h$]h&]uh1jvhj ubh)}(hThe flags argument is provided as a convenience to the driver. It will be passed again to device_unlock(). It can be ignored if the driver does not need it.h]hThe flags argument is provided as a convenience to the driver. It will be passed again to device_unlock(). It can be ignored if the driver does not need it.}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMhjmubj|)}(hX```device_unlock`` NBCON callback to finish synchronization with driver code. It is the counterpart to device_lock(). This callback is always called from task context. It must appropriately re-enable migration (depending on how device_lock() disabled migration). The flags argument is the value of the same variable that was passed to device_lock(). h](j)}(h``device_unlock``h]j)}(hjE h]h device_unlock}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjC ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj? ubj)}(hhh](h)}(h:NBCON callback to finish synchronization with driver code.h]h:NBCON callback to finish synchronization with driver code.}(hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj[ ubh)}(h'It is the counterpart to device_lock().h]h'It is the counterpart to device_lock().}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj[ ubh)}(hThis callback is always called from task context. It must appropriately re-enable migration (depending on how device_lock() disabled migration).h]hThis callback is always called from task context. It must appropriately re-enable migration (depending on how device_lock() disabled migration).}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj[ ubh)}(hVThe flags argument is the value of the same variable that was passed to device_lock().h]hVThe flags argument is the value of the same variable that was passed to device_lock().}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMhj[ ubeh}(h]h ]h"]h$]h&]uh1jhj? ubeh}(h]h ]h"]h$]h&]uh1j{hjZ hMhjmubj|)}(h)``nbcon_state`` State for nbcon consoles h](j)}(h``nbcon_state``h]j)}(hj h]h nbcon_state}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMFhj ubj)}(hhh]h)}(hState for nbcon consolesh]hState for nbcon consoles}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMFhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMFhjmubj|)}(hD``nbcon_seq`` Sequence number of the next record for nbcon to print h](j)}(h ``nbcon_seq``h]j)}(hj h]h nbcon_seq}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMGhj ubj)}(hhh]h)}(h5Sequence number of the next record for nbcon to printh]h5Sequence number of the next record for nbcon to print}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMGhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMGhjmubj|)}(hD``nbcon_device_ctxt`` Context available for non-printing operations h](j)}(h``nbcon_device_ctxt``h]j)}(hj h]hnbcon_device_ctxt}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMHhj ubj)}(hhh]h)}(h-Context available for non-printing operationsh]h-Context available for non-printing operations}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3 hMHhj4 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj3 hMHhjmubj|)}(hJ``nbcon_prev_seq`` Seq num the previous nbcon owner was assigned to print h](j)}(h``nbcon_prev_seq``h]j)}(hjW h]hnbcon_prev_seq}(hjY hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMIhjQ ubj)}(hhh]h)}(h6Seq num the previous nbcon owner was assigned to printh]h6Seq num the previous nbcon owner was assigned to print}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjl hMIhjm ubah}(h]h ]h"]h$]h&]uh1jhjQ ubeh}(h]h ]h"]h$]h&]uh1j{hjl hMIhjmubj|)}(h*``pbufs`` Pointer to nbcon private buffer h](j)}(h ``pbufs``h]j)}(hj h]hpbufs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMJhj ubj)}(hhh]h)}(hPointer to nbcon private bufferh]hPointer to nbcon private buffer}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMJhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMJhjmubj|)}(h-``kthread`` Printer kthread for this console h](j)}(h ``kthread``h]j)}(hj h]hkthread}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMKhj ubj)}(hhh]h)}(h Printer kthread for this consoleh]h Printer kthread for this console}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMKhjmubj|)}(h8``rcuwait`` RCU-safe wait object for **kthread** waking h](j)}(h ``rcuwait``h]j)}(hj h]hrcuwait}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMLhj ubj)}(hhh]h)}(h+RCU-safe wait object for **kthread** wakingh](hRCU-safe wait object for }(hj hhhNhNubja)}(h **kthread**h]hkthread}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj ubh waking}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj hMLhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hMLhjmubj|)}(h9``irq_work`` Defer **kthread** waking to IRQ work contexth](j)}(h ``irq_work``h]j)}(hjM h]hirq_work}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjK ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMLhjG ubj)}(hhh]h)}(h,Defer **kthread** waking to IRQ work contexth](hDefer }(hjf hhhNhNubja)}(h **kthread**h]hkthread}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjf ubh waking to IRQ work context}(hjf hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:12: ./include/linux/console.hhMMhjc ubah}(h]h ]h"]h$]h&]uh1jhjG ubeh}(h]h ]h"]h$]h&]uh1j{hjb hMLhjmubeh}(h]h ]h"]h$]h&]uh1jvhj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhjhhhNhNubh)}(hhh](h)}(h Internalsh]h Internals}(hj hhhNhNubah}(h]h ]h"]h$]h&]jjuh1hhj hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnbcon_state (C struct) c.nbcon_statehNtauh1jhj hhhNhNubj)}(hhh](j)}(h nbcon_stateh]j)}(hstruct nbcon_stateh](j)}(hjh]hstruct}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj hKubj)}(h nbcon_stateh]j)}(hj h]h nbcon_state}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hKubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hj hhhj hKubah}(h]j ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj hKhj hhubj/)}(hhh]h)}(h console state for nbcon consolesh]h console state for nbcon consoles}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj hhubah}(h]h ]h"]h$]h&]uh1j.hj hhhj hKubeh}(h]h ](jKstructeh"]h$]h&]jPjKjQj$jRj$jSjTjUuh1jhhhj hNhNubjW)}(hX`**Definition**:: struct nbcon_state { union { unsigned int atom; struct { unsigned int prio : 2; unsigned int req_prio : 2; unsigned int unsafe : 1; unsigned int unsafe_takeover : 1; unsigned int cpu : 24; }; }; }; **Members** ``{unnamed_union}`` anonymous ``atom`` Compound of the state fields for atomic operations ``{unnamed_struct}`` anonymous ``prio`` The priority of the current owner ``req_prio`` The priority of a handover request ``unsafe`` Console is busy in a non takeover region ``unsafe_takeover`` A hostile takeover in an unsafe state happened in the past. The console cannot be safe until re-initialized. ``cpu`` The CPU on which the owner runsh](h)}(h**Definition**::h](ja)}(h**Definition**h]h Definition}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj,ubh:}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj(ubjE)}(hX^struct nbcon_state { union { unsigned int atom; struct { unsigned int prio : 2; unsigned int req_prio : 2; unsigned int unsafe : 1; unsigned int unsafe_takeover : 1; unsigned int cpu : 24; }; }; };Ph]hX^struct nbcon_state { union { unsigned int atom; struct { unsigned int prio : 2; unsigned int req_prio : 2; unsigned int unsafe : 1; unsigned int unsafe_takeover : 1; unsigned int cpu : 24; }; }; };}hjIsbah}(h]h ]h"]h$]h&]hhuh1jDh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj(ubh)}(h **Members**h]ja)}(hjZh]hMembers}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjXubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj(ubjw)}(hhh](j|)}(h``{unnamed_union}`` anonymous h](j)}(h``{unnamed_union}``h]j)}(hjyh]h{unnamed_union}}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjsubj)}(hhh]h)}(h anonymoush]h anonymous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjsubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjpubj|)}(h<``atom`` Compound of the state fields for atomic operations h](j)}(h``atom``h]j)}(hjh]hatom}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubj)}(hhh]h)}(h2Compound of the state fields for atomic operationsh]h2Compound of the state fields for atomic operations}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjpubj|)}(h``{unnamed_struct}`` anonymous h](j)}(h``{unnamed_struct}``h]j)}(hjh]h{unnamed_struct}}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubj)}(hhh]h)}(h anonymoush]h anonymous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjpubj|)}(h+``prio`` The priority of the current owner h](j)}(h``prio``h]j)}(hj$h]hprio}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubj)}(hhh]h)}(h!The priority of the current ownerh]h!The priority of the current owner}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hKhj:ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hj9hKhjpubj|)}(h0``req_prio`` The priority of a handover request h](j)}(h ``req_prio``h]j)}(hj]h]hreq_prio}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjWubj)}(hhh]h)}(h"The priority of a handover requesth]h"The priority of a handover request}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhKhjsubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1j{hjrhKhjpubj|)}(h4``unsafe`` Console is busy in a non takeover region h](j)}(h ``unsafe``h]j)}(hjh]hunsafe}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubj)}(hhh]h)}(h(Console is busy in a non takeover regionh]h(Console is busy in a non takeover region}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjpubj|)}(h``unsafe_takeover`` A hostile takeover in an unsafe state happened in the past. The console cannot be safe until re-initialized. h](j)}(h``unsafe_takeover``h]j)}(hjh]hunsafe_takeover}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubj)}(hhh]h)}(hlA hostile takeover in an unsafe state happened in the past. The console cannot be safe until re-initialized.h]hlA hostile takeover in an unsafe state happened in the past. The console cannot be safe until re-initialized.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjpubj|)}(h'``cpu`` The CPU on which the owner runsh](j)}(h``cpu``h]j)}(hj h]hcpu}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubj)}(hhh]h)}(hThe CPU on which the owner runsh]hThe CPU on which the owner runs}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjpubeh}(h]h ]h"]h$]h&]uh1jvhj(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubh)}(h**Description**h]ja)}(hjLh]h Description}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjJubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj hhubh)}(hnTo be used for reading and preparing of the value stored in the nbcon state variable **console**::nbcon_state.h](hUTo be used for reading and preparing of the value stored in the nbcon state variable }(hjbhhhNhNubja)}(h **console**h]hconsole}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjbubh::nbcon_state.}(hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj hhubh)}(hThe **prio** and **req_prio** fields are particularly important to allow spin-waiting to timeout and give up without the risk of a waiter being assigned the lock after giving up.h](hThe }(hjhhhNhNubja)}(h**prio**h]hprio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh and }(hjhhhNhNubja)}(h **req_prio**h]hreq_prio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh fields are particularly important to allow spin-waiting to timeout and give up without the risk of a waiter being assigned the lock after giving up.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnbcon_prio (C enum) c.nbcon_priohNtauh1jhj hhhNhNubj)}(hhh](j)}(h nbcon_prioh]j)}(henum nbcon_prioh](j)}(hjh]henum}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(h nbcon_prioh]j)}(hjh]h nbcon_prio}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hjhhhjhKubah}(h]jah ](j&j'eh"]h$]h&]j+j,)j-huh1jhjhKhjhhubj/)}(hhh]h)}(h)console owner priority for nbcon consolesh]h)console owner priority for nbcon consoles}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjhhubah}(h]h ]h"]h$]h&]uh1j.hjhhhjhKubeh}(h]h ](jKenumeh"]h$]h&]jPjKjQj)jRj)jSjTjUuh1jhhhj hNhNubjW)}(h**Constants** ``NBCON_PRIO_NONE`` Unused ``NBCON_PRIO_NORMAL`` Normal (non-emergency) usage ``NBCON_PRIO_EMERGENCY`` Emergency output (WARN/OOPS...) ``NBCON_PRIO_PANIC`` Panic output ``NBCON_PRIO_MAX`` The number of priority levelsh](h)}(h **Constants**h]ja)}(hj3h]h Constants}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj1ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj-ubjw)}(hhh](j|)}(h``NBCON_PRIO_NONE`` Unused h](j)}(h``NBCON_PRIO_NONE``h]j)}(hjRh]hNBCON_PRIO_NONE}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjLubj)}(hhh]h)}(hUnusedh]hUnused}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghKhjhubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1j{hjghKhjIubj|)}(h3``NBCON_PRIO_NORMAL`` Normal (non-emergency) usage h](j)}(h``NBCON_PRIO_NORMAL``h]j)}(hjh]hNBCON_PRIO_NORMAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubj)}(hhh]h)}(hNormal (non-emergency) usageh]hNormal (non-emergency) usage}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjIubj|)}(h9``NBCON_PRIO_EMERGENCY`` Emergency output (WARN/OOPS...) h](j)}(h``NBCON_PRIO_EMERGENCY``h]j)}(hjh]hNBCON_PRIO_EMERGENCY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhjubj)}(hhh]h)}(hEmergency output (WARN/OOPS...)h]hEmergency output (WARN/OOPS...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKhjIubj|)}(h"``NBCON_PRIO_PANIC`` Panic output h](j)}(h``NBCON_PRIO_PANIC``h]j)}(hjh]hNBCON_PRIO_PANIC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjubj)}(hhh]h)}(h Panic outputh]h Panic output}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhMhjIubj|)}(h0``NBCON_PRIO_MAX`` The number of priority levelsh](j)}(h``NBCON_PRIO_MAX``h]j)}(hj6h]hNBCON_PRIO_MAX}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhj0ubj)}(hhh]h)}(hThe number of priority levelsh]hThe number of priority levels}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjLubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1j{hjKhMhjIubeh}(h]h ]h"]h$]h&]uh1jvhj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubh)}(h**Description**h]ja)}(hjyh]h Description}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjwubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhj hhubh)}(hA higher priority context can takeover the console when it is in the safe state. The final attempt to flush consoles in panic() can be allowed to do so even in an unsafe state (Hope and pray).h]hA higher priority context can takeover the console when it is in the safe state. The final attempt to flush consoles in panic() can be allowed to do so even in an unsafe state (Hope and pray).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKhj hhubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnbcon_context (C struct)c.nbcon_contexthNtauh1jhj hhhNhNubj)}(hhh](j)}(h nbcon_contexth]j)}(hstruct nbcon_contexth](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhKubj)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhjhKubj)}(h nbcon_contexth]j)}(hjh]h nbcon_context}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hjhhhjhKubah}(h]jah ](j&j'eh"]h$]h&]j+j,)j-huh1jhjhKhjhhubj/)}(hhh]h)}(h#Context for console acquire/releaseh]h#Context for console acquire/release}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjhhubah}(h]h ]h"]h$]h&]uh1j.hjhhhjhKubeh}(h]h ](jKstructeh"]h$]h&]jPjKjQjjRjjSjTjUuh1jhhhj hNhNubjW)}(hX<**Definition**:: struct nbcon_context { struct console *console; unsigned int spinwait_max_us; enum nbcon_prio prio; unsigned int allow_unsafe_takeover : 1; unsigned int backlog : 1; struct printk_buffers *pbufs; u64 seq; }; **Members** ``console`` The associated console ``spinwait_max_us`` Limit for spin-wait acquire ``prio`` Priority of the context ``allow_unsafe_takeover`` Allow performing takeover even if unsafe. Can be used only with NBCON_PRIO_PANIC **prio**. It might cause a system freeze when the console is used later. ``backlog`` Ringbuffer has pending records ``pbufs`` Pointer to the text buffer for this context ``seq`` The sequence number to print for this contexth](h)}(h**Definition**::h](ja)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM hjubjE)}(hX1struct nbcon_context { struct console *console; unsigned int spinwait_max_us; enum nbcon_prio prio; unsigned int allow_unsafe_takeover : 1; unsigned int backlog : 1; struct printk_buffers *pbufs; u64 seq; };h]hX1struct nbcon_context { struct console *console; unsigned int spinwait_max_us; enum nbcon_prio prio; unsigned int allow_unsafe_takeover : 1; unsigned int backlog : 1; struct printk_buffers *pbufs; u64 seq; };}hj6sbah}(h]h ]h"]h$]h&]hhuh1jDh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjubh)}(h **Members**h]ja)}(hjGh]hMembers}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjEubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjubjw)}(hhh](j|)}(h#``console`` The associated console h](j)}(h ``console``h]j)}(hjfh]hconsole}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM hj`ubj)}(hhh]h)}(hThe associated consoleh]hThe associated console}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{hM hj|ubah}(h]h ]h"]h$]h&]uh1jhj`ubeh}(h]h ]h"]h$]h&]uh1j{hj{hM hj]ubj|)}(h0``spinwait_max_us`` Limit for spin-wait acquire h](j)}(h``spinwait_max_us``h]j)}(hjh]hspinwait_max_us}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM hjubj)}(hhh]h)}(hLimit for spin-wait acquireh]hLimit for spin-wait acquire}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM hj]ubj|)}(h!``prio`` Priority of the context h](j)}(h``prio``h]j)}(hjh]hprio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM hjubj)}(hhh]h)}(hPriority of the contexth]hPriority of the context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM hj]ubj|)}(h``allow_unsafe_takeover`` Allow performing takeover even if unsafe. Can be used only with NBCON_PRIO_PANIC **prio**. It might cause a system freeze when the console is used later. h](j)}(h``allow_unsafe_takeover``h]j)}(hjh]hallow_unsafe_takeover}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhj ubj)}(hhh]h)}(hAllow performing takeover even if unsafe. Can be used only with NBCON_PRIO_PANIC **prio**. It might cause a system freeze when the console is used later.h](hQAllow performing takeover even if unsafe. Can be used only with NBCON_PRIO_PANIC }(hj*hhhNhNubja)}(h**prio**h]hprio}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj*ubh@. It might cause a system freeze when the console is used later.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM hj'ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj&hMhj]ubj|)}(h+``backlog`` Ringbuffer has pending records h](j)}(h ``backlog``h]j)}(hj]h]hbacklog}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjWubj)}(hhh]h)}(hRingbuffer has pending recordsh]hRingbuffer has pending records}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjsubah}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1j{hjrhMhj]ubj|)}(h6``pbufs`` Pointer to the text buffer for this context h](j)}(h ``pbufs``h]j)}(hjh]hpbufs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjubj)}(hhh]h)}(h+Pointer to the text buffer for this contexth]h+Pointer to the text buffer for this context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhMhj]ubj|)}(h5``seq`` The sequence number to print for this contexth](j)}(h``seq``h]j)}(hjh]hseq}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjubj)}(hhh]h)}(h-The sequence number to print for this contexth]h-The sequence number to print for this context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhMhj]ubeh}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jnbcon_write_context (C struct)c.nbcon_write_contexthNtauh1jhj hhhNhNubj)}(hhh](j)}(hnbcon_write_contexth]j)}(hstruct nbcon_write_contexth](j)}(hjh]hstruct}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhMubj)}(h h]h }(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%hhhj6hMubj)}(hnbcon_write_contexth]j)}(hj#h]hnbcon_write_context}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubah}(h]h ](jjeh"]h$]h&]hhuh1jhj%hhhj6hMubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hj!hhhj6hMubah}(h]jah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj6hMhjhhubj/)}(hhh]h)}(h+Context handed to the nbcon write callbacksh]h+Context handed to the nbcon write callbacks}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM$hjhhhubah}(h]h ]h"]h$]h&]uh1j.hjhhhj6hMubeh}(h]h ](jKstructeh"]h$]h&]jPjKjQjjRjjSjTjUuh1jhhhj hNhNubjW)}(hX**Definition**:: struct nbcon_write_context { struct nbcon_context __private ctxt; char *outbuf; unsigned int len; bool unsafe_takeover; }; **Members** ``ctxt`` The core console context ``outbuf`` Pointer to the text buffer for output ``len`` Length to write ``unsafe_takeover`` If a hostile takeover in an unsafe state has occurredh](h)}(h**Definition**::h](ja)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM(hjubjE)}(hstruct nbcon_write_context { struct nbcon_context __private ctxt; char *outbuf; unsigned int len; bool unsafe_takeover; };h]hstruct nbcon_write_context { struct nbcon_context __private ctxt; char *outbuf; unsigned int len; bool unsafe_takeover; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jDh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM*hjubh)}(h **Members**h]ja)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM1hjubjw)}(hhh](j|)}(h"``ctxt`` The core console context h](j)}(h``ctxt``h]j)}(hjh]hctxt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM&hjubj)}(hhh]h)}(hThe core console contexth]hThe core console context}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM&hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhM&hjubj|)}(h1``outbuf`` Pointer to the text buffer for output h](j)}(h ``outbuf``h]j)}(hjh]houtbuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM'hj ubj)}(hhh]h)}(h%Pointer to the text buffer for outputh]h%Pointer to the text buffer for output}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hM'hj'ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj&hM'hjubj|)}(h``len`` Length to write h](j)}(h``len``h]j)}(hjJh]hlen}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM(hjDubj)}(hhh]h)}(hLength to writeh]hLength to write}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hM(hj`ubah}(h]h ]h"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]uh1j{hj_hM(hjubj|)}(hI``unsafe_takeover`` If a hostile takeover in an unsafe state has occurredh](j)}(h``unsafe_takeover``h]j)}(hjh]hunsafe_takeover}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM(hj}ubj)}(hhh]h)}(h5If a hostile takeover in an unsafe state has occurredh]h5If a hostile takeover in an unsafe state has occurred}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:18: ./include/linux/console.hhM)hjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1j{hjhM(hjubeh}(h]h ]h"]h$]h&]uh1jvhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubeh}(h]j ah ]h"]h$] internalsah&]uh1hhjhhhhhK referencedKubeh}(h]hah ]h"]struct consoleah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Struct Conswh]h Struct Consw}(hjhhhNhNubah}(h]h ]h"]h$]h&]jj5uh1hhjhhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jconsw (C struct)c.conswhNtauh1jhjhhhNhNubj)}(hhh](j)}(hconswh]j)}(h struct conswh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKubj)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhhhj hKubj)}(hconswh]j)}(hjh]hconsw}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhj hKubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hjhhhj hKubah}(h]jah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj hKhjhhubj/)}(hhh]h)}(hcallbacks for consolesh]hcallbacks for consoles}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK(hj<hhubah}(h]h ]h"]h$]h&]uh1j.hjhhhj hKubeh}(h]h ](jKstructeh"]h$]h&]jPjKjQjWjRjWjSjTjUuh1jhhhjhNhNubjW)}(hX**Definition**:: struct consw { struct module *owner; const char *(*con_startup)(void); void (*con_init)(struct vc_data *vc, bool init); void (*con_deinit)(struct vc_data *vc); void (*con_clear)(struct vc_data *vc, unsigned int y, unsigned int x, unsigned int count); void (*con_putc)(struct vc_data *vc, u16 ca, unsigned int y, unsigned int x); void (*con_putcs)(struct vc_data *vc, const u16 *s,unsigned int count, unsigned int ypos, unsigned int xpos); void (*con_cursor)(struct vc_data *vc, bool enable); bool (*con_scroll)(struct vc_data *vc, unsigned int top,unsigned int bottom, enum con_scroll dir, unsigned int lines); bool (*con_switch)(struct vc_data *vc); bool (*con_blank)(struct vc_data *vc, enum vesa_blank_mode blank, bool mode_switch); int (*con_font_set)(struct vc_data *vc,const struct console_font *font, unsigned int vpitch, unsigned int flags); int (*con_font_get)(struct vc_data *vc, struct console_font *font, unsigned int vpitch); int (*con_font_default)(struct vc_data *vc, struct console_font *font, const char *name); int (*con_resize)(struct vc_data *vc, unsigned int width, unsigned int height, bool from_user); void (*con_set_palette)(struct vc_data *vc, const unsigned char *table); void (*con_scrolldelta)(struct vc_data *vc, int lines); bool (*con_set_origin)(struct vc_data *vc); void (*con_save_screen)(struct vc_data *vc); u8 (*con_build_attr)(struct vc_data *vc, u8 color,enum vc_intensity intensity, bool blink, bool underline, bool reverse, bool italic); void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); void (*con_debug_enter)(struct vc_data *vc); void (*con_debug_leave)(struct vc_data *vc); }; **Members** ``owner`` the module to get references of when this console is used ``con_startup`` set up the console and return its name (like VGA, EGA, ...) ``con_init`` initialize the console on **vc**. **init** is true for the very first call on this **vc**. ``con_deinit`` deinitialize the console from **vc**. ``con_clear`` erase **count** characters at [**x**, **y**] on **vc**. **count** >= 1. ``con_putc`` emit one character with attributes **ca** to [**x**, **y**] on **vc**. (optional -- **con_putcs** would be called instead) ``con_putcs`` emit **count** characters with attributes **s** to [**x**, **y**] on **vc**. ``con_cursor`` enable/disable cursor depending on **enable** ``con_scroll`` move lines from **top** to **bottom** in direction **dir** by **lines**. Return true if no generic handling should be done. Invoked by csi_M and printing to the console. ``con_switch`` notifier about the console switch; it is supposed to return true if a redraw is needed. ``con_blank`` blank/unblank the console. The target mode is passed in **blank**. **mode_switch** is set if changing from/to text/graphics. The hook is supposed to return true if a redraw is needed. ``con_font_set`` set console **vc** font to **font** with height **vpitch**. **flags** can be ``KD_FONT_FLAG_DONT_RECALC``. (optional) ``con_font_get`` fetch the current font on **vc** of height **vpitch** into **font**. (optional) ``con_font_default`` set default font on **vc**. **name** can be ``NULL`` or font name to search for. **font** can be filled back. (optional) ``con_resize`` resize the **vc** console to **width** x **height**. **from_user** is true when this change comes from the user space. ``con_set_palette`` sets the palette of the console **vc** to **table** (optional) ``con_scrolldelta`` the contents of the console should be scrolled by **lines**. Invoked by user. (optional) ``con_set_origin`` set origin (see :c:type:`vc_data`::vc_origin) of the **vc**. If not provided or returns false, the origin is set to **vc->vc_screenbuf**. (optional) ``con_save_screen`` save screen content into **vc->vc_screenbuf**. Called e.g. upon entering graphics. (optional) ``con_build_attr`` build attributes based on **color**, **intensity** and other parameters. The result is used for both normal and erase characters. (optional) ``con_invert_region`` invert a region of length **count** on **vc** starting at **p**. (optional) ``con_debug_enter`` prepare the console for the debugger. This includes, but is not limited to, unblanking the console, loading an appropriate palette, and allowing debugger generated output. (optional) ``con_debug_leave`` restore the console to its pre-debug state as closely as possible. (optional)h](h)}(h**Definition**::h](ja)}(h**Definition**h]h Definition}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj_ubh:}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK,hj[ubjE)}(hXstruct consw { struct module *owner; const char *(*con_startup)(void); void (*con_init)(struct vc_data *vc, bool init); void (*con_deinit)(struct vc_data *vc); void (*con_clear)(struct vc_data *vc, unsigned int y, unsigned int x, unsigned int count); void (*con_putc)(struct vc_data *vc, u16 ca, unsigned int y, unsigned int x); void (*con_putcs)(struct vc_data *vc, const u16 *s,unsigned int count, unsigned int ypos, unsigned int xpos); void (*con_cursor)(struct vc_data *vc, bool enable); bool (*con_scroll)(struct vc_data *vc, unsigned int top,unsigned int bottom, enum con_scroll dir, unsigned int lines); bool (*con_switch)(struct vc_data *vc); bool (*con_blank)(struct vc_data *vc, enum vesa_blank_mode blank, bool mode_switch); int (*con_font_set)(struct vc_data *vc,const struct console_font *font, unsigned int vpitch, unsigned int flags); int (*con_font_get)(struct vc_data *vc, struct console_font *font, unsigned int vpitch); int (*con_font_default)(struct vc_data *vc, struct console_font *font, const char *name); int (*con_resize)(struct vc_data *vc, unsigned int width, unsigned int height, bool from_user); void (*con_set_palette)(struct vc_data *vc, const unsigned char *table); void (*con_scrolldelta)(struct vc_data *vc, int lines); bool (*con_set_origin)(struct vc_data *vc); void (*con_save_screen)(struct vc_data *vc); u8 (*con_build_attr)(struct vc_data *vc, u8 color,enum vc_intensity intensity, bool blink, bool underline, bool reverse, bool italic); void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); void (*con_debug_enter)(struct vc_data *vc); void (*con_debug_leave)(struct vc_data *vc); };h]hXstruct consw { struct module *owner; const char *(*con_startup)(void); void (*con_init)(struct vc_data *vc, bool init); void (*con_deinit)(struct vc_data *vc); void (*con_clear)(struct vc_data *vc, unsigned int y, unsigned int x, unsigned int count); void (*con_putc)(struct vc_data *vc, u16 ca, unsigned int y, unsigned int x); void (*con_putcs)(struct vc_data *vc, const u16 *s,unsigned int count, unsigned int ypos, unsigned int xpos); void (*con_cursor)(struct vc_data *vc, bool enable); bool (*con_scroll)(struct vc_data *vc, unsigned int top,unsigned int bottom, enum con_scroll dir, unsigned int lines); bool (*con_switch)(struct vc_data *vc); bool (*con_blank)(struct vc_data *vc, enum vesa_blank_mode blank, bool mode_switch); int (*con_font_set)(struct vc_data *vc,const struct console_font *font, unsigned int vpitch, unsigned int flags); int (*con_font_get)(struct vc_data *vc, struct console_font *font, unsigned int vpitch); int (*con_font_default)(struct vc_data *vc, struct console_font *font, const char *name); int (*con_resize)(struct vc_data *vc, unsigned int width, unsigned int height, bool from_user); void (*con_set_palette)(struct vc_data *vc, const unsigned char *table); void (*con_scrolldelta)(struct vc_data *vc, int lines); bool (*con_set_origin)(struct vc_data *vc); void (*con_save_screen)(struct vc_data *vc); u8 (*con_build_attr)(struct vc_data *vc, u8 color,enum vc_intensity intensity, bool blink, bool underline, bool reverse, bool italic); void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); void (*con_debug_enter)(struct vc_data *vc); void (*con_debug_leave)(struct vc_data *vc); };}hj|sbah}(h]h ]h"]h$]h&]hhuh1jDh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK.hj[ubh)}(h **Members**h]ja)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKHhj[ubjw)}(hhh](j|)}(hD``owner`` the module to get references of when this console is used h](j)}(h ``owner``h]j)}(hjh]howner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK+hjubj)}(hhh]h)}(h9the module to get references of when this console is usedh]h9the module to get references of when this console is used}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhK+hjubj|)}(hL``con_startup`` set up the console and return its name (like VGA, EGA, ...) h](j)}(h``con_startup``h]j)}(hjh]h con_startup}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK,hjubj)}(hhh]h)}(h;set up the console and return its name (like VGA, EGA, ...)h]h;set up the console and return its name (like VGA, EGA, ...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK,hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhK,hjubj|)}(hh``con_init`` initialize the console on **vc**. **init** is true for the very first call on this **vc**. h](j)}(h ``con_init``h]j)}(hjh]hcon_init}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK.hjubj)}(hhh]h)}(hZinitialize the console on **vc**. **init** is true for the very first call on this **vc**.h](hinitialize the console on }(hj7hhhNhNubja)}(h**vc**h]hvc}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj7ubh. }(hj7hhhNhNubja)}(h**init**h]hinit}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj7ubh) is true for the very first call on this }(hj7hhhNhNubja)}(h**vc**h]hvc}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj7ubh.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK-hj4ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hj3hK.hjubj|)}(h5``con_deinit`` deinitialize the console from **vc**. h](j)}(h``con_deinit``h]j)}(hjh]h con_deinit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK/hjubj)}(hhh]h)}(h%deinitialize the console from **vc**.h](hdeinitialize the console from }(hjhhhNhNubja)}(h**vc**h]hvc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhK/hjubj|)}(hV``con_clear`` erase **count** characters at [**x**, **y**] on **vc**. **count** >= 1. h](j)}(h ``con_clear``h]j)}(hjh]h con_clear}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK0hjubj)}(hhh]h)}(hGerase **count** characters at [**x**, **y**] on **vc**. **count** >= 1.h](herase }(hjhhhNhNubja)}(h **count**h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh characters at [}(hjhhhNhNubja)}(h**x**h]hx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh, }(hjhhhNhNubja)}(h**y**h]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh] on }(hjhhhNhNubja)}(h**vc**h]hvc}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh. }(hjhhhNhNubja)}(h **count**h]hcount}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh >= 1.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK0hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhK0hjubj|)}(h``con_putc`` emit one character with attributes **ca** to [**x**, **y**] on **vc**. (optional -- **con_putcs** would be called instead) h](j)}(h ``con_putc``h]j)}(hjlh]hcon_putc}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK2hjfubj)}(hhh]h)}(hzemit one character with attributes **ca** to [**x**, **y**] on **vc**. (optional -- **con_putcs** would be called instead)h](h#emit one character with attributes }(hjhhhNhNubja)}(h**ca**h]hca}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh to [}(hjhhhNhNubja)}(h**x**h]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh, }(hjhhhNhNubja)}(h**y**h]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh] on }(hjhhhNhNubja)}(h**vc**h]hvc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh. (optional -- }(hjhhhNhNubja)}(h **con_putcs**h]h con_putcs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh would be called instead)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK1hjubah}(h]h ]h"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]uh1j{hjhK2hjubj|)}(h[``con_putcs`` emit **count** characters with attributes **s** to [**x**, **y**] on **vc**. h](j)}(h ``con_putcs``h]j)}(hjh]h con_putcs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK3hjubj)}(hhh]h)}(hLemit **count** characters with attributes **s** to [**x**, **y**] on **vc**.h](hemit }(hjhhhNhNubja)}(h **count**h]hcount}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh characters with attributes }(hjhhhNhNubja)}(h**s**h]hs}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh to [}(hjhhhNhNubja)}(h**x**h]hx}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh, }(hjhhhNhNubja)}(h**y**h]hy}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh] on }(hjhhhNhNubja)}(h**vc**h]hvc}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhK3hjubj|)}(h=``con_cursor`` enable/disable cursor depending on **enable** h](j)}(h``con_cursor``h]j)}(hjh]h con_cursor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK4hjubj)}(hhh]h)}(h-enable/disable cursor depending on **enable**h](h#enable/disable cursor depending on }(hjhhhNhNubja)}(h **enable**h]henable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubeh}(h]h ]h"]h$]h&]uh1hhjhK4hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhK4hjubj|)}(h``con_scroll`` move lines from **top** to **bottom** in direction **dir** by **lines**. Return true if no generic handling should be done. Invoked by csi_M and printing to the console. h](j)}(h``con_scroll``h]j)}(hjh]h con_scroll}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK7hjubj)}(hhh]h)}(hmove lines from **top** to **bottom** in direction **dir** by **lines**. Return true if no generic handling should be done. Invoked by csi_M and printing to the console.h](hmove lines from }(hjhhhNhNubja)}(h**top**h]htop}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh to }(hjhhhNhNubja)}(h **bottom**h]hbottom}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh in direction }(hjhhhNhNubja)}(h**dir**h]hdir}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh by }(hjhhhNhNubja)}(h **lines**h]hlines}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubhb. Return true if no generic handling should be done. Invoked by csi_M and printing to the console.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK5hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhK7hjubj|)}(hg``con_switch`` notifier about the console switch; it is supposed to return true if a redraw is needed. h](j)}(h``con_switch``h]j)}(hj\h]h con_switch}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK9hjVubj)}(hhh]h)}(hWnotifier about the console switch; it is supposed to return true if a redraw is needed.h]hWnotifier about the console switch; it is supposed to return true if a redraw is needed.}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK8hjrubah}(h]h ]h"]h$]h&]uh1jhjVubeh}(h]h ]h"]h$]h&]uh1j{hjqhK9hjubj|)}(h``con_blank`` blank/unblank the console. The target mode is passed in **blank**. **mode_switch** is set if changing from/to text/graphics. The hook is supposed to return true if a redraw is needed. h](j)}(h ``con_blank``h]j)}(hjh]h con_blank}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKhjubj)}(hhh]h)}(huset console **vc** font to **font** with height **vpitch**. **flags** can be ``KD_FONT_FLAG_DONT_RECALC``. (optional)h](h set console }(hj hhhNhNubja)}(h**vc**h]hvc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj ubh font to }(hj hhhNhNubja)}(h**font**h]hfont}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj ubh with height }(hj hhhNhNubja)}(h **vpitch**h]hvpitch}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj ubh. }(hj hhhNhNubja)}(h **flags**h]hflags}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj ubh can be }(hj hhhNhNubj)}(h``KD_FONT_FLAG_DONT_RECALC``h]hKD_FONT_FLAG_DONT_RECALC}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh . (optional)}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK=hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hj hK>hjubj|)}(ha``con_font_get`` fetch the current font on **vc** of height **vpitch** into **font**. (optional) h](j)}(h``con_font_get``h]j)}(hjh]h con_font_get}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK@hjubj)}(hhh]h)}(hOfetch the current font on **vc** of height **vpitch** into **font**. (optional)h](hfetch the current font on }(hjhhhNhNubja)}(h**vc**h]hvc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh of height }(hjhhhNhNubja)}(h **vpitch**h]hvpitch}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh into }(hjhhhNhNubja)}(h**font**h]hfont}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh . (optional)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhK?hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhK@hjubj|)}(h``con_font_default`` set default font on **vc**. **name** can be ``NULL`` or font name to search for. **font** can be filled back. (optional) h](j)}(h``con_font_default``h]j)}(hjh]hcon_font_default}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKBhjubj)}(hhh]h)}(hxset default font on **vc**. **name** can be ``NULL`` or font name to search for. **font** can be filled back. (optional)h](hset default font on }(hjhhhNhNubja)}(h**vc**h]hvc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh. }(hjhhhNhNubja)}(h**name**h]hname}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh can be }(hjhhhNhNubj)}(h``NULL``h]hNULL}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or font name to search for. }(hjhhhNhNubja)}(h**font**h]hfont}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh can be filled back. (optional)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKAhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hj hKBhjubj|)}(h``con_resize`` resize the **vc** console to **width** x **height**. **from_user** is true when this change comes from the user space. h](j)}(h``con_resize``h]j)}(hjzh]h con_resize}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKDhjtubj)}(hhh]h)}(hvresize the **vc** console to **width** x **height**. **from_user** is true when this change comes from the user space.h](h resize the }(hjhhhNhNubja)}(h**vc**h]hvc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh console to }(hjhhhNhNubja)}(h **width**h]hwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh x }(hjhhhNhNubja)}(h **height**h]hheight}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh. }(hjhhhNhNubja)}(h **from_user**h]h from_user}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh4 is true when this change comes from the user space.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKChjubah}(h]h ]h"]h$]h&]uh1jhjtubeh}(h]h ]h"]h$]h&]uh1j{hjhKDhjubj|)}(hS``con_set_palette`` sets the palette of the console **vc** to **table** (optional) h](j)}(h``con_set_palette``h]j)}(hjh]hcon_set_palette}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKEhjubj)}(hhh]h)}(h>sets the palette of the console **vc** to **table** (optional)h](h sets the palette of the console }(hjhhhNhNubja)}(h**vc**h]hvc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh to }(hjhhhNhNubja)}(h **table**h]htable}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh (optional)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKEhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKEhjubj|)}(hm``con_scrolldelta`` the contents of the console should be scrolled by **lines**. Invoked by user. (optional) h](j)}(h``con_scrolldelta``h]j)}(hjYh]hcon_scrolldelta}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKGhjSubj)}(hhh]h)}(hXthe contents of the console should be scrolled by **lines**. Invoked by user. (optional)h](h2the contents of the console should be scrolled by }(hjrhhhNhNubja)}(h **lines**h]hlines}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjrubh. Invoked by user. (optional)}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKFhjoubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1j{hjnhKGhjubj|)}(h``con_set_origin`` set origin (see :c:type:`vc_data`::vc_origin) of the **vc**. If not provided or returns false, the origin is set to **vc->vc_screenbuf**. (optional) h](j)}(h``con_set_origin``h]j)}(hjh]hcon_set_origin}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKJhjubj)}(hhh]h)}(hset origin (see :c:type:`vc_data`::vc_origin) of the **vc**. If not provided or returns false, the origin is set to **vc->vc_screenbuf**. (optional)h](hset origin (see }(hjhhhNhNubh)}(h:c:type:`vc_data`h]j)}(hjh]hvc_data}(hjhhhNhNubah}(h]h ](xrefjKc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocdriver-api/tty/console refdomainjKreftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]sb reftargetvc_datauh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKHhjubh::vc_origin) of the }(hjhhhNhNubja)}(h**vc**h]hvc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh9. If not provided or returns false, the origin is set to }(hjhhhNhNubja)}(h**vc->vc_screenbuf**h]hvc->vc_screenbuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh . (optional)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKHhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKJhjubj|)}(hr``con_save_screen`` save screen content into **vc->vc_screenbuf**. Called e.g. upon entering graphics. (optional) h](j)}(h``con_save_screen``h]j)}(hj1h]hcon_save_screen}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKLhj+ubj)}(hhh]h)}(h]save screen content into **vc->vc_screenbuf**. Called e.g. upon entering graphics. (optional)h](hsave screen content into }(hjJhhhNhNubja)}(h**vc->vc_screenbuf**h]hvc->vc_screenbuf}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjJubh0. Called e.g. upon entering graphics. (optional)}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKKhjGubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1j{hjFhKLhjubj|)}(h``con_build_attr`` build attributes based on **color**, **intensity** and other parameters. The result is used for both normal and erase characters. (optional) h](j)}(h``con_build_attr``h]j)}(hj}h]hcon_build_attr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKOhjwubj)}(hhh]h)}(hbuild attributes based on **color**, **intensity** and other parameters. The result is used for both normal and erase characters. (optional)h](hbuild attributes based on }(hjhhhNhNubja)}(h **color**h]hcolor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh, }(hjhhhNhNubja)}(h **intensity**h]h intensity}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubhZ and other parameters. The result is used for both normal and erase characters. (optional)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKMhjubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]uh1j{hjhKOhjubj|)}(hb``con_invert_region`` invert a region of length **count** on **vc** starting at **p**. (optional) h](j)}(h``con_invert_region``h]j)}(hjh]hcon_invert_region}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKQhjubj)}(hhh]h)}(hKinvert a region of length **count** on **vc** starting at **p**. (optional)h](hinvert a region of length }(hjhhhNhNubja)}(h **count**h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh on }(hjhhhNhNubja)}(h**vc**h]hvc}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh starting at }(hjhhhNhNubja)}(h**p**h]hp}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjubh . (optional)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKPhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1j{hjhKQhjubj|)}(h``con_debug_enter`` prepare the console for the debugger. This includes, but is not limited to, unblanking the console, loading an appropriate palette, and allowing debugger generated output. (optional) h](j)}(h``con_debug_enter``h]j)}(hjK h]hcon_debug_enter}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjI ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKUhjE ubj)}(hhh]h)}(hprepare the console for the debugger. This includes, but is not limited to, unblanking the console, loading an appropriate palette, and allowing debugger generated output. (optional)h]hprepare the console for the debugger. This includes, but is not limited to, unblanking the console, loading an appropriate palette, and allowing debugger generated output. (optional)}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKRhja ubah}(h]h ]h"]h$]h&]uh1jhjE ubeh}(h]h ]h"]h$]h&]uh1j{hj` hKUhjubj|)}(ha``con_debug_leave`` restore the console to its pre-debug state as closely as possible. (optional)h](j)}(h``con_debug_leave``h]j)}(hj h]hcon_debug_leave}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:24: ./include/linux/console.hhKVhj ubj)}(hhh]h)}(hMrestore the console to its pre-debug state as closely as possible. (optional)h]hMrestore the console to its pre-debug state as closely as possible. (optional)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKVhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1j{hj hKVhjubeh}(h]h ]h"]h$]h&]uh1jvhj[ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhjhhhNhNubeh}(h]j;ah ]h"] struct conswah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hConsole functionsh]hConsole functions}(hj hhhNhNubah}(h]h ]h"]h$]h&]jjWuh1hhj hhhhhKubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j$console_srcu_read_flags (C function)c.console_srcu_read_flagshNtauh1jhj hhhNhNubj)}(hhh](j)}(h9short console_srcu_read_flags (const struct console *con)h]j)}(h8short console_srcu_read_flags(const struct console *con)h](hdesc_sig_keyword_type)}(hshorth]hshort}(hj hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j hj hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhj!hMubj)}(hconsole_srcu_read_flagsh]j)}(hconsole_srcu_read_flagsh]hconsole_srcu_read_flags}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj!hMubhdesc_parameterlist)}(h(const struct console *con)h]hdesc_parameter)}(hconst struct console *conh](j)}(hconsth]hconst}(hj:!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6!ubj)}(h h]h }(hjH!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6!ubj)}(hjh]hstruct}(hjV!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6!ubj)}(h h]h }(hjc!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6!ubh)}(hhh]j)}(hconsoleh]hconsole}(hjt!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjq!ubah}(h]h ]h"]h$]h&] refdomainjKreftype identifier reftargetjv!modnameN classnameNjj)}j]j ASTIdentifier)}j!j!sbc.console_srcu_read_flagsasbuh1hhj6!ubj)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6!ubhdesc_sig_punctuation)}(h*h]h*}(hj!hhhNhNubah}(h]h ]pah"]h$]h&]uh1j!hj6!ubj)}(hconh]hcon}(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6!ubeh}(h]h ]h"]h$]h&]noemphhhuh1j4!hj0!ubah}(h]h ]h"]h$]h&]hhuh1j.!hj hhhj!hMubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hj hhhj!hMubah}(h]j ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj!hMhj hhubj/)}(hhh]h)}(h6Locklessly read flags of a possibly registered consoleh]h6Locklessly read flags of a possibly registered console}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!hhubah}(h]h ]h"]h$]h&]uh1j.hj hhhj!hMubeh}(h]h ](jKfunctioneh"]h$]h&]jPjKjQj!jRj!jSjTjUuh1jhhhj hNhNubjW)}(hX{**Parameters** ``const struct console *con`` struct console pointer of console to read flags from **Description** Locklessly reading **con->flags** provides a consistent read value because there is at most one CPU modifying **con->flags** and that CPU is using only read-modify-write operations to do so. Requires console_srcu_read_lock to be held, which implies that **con** might be a registered console. The purpose of holding console_srcu_read_lock is to guarantee that the console state is valid (CON_SUSPENDED/CON_ENABLED) and that no exit/cleanup routines will run if the console is currently undergoing unregistration. If the caller is holding the console_list_lock or it is _certain_ that **con** is not and will not become registered, the caller may read **con->flags** directly instead. **Context** Any context. **Return** The current value of the **con->flags** field.h](h)}(h**Parameters**h]ja)}(hj"h]h Parameters}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj"ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubjw)}(hhh]j|)}(hS``const struct console *con`` struct console pointer of console to read flags from h](j)}(h``const struct console *con``h]j)}(hj!"h]hconst struct console *con}(hj#"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj"ubj)}(hhh]h)}(h4struct console pointer of console to read flags fromh]h4struct console pointer of console to read flags from}(hj:"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6"hMhj7"ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1j{hj6"hMhj"ubah}(h]h ]h"]h$]h&]uh1jvhj!ubh)}(h**Description**h]ja)}(hj\"h]h Description}(hj^"hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjZ"ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubh)}(hLocklessly reading **con->flags** provides a consistent read value because there is at most one CPU modifying **con->flags** and that CPU is using only read-modify-write operations to do so.h](hLocklessly reading }(hjr"hhhNhNubja)}(h**con->flags**h]h con->flags}(hjz"hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjr"ubhM provides a consistent read value because there is at most one CPU modifying }(hjr"hhhNhNubja)}(h**con->flags**h]h con->flags}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjr"ubhB and that CPU is using only read-modify-write operations to do so.}(hjr"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubh)}(hXARequires console_srcu_read_lock to be held, which implies that **con** might be a registered console. The purpose of holding console_srcu_read_lock is to guarantee that the console state is valid (CON_SUSPENDED/CON_ENABLED) and that no exit/cleanup routines will run if the console is currently undergoing unregistration.h](h?Requires console_srcu_read_lock to be held, which implies that }(hj"hhhNhNubja)}(h**con**h]hcon}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj"ubh might be a registered console. The purpose of holding console_srcu_read_lock is to guarantee that the console state is valid (CON_SUSPENDED/CON_ENABLED) and that no exit/cleanup routines will run if the console is currently undergoing unregistration.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubh)}(hIf the caller is holding the console_list_lock or it is _certain_ that **con** is not and will not become registered, the caller may read **con->flags** directly instead.h](hGIf the caller is holding the console_list_lock or it is _certain_ that }(hj"hhhNhNubja)}(h**con**h]hcon}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj"ubh< is not and will not become registered, the caller may read }(hj"hhhNhNubja)}(h**con->flags**h]h con->flags}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj"ubh directly instead.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubh)}(h **Context**h]ja)}(hj"h]hContext}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj"ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubh)}(h Any context.h]h Any context.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubh)}(h **Return**h]ja)}(hj"#h]hReturn}(hj$#hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj #ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubh)}(h.The current value of the **con->flags** field.h](hThe current value of the }(hj8#hhhNhNubja)}(h**con->flags**h]h con->flags}(hj@#hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj8#ubh field.}(hj8#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%console_srcu_write_flags (C function)c.console_srcu_write_flagshNtauh1jhj hhhNhNubj)}(hhh](j)}(h@void console_srcu_write_flags (struct console *con, short flags)h]j)}(h?void console_srcu_write_flags(struct console *con, short flags)h](j )}(hvoidh]hvoid}(hjy#hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hju#hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju#hhhj#hMubj)}(hconsole_srcu_write_flagsh]j)}(hconsole_srcu_write_flagsh]hconsole_srcu_write_flags}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubah}(h]h ](jjeh"]h$]h&]hhuh1jhju#hhhj#hMubj/!)}(h"(struct console *con, short flags)h](j5!)}(hstruct console *conh](j)}(hjh]hstruct}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubh)}(hhh]j)}(hconsoleh]hconsole}(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&] refdomainjKreftypej! reftargetj#modnameN classnameNjj)}j]j!)}j!j#sbc.console_srcu_write_flagsasbuh1hhj#ubj)}(h h]h }(hj#hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubj!)}(hj!h]h*}(hj$hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j!hj#ubj)}(hconh]hcon}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1j4!hj#ubj5!)}(h short flagsh](j )}(hshorth]hshort}(hj($hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj$$ubj)}(h h]h }(hj6$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$$ubj)}(hflagsh]hflags}(hjD$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$$ubeh}(h]h ]h"]h$]h&]noemphhhuh1j4!hj#ubeh}(h]h ]h"]h$]h&]hhuh1j.!hju#hhhj#hMubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hjq#hhhj#hMubah}(h]jl#ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj#hMhjn#hhubj/)}(hhh]h)}(h$Write flags for a registered consoleh]h$Write flags for a registered console}(hjn$hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhjk$hhubah}(h]h ]h"]h$]h&]uh1j.hjn#hhhj#hMubeh}(h]h ](jKfunctioneh"]h$]h&]jPjKjQj$jRj$jSjTjUuh1jhhhj hNhNubjW)}(hX **Parameters** ``struct console *con`` struct console pointer of console to write flags to ``short flags`` new flags value to write **Description** Only use this function to write flags for registered consoles. It requires holding the console_list_lock. **Context** Any context.h](h)}(h**Parameters**h]ja)}(hj$h]h Parameters}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj$ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj$ubjw)}(hhh](j|)}(hL``struct console *con`` struct console pointer of console to write flags to h](j)}(h``struct console *con``h]j)}(hj$h]hstruct console *con}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj$ubj)}(hhh]h)}(h3struct console pointer of console to write flags toh]h3struct console pointer of console to write flags to}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1j{hj$hMhj$ubj|)}(h)``short flags`` new flags value to write h](j)}(h``short flags``h]j)}(hj$h]h short flags}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj$ubj)}(hhh]h)}(hnew flags value to writeh]hnew flags value to write}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hMhj$ubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1j{hj$hMhj$ubeh}(h]h ]h"]h$]h&]uh1jvhj$ubh)}(h**Description**h]ja)}(hj#%h]h Description}(hj%%hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj!%ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj$ubh)}(hiOnly use this function to write flags for registered consoles. It requires holding the console_list_lock.h]hiOnly use this function to write flags for registered consoles. It requires holding the console_list_lock.}(hj9%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj$ubh)}(h **Context**h]ja)}(hjJ%h]hContext}(hjL%hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjH%ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj$ubh)}(h Any context.h]h Any context.}(hj`%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMhj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jfor_each_console_srcu (C macro)c.for_each_console_srcuhNtauh1jhj hhhNhNubj)}(hhh](j)}(hfor_each_console_srcuh]j)}(hfor_each_console_srcuh]j)}(hfor_each_console_srcuh]j)}(hj%h]hfor_each_console_srcu}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj%ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj%hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMIubah}(h]h ]h"]h$]h&]hhj uh1jj!j"hj%hhhj%hMIubah}(h]j%ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj%hMIhj%hhubj/)}(hhh]h}(h]h ]h"]h$]h&]uh1j.hj%hhhj%hMIubeh}(h]h ](jKmacroeh"]h$]h&]jPjKjQj%jRj%jSjTjUuh1jhhhj hNhNubh)}(h``for_each_console_srcu (con)``h]j)}(hj%h]hfor_each_console_srcu (con)}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMKhj hhubh block_quote)}(h"Iterator over registered consoles h]h)}(h!Iterator over registered consolesh]h!Iterator over registered consoles}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhM@hj%ubah}(h]h ]h"]h$]h&]uh1j%hj%hM@hj hhubjW)}(hX***Parameters** ``con`` struct console pointer used as loop cursor **Description** Although SRCU guarantees the console list will be consistent, the struct console fields may be updated by other CPUs while iterating. Requires console_srcu_read_lock to be held. Can be invoked from any context.h](h)}(h**Parameters**h]ja)}(hj%h]h Parameters}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj%ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMDhj%ubjw)}(hhh]j|)}(h3``con`` struct console pointer used as loop cursor h](j)}(h``con``h]j)}(hj&h]hcon}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMAhj&ubj)}(hhh]h)}(h*struct console pointer used as loop cursorh]h*struct console pointer used as loop cursor}(hj4&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0&hMAhj1&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1j{hj0&hMAhj&ubah}(h]h ]h"]h$]h&]uh1jvhj%ubh)}(h**Description**h]ja)}(hjV&h]h Description}(hjX&hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjT&ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMChj%ubh)}(hAlthough SRCU guarantees the console list will be consistent, the struct console fields may be updated by other CPUs while iterating.h]hAlthough SRCU guarantees the console list will be consistent, the struct console fields may be updated by other CPUs while iterating.}(hjl&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMChj%ubh)}(hLRequires console_srcu_read_lock to be held. Can be invoked from any context.h]hLRequires console_srcu_read_lock to be held. Can be invoked from any context.}(hj{&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMFhj%ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jfor_each_console (C macro)c.for_each_consolehNtauh1jhj hhhNhNubj)}(hhh](j)}(hfor_each_consoleh]j)}(hfor_each_consoleh]j)}(hfor_each_consoleh]j)}(hj&h]hfor_each_console}(hj&hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj&hhh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMUubah}(h]h ]h"]h$]h&]hhj uh1jj!j"hj&hhhj&hMUubah}(h]j&ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj&hMUhj&hhubj/)}(hhh]h}(h]h ]h"]h$]h&]uh1j.hj&hhhj&hMUubeh}(h]h ](jKmacroeh"]h$]h&]jPjKjQj&jRj&jSjTjUuh1jhhhj hNhNubh)}(h``for_each_console (con)``h]j)}(hj&h]hfor_each_console (con)}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMWhj hhubj%)}(h"Iterator over registered consoles h]h)}(h!Iterator over registered consolesh]h!Iterator over registered consoles}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMNhj&ubah}(h]h ]h"]h$]h&]uh1j%hj'hMNhj hhubjW)}(h**Parameters** ``con`` struct console pointer used as loop cursor **Description** The console list and the :c:type:`console.flags ` are immutable while iterating. Requires console_list_lock to be held.h](h)}(h**Parameters**h]ja)}(hj'h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj'ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMRhj'ubjw)}(hhh]j|)}(h3``con`` struct console pointer used as loop cursor h](j)}(h``con``h]j)}(hj4'h]hcon}(hj6'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2'ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMOhj.'ubj)}(hhh]h)}(h*struct console pointer used as loop cursorh]h*struct console pointer used as loop cursor}(hjM'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI'hMOhjJ'ubah}(h]h ]h"]h$]h&]uh1jhj.'ubeh}(h]h ]h"]h$]h&]uh1j{hjI'hMOhj+'ubah}(h]h ]h"]h$]h&]uh1jvhj'ubh)}(h**Description**h]ja)}(hjo'h]h Description}(hjq'hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjm'ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMQhj'ubh)}(hYThe console list and the :c:type:`console.flags ` are immutable while iterating.h](hThe console list and the }(hj'hhhNhNubh)}(h!:c:type:`console.flags `h]j)}(hj'h]h console.flags}(hj'hhhNhNubah}(h]h ](jjKc-typeeh"]h$]h&]uh1jhj'ubah}(h]h ]h"]h$]h&]refdocj refdomainjKreftypetype refexplicitrefwarnjjjconsoleuh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMQhj'ubh are immutable while iterating.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj'hMQhj'ubh)}(h&Requires console_list_lock to be held.h]h&Requires console_list_lock to be held.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:30: ./include/linux/console.hhMShj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jclear_selection (C function)c.clear_selectionhNtauh1jhj hhhNhNubj)}(hhh](j)}(hvoid clear_selection (void)h]j)}(hvoid clear_selection(void)h](j )}(hvoidh]hvoid}(hj'hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj'hhha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:34: ./drivers/tty/vt/selection.chKSubj)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj'hhhj'hKSubj)}(hclear_selectionh]j)}(hclear_selectionh]hclear_selection}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj'hhhj'hKSubj/!)}(h(void)h]j5!)}(hvoidh]j )}(hvoidh]hvoid}(hj#(hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj(ubah}(h]h ]h"]h$]h&]noemphhhuh1j4!hj(ubah}(h]h ]h"]h$]h&]hhuh1j.!hj'hhhj'hKSubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hj'hhhj'hKSubah}(h]j'ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj'hKShj'hhubj/)}(hhh]h)}(hremove current selectionh]hremove current selection}(hjM(hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:34: ./drivers/tty/vt/selection.chKLhjJ(hhubah}(h]h ]h"]h$]h&]uh1j.hj'hhhj'hKSubeh}(h]h ](jKfunctioneh"]h$]h&]jPjKjQje(jRje(jSjTjUuh1jhhhj hNhNubjW)}(h**Parameters** ``void`` no arguments **Description** Remove the current selection highlight, if any from the console holding the selection. Locking: The caller must hold the console lock.h](h)}(h**Parameters**h]ja)}(hjo(h]h Parameters}(hjq(hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjm(ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:34: ./drivers/tty/vt/selection.chKPhji(ubjw)}(hhh]j|)}(h``void`` no arguments h](j)}(h``void``h]j)}(hj(h]hvoid}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1jha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:34: ./drivers/tty/vt/selection.chKShj(ubj)}(hhh]h)}(h no argumentsh]h no arguments}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hKShj(ubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1j{hj(hKShj(ubah}(h]h ]h"]h$]h&]uh1jvhji(ubh)}(h**Description**h]ja)}(hj(h]h Description}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj(ubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:34: ./drivers/tty/vt/selection.chKUhji(ubh)}(hVRemove the current selection highlight, if any from the console holding the selection.h]hVRemove the current selection highlight, if any from the console holding the selection.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:34: ./drivers/tty/vt/selection.chKMhji(ubh)}(h/Locking: The caller must hold the console lock.h]h/Locking: The caller must hold the console lock.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hha/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:34: ./drivers/tty/vt/selection.chKPhji(ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j__vc_resize (C function) c.__vc_resizehNtauh1jhj hhhNhNubj)}(hhh](j)}(hZint __vc_resize (struct vc_data *vc, unsigned int cols, unsigned int rows, bool from_user)h]j)}(hYint __vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows, bool from_user)h](j )}(hinth]hint}(hj)hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj)hhhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chM ubj)}(h h]h }(hj,)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)hhhj+)hM ubj)}(h __vc_resizeh]j)}(h __vc_resizeh]h __vc_resize}(hj>)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:)ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj)hhhj+)hM ubj/!)}(hJ(struct vc_data *vc, unsigned int cols, unsigned int rows, bool from_user)h](j5!)}(hstruct vc_data *vch](j)}(hjh]hstruct}(hjZ)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV)ubj)}(h h]h }(hjg)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV)ubh)}(hhh]j)}(hvc_datah]hvc_data}(hjx)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhju)ubah}(h]h ]h"]h$]h&] refdomainjKreftypej! reftargetjz)modnameN classnameNjj)}j]j!)}j!j@)sb c.__vc_resizeasbuh1hhjV)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV)ubj!)}(hj!h]h*}(hj)hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j!hjV)ubj)}(hvch]hvc}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjV)ubeh}(h]h ]h"]h$]h&]noemphhhuh1j4!hjR)ubj5!)}(hunsigned int colsh](j )}(hunsignedh]hunsigned}(hj)hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj )}(hinth]hint}(hj)hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj)ubj)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubj)}(hcolsh]hcols}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]noemphhhuh1j4!hjR)ubj5!)}(hunsigned int rowsh](j )}(hunsignedh]hunsigned}(hj*hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj*ubj)}(h h]h }(hj+*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj )}(hinth]hint}(hj9*hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj*ubj)}(h h]h }(hjG*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubj)}(hrowsh]hrows}(hjU*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1j4!hjR)ubj5!)}(hbool from_userh](j )}(hboolh]hbool}(hjn*hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hjj*ubj)}(h h]h }(hj|*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj*ubj)}(h from_userh]h from_user}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjj*ubeh}(h]h ]h"]h$]h&]noemphhhuh1j4!hjR)ubeh}(h]h ]h"]h$]h&]hhuh1j.!hj)hhhj+)hM ubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hj)hhhj+)hM ubah}(h]j)ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj+)hM hj)hhubj/)}(hhh]h)}(h resize a VTh]h resize a VT}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj*hhubah}(h]h ]h"]h$]h&]uh1j.hj)hhhj+)hM ubeh}(h]h ](jKfunctioneh"]h$]h&]jPjKjQj*jRj*jSjTjUuh1jhhhj hNhNubjW)}(hX**Parameters** ``struct vc_data *vc`` virtual console ``unsigned int cols`` columns ``unsigned int rows`` rows ``bool from_user`` invoked by a user? **Description** Resize a virtual console as seen from the console end of things. We use the common vc_do_resize() method to update the structures. Locking: The caller must hold the console sem to protect console internals and **vc->port.tty**.h](h)}(h**Parameters**h]ja)}(hj*h]h Parameters}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj*ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj*ubjw)}(hhh](j|)}(h'``struct vc_data *vc`` virtual console h](j)}(h``struct vc_data *vc``h]j)}(hj*h]hstruct vc_data *vc}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj*ubj)}(hhh]h)}(hvirtual consoleh]hvirtual console}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj +hMhj +ubah}(h]h ]h"]h$]h&]uh1jhj*ubeh}(h]h ]h"]h$]h&]uh1j{hj +hMhj*ubj|)}(h``unsigned int cols`` columns h](j)}(h``unsigned int cols``h]j)}(hj.+h]hunsigned int cols}(hj0+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,+ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj(+ubj)}(hhh]h)}(hcolumnsh]hcolumns}(hjG+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjC+hMhjD+ubah}(h]h ]h"]h$]h&]uh1jhj(+ubeh}(h]h ]h"]h$]h&]uh1j{hjC+hMhj*ubj|)}(h``unsigned int rows`` rows h](j)}(h``unsigned int rows``h]j)}(hjg+h]hunsigned int rows}(hji+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje+ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhja+ubj)}(hhh]h)}(hrowsh]hrows}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|+hMhj}+ubah}(h]h ]h"]h$]h&]uh1jhja+ubeh}(h]h ]h"]h$]h&]uh1j{hj|+hMhj*ubj|)}(h&``bool from_user`` invoked by a user? h](j)}(h``bool from_user``h]j)}(hj+h]hbool from_user}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj+ubj)}(hhh]h)}(hinvoked by a user?h]hinvoked by a user?}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+hMhj+ubah}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]uh1j{hj+hMhj*ubeh}(h]h ]h"]h$]h&]uh1jvhj*ubh)}(h**Description**h]ja)}(hj+h]h Description}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj+ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj*ubh)}(hResize a virtual console as seen from the console end of things. We use the common vc_do_resize() method to update the structures.h]hResize a virtual console as seen from the console end of things. We use the common vc_do_resize() method to update the structures.}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj*ubh)}(h`Locking: The caller must hold the console sem to protect console internals and **vc->port.tty**.h](hOLocking: The caller must hold the console sem to protect console internals and }(hj,hhhNhNubja)}(h**vc->port.tty**h]h vc->port.tty}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj,ubh.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jcon_is_bound (C function)c.con_is_boundhNtauh1jhj hhhNhNubj)}(hhh](j)}(h*int con_is_bound (const struct consw *csw)h]j)}(h)int con_is_bound(const struct consw *csw)h](j )}(hinth]hint}(hjA,hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj=,hhhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMubj)}(h h]h }(hjP,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=,hhhjO,hMubj)}(h con_is_boundh]j)}(h con_is_boundh]h con_is_bound}(hjb,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^,ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj=,hhhjO,hMubj/!)}(h(const struct consw *csw)h]j5!)}(hconst struct consw *cswh](j)}(hj`h](h)}(h**Parameters**h]ja)}(hj>-h]h Parameters}(hj@-hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj<-ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj8-ubjw)}(hhh]j|)}(h+``const struct consw *csw`` console driver h](j)}(h``const struct consw *csw``h]j)}(hj]-h]hconst struct consw *csw}(hj_-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[-ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhjW-ubj)}(hhh]h)}(hconsole driverh]hconsole driver}(hjv-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr-hMhjs-ubah}(h]h ]h"]h$]h&]uh1jhjW-ubeh}(h]h ]h"]h$]h&]uh1j{hjr-hMhjT-ubah}(h]h ]h"]h$]h&]uh1jvhj8-ubh)}(h **Return**h]ja)}(hj-h]hReturn}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj-ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj8-ubh)}(h!zero if unbound, nonzero if boundh]h!zero if unbound, nonzero if bound}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj8-ubh)}(h**Description**h]ja)}(hj-h]h Description}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj-ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj8-ubh)}(hyDrivers can call this and if zero, they should release all resources allocated on :c:type:`consw.con_startup\(\) `h](hRDrivers can call this and if zero, they should release all resources allocated on }(hj-hhhNhNubh)}(h':c:type:`consw.con_startup\(\) `h]j)}(hj-h]hconsw.con_startup()}(hj-hhhNhNubah}(h]h ](jjKc-typeeh"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]refdocj refdomainjKreftypetype refexplicitrefwarnjjjconswuh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMhj-ubeh}(h]h ]h"]h$]h&]uh1hhj-hMhj8-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jcon_is_visible (C function)c.con_is_visiblehNtauh1jhj hhhNhNubj)}(hhh](j)}(h.bool con_is_visible (const struct vc_data *vc)h]j)}(h-bool con_is_visible(const struct vc_data *vc)h](j )}(hjp*h]hbool}(hj#.hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj.hhhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chM2ubj)}(h h]h }(hj1.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj.hhhj0.hM2ubj)}(hcon_is_visibleh]j)}(hcon_is_visibleh]hcon_is_visible}(hjC.hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?.ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj.hhhj0.hM2ubj/!)}(h(const struct vc_data *vc)h]j5!)}(hconst struct vc_data *vch](j)}(hj/h]hconst struct vc_data *vc}(hj@/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhj0ubh)}(hCalled when the console is taken over by the kernel debugger, this function needs to save the current console state, then put the console into a state suitable for the kernel debugger.h]hCalled when the console is taken over by the kernel debugger, this function needs to save the current console state, then put the console into a state suitable for the kernel debugger.}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chM>hj0ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jcon_debug_leave (C function)c.con_debug_leavehNtauh1jhj hhhNhNubj)}(hhh](j)}(hvoid con_debug_leave (void)h]j)}(hvoid con_debug_leave(void)h](j )}(hvoidh]hvoid}(hj?1hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hj;1hhhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMsubj)}(h h]h }(hjN1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj;1hhhjM1hMsubj)}(hcon_debug_leaveh]j)}(hcon_debug_leaveh]hcon_debug_leave}(hj`1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj\1ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj;1hhhjM1hMsubj/!)}(h(void)h]j5!)}(hvoidh]j )}(hvoidh]hvoid}(hj|1hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hjx1ubah}(h]h ]h"]h$]h&]noemphhhuh1j4!hjt1ubah}(h]h ]h"]h$]h&]hhuh1j.!hj;1hhhjM1hMsubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hj71hhhjM1hMsubah}(h]j21ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhjM1hMshj41hhubj/)}(hhh]h)}(hrestore console stateh]hrestore console state}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMnhj1hhubah}(h]h ]h"]h$]h&]uh1j.hj41hhhjM1hMsubeh}(h]h ](jKfunctioneh"]h$]h&]jPjKjQj1jRj1jSjTjUuh1jhhhj hNhNubjW)}(h**Parameters** ``void`` no arguments **Description** Restore the console state to what it was before the kernel debugger was invoked.h](h)}(h**Parameters**h]ja)}(hj1h]h Parameters}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj1ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMrhj1ubjw)}(hhh]j|)}(h``void`` no arguments h](j)}(h``void``h]j)}(hj1h]hvoid}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMuhj1ubj)}(hhh]h)}(h no argumentsh]h no arguments}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMuhj1ubah}(h]h ]h"]h$]h&]uh1jhj1ubeh}(h]h ]h"]h$]h&]uh1j{hj1hMuhj1ubah}(h]h ]h"]h$]h&]uh1jvhj1ubh)}(h**Description**h]ja)}(hj"2h]h Description}(hj$2hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj 2ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMwhj1ubh)}(hPRestore the console state to what it was before the kernel debugger was invoked.h]hPRestore the console state to what it was before the kernel debugger was invoked.}(hj82hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMohj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j%do_unregister_con_driver (C function)c.do_unregister_con_driverhNtauh1jhj hhhNhNubj)}(hhh](j)}(h6int do_unregister_con_driver (const struct consw *csw)h]j)}(h5int do_unregister_con_driver(const struct consw *csw)h](j )}(hinth]hint}(hjg2hhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hjc2hhhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:36: ./drivers/tty/vt/vt.chMubj)}(h h]h }(hjv2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjc2hhhju2hMubj)}(hdo_unregister_con_driverh]j)}(hdo_unregister_con_driverh]hdo_unregister_con_driver}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjc2hhhju2hMubj/!)}(h(const struct consw *csw)h]j5!)}(hconst struct consw *cswh](j)}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=hhhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM ubj)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj=hhhj>hM ubj)}(h vc_ctl_stateh]j)}(hj=h]h vc_ctl_state}(hj#>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj=hhhj>hM ubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hj=hhhj>hM ubah}(h]j=ah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj>hM hj=hhubj/)}(hhh]h)}(h control characters state of a vth]h control characters state of a vt}(hjE>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM/hjB>hhubah}(h]h ]h"]h$]h&]uh1j.hj=hhhj>hM ubeh}(h]h ](jKenumeh"]h$]h&]jPjKjQj]>jRj]>jSjTjUuh1jhhhj3hNhNubjW)}(hX**Constants** ``ESnormal`` initial state, no control characters parsed ``ESesc`` ESC parsed ``ESsquare`` CSI parsed -- modifiers/parameters/ctrl chars expected ``ESgetpars`` CSI parsed -- parameters/ctrl chars expected ``ESfunckey`` CSI [ parsed ``EShash`` ESC # parsed ``ESsetG0`` ESC ( parsed ``ESsetG1`` ESC ) parsed ``ESpercent`` ESC % parsed ``EScsiignore`` CSI [0x20-0x3f] parsed ``ESnonstd`` OSC parsed ``ESpalette`` OSC P parsed ``ESosc`` OSC [0-9] parsed ``ESANSI_first`` first state for ignoring ansi control sequences ``ESapc`` ESC _ parsed ``ESpm`` ESC ^ parsed ``ESdcs`` ESC P parsed ``ESANSI_last`` last state for ignoring ansi control sequencesh](h)}(h **Constants**h]ja)}(hjg>h]h Constants}(hji>hhhNhNubah}(h]h ]h"]h$]h&]uh1j`hje>ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM3hja>ubjw)}(hhh](j|)}(h9``ESnormal`` initial state, no control characters parsed h](j)}(h ``ESnormal``h]j)}(hj>h]hESnormal}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM6hj>ubj)}(hhh]h)}(h+initial state, no control characters parsedh]h+initial state, no control characters parsed}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hM6hj>ubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1j{hj>hM6hj}>ubj|)}(h``ESesc`` ESC parsed h](j)}(h ``ESesc``h]j)}(hj>h]hESesc}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM9hj>ubj)}(hhh]h)}(h ESC parsedh]h ESC parsed}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hM9hj>ubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1j{hj>hM9hj}>ubj|)}(hD``ESsquare`` CSI parsed -- modifiers/parameters/ctrl chars expected h](j)}(h ``ESsquare``h]j)}(hj>h]hESsquare}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM<hj>ubj)}(hhh]h)}(h6CSI parsed -- modifiers/parameters/ctrl chars expectedh]h6CSI parsed -- modifiers/parameters/ctrl chars expected}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ?hM<hj?ubah}(h]h ]h"]h$]h&]uh1jhj>ubeh}(h]h ]h"]h$]h&]uh1j{hj ?hM<hj}>ubj|)}(h;``ESgetpars`` CSI parsed -- parameters/ctrl chars expected h](j)}(h ``ESgetpars``h]j)}(hj1?h]h ESgetpars}(hj3?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/?ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM?hj+?ubj)}(hhh]h)}(h,CSI parsed -- parameters/ctrl chars expectedh]h,CSI parsed -- parameters/ctrl chars expected}(hjJ?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF?hM?hjG?ubah}(h]h ]h"]h$]h&]uh1jhj+?ubeh}(h]h ]h"]h$]h&]uh1j{hjF?hM?hj}>ubj|)}(h``ESfunckey`` CSI [ parsed h](j)}(h ``ESfunckey``h]j)}(hjj?h]h ESfunckey}(hjl?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh?ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMBhjd?ubj)}(hhh]h)}(h CSI [ parsedh]h CSI [ parsed}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMBhj?ubah}(h]h ]h"]h$]h&]uh1jhjd?ubeh}(h]h ]h"]h$]h&]uh1j{hj?hMBhj}>ubj|)}(h``EShash`` ESC # parsed h](j)}(h ``EShash``h]j)}(hj?h]hEShash}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMEhj?ubj)}(hhh]h)}(h ESC # parsedh]h ESC # parsed}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMEhj?ubah}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1j{hj?hMEhj}>ubj|)}(h``ESsetG0`` ESC ( parsed h](j)}(h ``ESsetG0``h]j)}(hj?h]hESsetG0}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMHhj?ubj)}(hhh]h)}(h ESC ( parsedh]h ESC ( parsed}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMHhj?ubah}(h]h ]h"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]uh1j{hj?hMHhj}>ubj|)}(h``ESsetG1`` ESC ) parsed h](j)}(h ``ESsetG1``h]j)}(hj@h]hESsetG1}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMKhj@ubj)}(hhh]h)}(h ESC ) parsedh]h ESC ) parsed}(hj.@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*@hMKhj+@ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1j{hj*@hMKhj}>ubj|)}(h``ESpercent`` ESC % parsed h](j)}(h ``ESpercent``h]j)}(hjN@h]h ESpercent}(hjP@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjL@ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMNhjH@ubj)}(hhh]h)}(h ESC % parsedh]h ESC % parsed}(hjg@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjc@hMNhjd@ubah}(h]h ]h"]h$]h&]uh1jhjH@ubeh}(h]h ]h"]h$]h&]uh1j{hjc@hMNhj}>ubj|)}(h'``EScsiignore`` CSI [0x20-0x3f] parsed h](j)}(h``EScsiignore``h]j)}(hj@h]h EScsiignore}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMQhj@ubj)}(hhh]h)}(hCSI [0x20-0x3f] parsedh]hCSI [0x20-0x3f] parsed}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMQhj@ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1j{hj@hMQhj}>ubj|)}(h``ESnonstd`` OSC parsed h](j)}(h ``ESnonstd``h]j)}(hj@h]hESnonstd}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMThj@ubj)}(hhh]h)}(h OSC parsedh]h OSC parsed}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMThj@ubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1j{hj@hMThj}>ubj|)}(h``ESpalette`` OSC P parsed h](j)}(h ``ESpalette``h]j)}(hj@h]h ESpalette}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMWhj@ubj)}(hhh]h)}(h OSC P parsedh]h OSC P parsed}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMWhjAubah}(h]h ]h"]h$]h&]uh1jhj@ubeh}(h]h ]h"]h$]h&]uh1j{hjAhMWhj}>ubj|)}(h``ESosc`` OSC [0-9] parsed h](j)}(h ``ESosc``h]j)}(hj2Ah]hESosc}(hj4AhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0Aubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMZhj,Aubj)}(hhh]h)}(hOSC [0-9] parsedh]hOSC [0-9] parsed}(hjKAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGAhMZhjHAubah}(h]h ]h"]h$]h&]uh1jhj,Aubeh}(h]h ]h"]h$]h&]uh1j{hjGAhMZhj}>ubj|)}(hA``ESANSI_first`` first state for ignoring ansi control sequences h](j)}(h``ESANSI_first``h]j)}(hjkAh]h ESANSI_first}(hjmAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiAubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM]hjeAubj)}(hhh]h)}(h/first state for ignoring ansi control sequencesh]h/first state for ignoring ansi control sequences}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhM]hjAubah}(h]h ]h"]h$]h&]uh1jhjeAubeh}(h]h ]h"]h$]h&]uh1j{hjAhM]hj}>ubj|)}(h``ESapc`` ESC _ parsed h](j)}(h ``ESapc``h]j)}(hjAh]hESapc}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM`hjAubj)}(hhh]h)}(h ESC _ parsedh]h ESC _ parsed}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhM`hjAubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1j{hjAhM`hj}>ubj|)}(h``ESpm`` ESC ^ parsed h](j)}(h``ESpm``h]j)}(hjAh]hESpm}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMchjAubj)}(hhh]h)}(h ESC ^ parsedh]h ESC ^ parsed}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMchjAubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1j{hjAhMchj}>ubj|)}(h``ESdcs`` ESC P parsed h](j)}(h ``ESdcs``h]j)}(hjBh]hESdcs}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMfhjBubj)}(hhh]h)}(h ESC P parsedh]h ESC P parsed}(hj/BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj+BhMfhj,Bubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1j{hj+BhMfhj}>ubj|)}(h>``ESANSI_last`` last state for ignoring ansi control sequencesh](j)}(h``ESANSI_last``h]j)}(hjOBh]h ESANSI_last}(hjQBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMBubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMhhjIBubj)}(hhh]h)}(h.last state for ignoring ansi control sequencesh]h.last state for ignoring ansi control sequences}(hjhBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMihjeBubah}(h]h ]h"]h$]h&]uh1jhjIBubeh}(h]h ]h"]h$]h&]uh1j{hjdBhMhhj}>ubeh}(h]h ]h"]h$]h&]uh1jvhja>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj3hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](j vc_sanitize_unicode (C function)c.vc_sanitize_unicodehNtauh1jhj3hhhNhNubj)}(hhh](j)}(h%int vc_sanitize_unicode (const int c)h]j)}(h$int vc_sanitize_unicode(const int c)h](j )}(hinth]hint}(hjBhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hjBhhhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM ubj)}(h h]h }(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBhhhjBhM ubj)}(hvc_sanitize_unicodeh]j)}(hvc_sanitize_unicodeh]hvc_sanitize_unicode}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjBubah}(h]h ](jjeh"]h$]h&]hhuh1jhjBhhhjBhM ubj/!)}(h (const int c)h]j5!)}(h const int ch](j)}(hj`h](hCombine UTF-8 into Unicode in }(hj$EhhhNhNubh)}(h':c:type:`vc_data.vc_utf_char `h]j)}(hj.Eh]hvc_data.vc_utf_char}(hj0EhhhNhNubah}(h]h ](jjKc-typeeh"]h$]h&]uh1jhj,Eubah}(h]h ]h"]h$]h&]refdocj refdomainjKreftypetype refexplicitrefwarnjj)}j]jfDc.vc_translate_unicodeasbjvc_datauh1hhj8hMlhj$Eubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hj!Ehhubah}(h]h ]h"]h$]h&]uh1j.hjChhhjChM ubeh}(h]h ](jKfunctioneh"]h$]h&]jPjKjQj`EjRj`EjSjTjUuh1jhhhj3hNhNubjW)}(hX**Parameters** ``struct vc_data *vc`` virtual console ``int c`` UTF-8 byte to translate ``bool *rescan`` set to true iff **c** wasn't consumed here and needs to be re-processed **Description** * :c:type:`vc_data.vc_utf_char ` is the being-constructed Unicode code point. * :c:type:`vc_data.vc_utf_count ` is the number of continuation bytes still expected to arrive. * :c:type:`vc_data.vc_npar ` is the number of continuation bytes arrived so far. **Return** * ``-1`` - Input OK so far, **c** consumed, further bytes expected. * ``0xFFFD`` - Possibility 1: input invalid, **c** may have been consumed (see desc. of **rescan**). Possibility 2: input OK, **c** consumed, ``U+FFFD`` is the resulting code point. ``U+FFFD`` is valid, ``REPLACEMENT CHARACTER``. * otherwise - Input OK, **c** consumed, resulting code point returned.h](h)}(h**Parameters**h]ja)}(hjjEh]h Parameters}(hjlEhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjhEubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjdEubjw)}(hhh](j|)}(h'``struct vc_data *vc`` virtual console h](j)}(h``struct vc_data *vc``h]j)}(hjEh]hstruct vc_data *vc}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjEubj)}(hhh]h)}(hvirtual consoleh]hvirtual console}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhM hjEubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1j{hjEhM hjEubj|)}(h"``int c`` UTF-8 byte to translate h](j)}(h ``int c``h]j)}(hjEh]hint c}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjEubj)}(hhh]h)}(hUTF-8 byte to translateh]hUTF-8 byte to translate}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhM hjEubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1j{hjEhM hjEubj|)}(hY``bool *rescan`` set to true iff **c** wasn't consumed here and needs to be re-processed h](j)}(h``bool *rescan``h]j)}(hjEh]h bool *rescan}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjEubj)}(hhh]h)}(hGset to true iff **c** wasn't consumed here and needs to be re-processedh](hset to true iff }(hjFhhhNhNubja)}(h**c**h]hc}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjFubh4 wasn’t consumed here and needs to be re-processed}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhM hjFubah}(h]h ]h"]h$]h&]uh1jhjEubeh}(h]h ]h"]h$]h&]uh1j{hjFhM hjEubeh}(h]h ]h"]h$]h&]uh1jvhjdEubh)}(h**Description**h]ja)}(hjHFh]h Description}(hjJFhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjFFubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjdEubh)}(hhh](h)}(hT:c:type:`vc_data.vc_utf_char ` is the being-constructed Unicode code point.h]h)}(hjcFh](h)}(h':c:type:`vc_data.vc_utf_char `h]j)}(hjjFh]hvc_data.vc_utf_char}(hjlFhhhNhNubah}(h]h ](jjKc-typeeh"]h$]h&]uh1jhjhFubah}(h]h ]h"]h$]h&]refdocj refdomainjKreftypetype refexplicitrefwarnjjjvc_datauh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjeFubh- is the being-constructed Unicode code point.}(hjeFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhM hjaFubah}(h]h ]h"]h$]h&]uh1hhj^Fubh)}(hf:c:type:`vc_data.vc_utf_count ` is the number of continuation bytes still expected to arrive.h]h)}(hf:c:type:`vc_data.vc_utf_count ` is the number of continuation bytes still expected to arrive.h](h)}(h(:c:type:`vc_data.vc_utf_count `h]j)}(hjFh]hvc_data.vc_utf_count}(hjFhhhNhNubah}(h]h ](jjKc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjKreftypetype refexplicitrefwarnjjjvc_datauh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjFubh> is the number of continuation bytes still expected to arrive.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhM hjFubah}(h]h ]h"]h$]h&]uh1hhj^Fubh)}(hX:c:type:`vc_data.vc_npar ` is the number of continuation bytes arrived so far. h]h)}(hW:c:type:`vc_data.vc_npar ` is the number of continuation bytes arrived so far.h](h)}(h#:c:type:`vc_data.vc_npar `h]j)}(hjFh]hvc_data.vc_npar}(hjFhhhNhNubah}(h]h ](jjKc-typeeh"]h$]h&]uh1jhjFubah}(h]h ]h"]h$]h&]refdocj refdomainjKreftypetype refexplicitrefwarnjjjvc_datauh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjFubh4 is the number of continuation bytes arrived so far.}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjFhM hjFubah}(h]h ]h"]h$]h&]uh1hhj^Fubeh}(h]h ]h"]h$]h&]bulletj!uh1hhjFhM hjdEubh)}(h **Return**h]ja)}(hjGh]hReturn}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjGubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjdEubh)}(hhh](h)}(hA``-1`` - Input OK so far, **c** consumed, further bytes expected.h]h)}(hj,Gh](j)}(h``-1``h]h-1}(hj1GhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.Gubh - Input OK so far, }(hj.GhhhNhNubja)}(h**c**h]hc}(hjCGhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj.Gubh" consumed, further bytes expected.}(hj.GhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hj*Gubah}(h]h ]h"]h$]h&]uh1hhj'Gubh)}(hX``0xFFFD`` - Possibility 1: input invalid, **c** may have been consumed (see desc. of **rescan**). Possibility 2: input OK, **c** consumed, ``U+FFFD`` is the resulting code point. ``U+FFFD`` is valid, ``REPLACEMENT CHARACTER``.h]jw)}(hhh]j|)}(h``0xFFFD`` - Possibility 1: input invalid, **c** may have been consumed (see desc. of **rescan**). Possibility 2: input OK, **c** consumed, ``U+FFFD`` is the resulting code point. ``U+FFFD`` is valid, ``REPLACEMENT CHARACTER``.h](j)}(hL``0xFFFD`` - Possibility 1: input invalid, **c** may have been consumed (seeh](j)}(h ``0xFFFD``h]h0xFFFD}(hjqGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmGubh! - Possibility 1: input invalid, }(hjmGhhhNhNubja)}(h**c**h]hc}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjmGubh may have been consumed (see}(hjmGhhhNhNubeh}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjiGubj)}(hhh]h)}(hdesc. of **rescan**). Possibility 2: input OK, **c** consumed, ``U+FFFD`` is the resulting code point. ``U+FFFD`` is valid, ``REPLACEMENT CHARACTER``.h](h desc. of }(hjGhhhNhNubja)}(h **rescan**h]hrescan}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjGubh). Possibility 2: input OK, }(hjGhhhNhNubja)}(h**c**h]hc}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjGubh consumed, }(hjGhhhNhNubj)}(h ``U+FFFD``h]hU+FFFD}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh is the resulting code point. }(hjGhhhNhNubj)}(h ``U+FFFD``h]hU+FFFD}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh is valid, }(hjGhhhNhNubj)}(h``REPLACEMENT CHARACTER``h]hREPLACEMENT CHARACTER}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjGubh.}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjGubah}(h]h ]h"]h$]h&]uh1jhjiGubeh}(h]h ]h"]h$]h&]uh1j{hjGhM hjfGubah}(h]h ]h"]h$]h&]uh1jvhjbGubah}(h]h ]h"]h$]h&]uh1hhj'Gubh)}(hDotherwise - Input OK, **c** consumed, resulting code point returned.h]h)}(hj"Hh](hotherwise - Input OK, }(hj$HhhhNhNubja)}(h**c**h]hc}(hj+HhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hj$Hubh) consumed, resulting code point returned.}(hj$HhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hj Hubah}(h]h ]h"]h$]h&]uh1hhj'Gubeh}(h]h ]h"]h$]h&]jGj!uh1hhj[GhM hjdEubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj3hhhNhNubj)}(hhh]h}(h]h ]h"]h$]h&]entries](jvt_kmsg_redirect (C function)c.vt_kmsg_redirecthNtauh1jhj3hhhNhNubj)}(hhh](j)}(hint vt_kmsg_redirect (int new)h]j)}(hint vt_kmsg_redirect(int new)h](j )}(hinth]hint}(hjpHhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hjlHhhhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM ubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlHhhhj~HhM ubj)}(hvt_kmsg_redirecth]j)}(hvt_kmsg_redirecth]hvt_kmsg_redirect}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubah}(h]h ](jjeh"]h$]h&]hhuh1jhjlHhhhj~HhM ubj/!)}(h (int new)h]j5!)}(hint newh](j )}(hinth]hint}(hjHhhhNhNubah}(h]h ]j!ah"]h$]h&]uh1j hjHubj)}(h h]h }(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubj)}(hnewh]hnew}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]noemphhhuh1j4!hjHubah}(h]h ]h"]h$]h&]hhuh1j.!hjlHhhhj~HhM ubeh}(h]h ]h"]h$]h&]hhj uh1jj!j"hjhHhhhj~HhM ubah}(h]jcHah ](j&j'eh"]h$]h&]j+j,)j-huh1jhj~HhM hjeHhhubj/)}(hhh]h)}(h$sets/gets the kernel message consoleh]h$sets/gets the kernel message console}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMn hjHhhubah}(h]h ]h"]h$]h&]uh1j.hjeHhhhj~HhM ubeh}(h]h ](jKfunctioneh"]h$]h&]jPjKjQj IjRj IjSjTjUuh1jhhhj3hNhNubjW)}(hX`**Parameters** ``int new`` the new virtual terminal number or -1 if the console should stay unchanged **Description** By default, the kernel messages are always printed on the current virtual console. However, the user may modify that default with the ``TIOCL_SETKMSGREDIRECT`` ioctl call. This function sets the kernel message console to be **new**. It returns the old virtual console number. The virtual terminal number ``0`` (both as parameter and return value) means no redirection (i.e. always printed on the currently active console). The parameter -1 means that only the current console is returned, but the value is not modified. You may use the macro vt_get_kmsg_redirect() in that case to make the code more understandable. When the kernel is compiled without ``CONFIG_VT_CONSOLE``, this function ignores the parameter and always returns ``0``.h](h)}(h**Parameters**h]ja)}(hjIh]h Parameters}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjIubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMr hjIubjw)}(hhh]j|)}(hW``int new`` the new virtual terminal number or -1 if the console should stay unchanged h](j)}(h ``int new``h]j)}(hj4Ih]hint new}(hj6IhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2Iubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMp hj.Iubj)}(hhh]h)}(hJthe new virtual terminal number or -1 if the console should stay unchangedh]hJthe new virtual terminal number or -1 if the console should stay unchanged}(hjMIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMo hjJIubah}(h]h ]h"]h$]h&]uh1jhj.Iubeh}(h]h ]h"]h$]h&]uh1j{hjIIhMp hj+Iubah}(h]h ]h"]h$]h&]uh1jvhjIubh)}(h**Description**h]ja)}(hjpIh]h Description}(hjrIhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjnIubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMr hjIubh)}(hBy default, the kernel messages are always printed on the current virtual console. However, the user may modify that default with the ``TIOCL_SETKMSGREDIRECT`` ioctl call.h](hBy default, the kernel messages are always printed on the current virtual console. However, the user may modify that default with the }(hjIhhhNhNubj)}(h``TIOCL_SETKMSGREDIRECT``h]hTIOCL_SETKMSGREDIRECT}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh ioctl call.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMr hjIubh)}(hThis function sets the kernel message console to be **new**. It returns the old virtual console number. The virtual terminal number ``0`` (both as parameter and return value) means no redirection (i.e. always printed on the currently active console).h](h4This function sets the kernel message console to be }(hjIhhhNhNubja)}(h**new**h]hnew}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j`hjIubhI. It returns the old virtual console number. The virtual terminal number }(hjIhhhNhNubj)}(h``0``h]h0}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubhq (both as parameter and return value) means no redirection (i.e. always printed on the currently active console).}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chMv hjIubh)}(hThe parameter -1 means that only the current console is returned, but the value is not modified. You may use the macro vt_get_kmsg_redirect() in that case to make the code more understandable.h]hThe parameter -1 means that only the current console is returned, but the value is not modified. You may use the macro vt_get_kmsg_redirect() in that case to make the code more understandable.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM{ hjIubh)}(hxWhen the kernel is compiled without ``CONFIG_VT_CONSOLE``, this function ignores the parameter and always returns ``0``.h](h$When the kernel is compiled without }(hjIhhhNhNubj)}(h``CONFIG_VT_CONSOLE``h]hCONFIG_VT_CONSOLE}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh9, this function ignores the parameter and always returns }(hjIhhhNhNubj)}(h``0``h]h0}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/driver-api/tty/console:44: ./drivers/tty/vt/vt.chM hjIubeh}(h]h ] kernelindentah"]h$]h&]uh1jVhj3hhhNhNubeh}(h]j|ah ]h"]h$]jah&]uh1hhj hhhhhK(jKubeh}(h]j]ah ]h"]console functionsah$]h&]uh1hhhhhhhhKubeh}(h]consoleah ]h"]consoleah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj[Jerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j5Jj2Jjjjh internalsNj j;j-Jj]u nametypes}(j5JjjjJj j-Juh}(j2Jhjhhjjjjjj j j j jjjjjj!j;jjjj]j j j jl#jq#j%j%j&j&j'j'j)j)j4,j9,j.j.j/j/j21j71jZ2j_2j|j3j4j4j5j5j8j8j;j;j=j=jBjBjCjCjcHjhHhhjhj5j,jWjNjvjmu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}jiJKsRparse_messages]hsystem_message)}(hhh]h)}(h,Duplicate implicit target name: "internals".h]h0Duplicate implicit target name: “internals”.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJubah}(h]h ]h"]h$]h&]j|alevelKtypeINFOsourcehlineK(uh1jJhj3hhhhhK(ubatransform_messages] transformerN include_log] decorationNhhub.