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/core-api/printk-basicsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/zh_TW/core-api/printk-basicsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/it_IT/core-api/printk-basicsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ja_JP/core-api/printk-basicsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/ko_KR/core-api/printk-basicsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/pt_BR/core-api/printk-basicsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget*/translations/sp_SP/core-api/printk-basicsmodnameN 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/core-api/printk-basics.rsthKubhsection)}(hhh](htitle)}(hMessage logging with printkh]hMessage logging with printk}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hX*printk() is one of the most widely known functions in the Linux kernel. It's the standard tool we have for printing messages and usually the most basic way of tracing and debugging. If you're familiar with printf(3) you can tell printk() is based on it, although it has some functional differences:h]hX.printk() is one of the most widely known functions in the Linux kernel. It’s the standard tool we have for printing messages and usually the most basic way of tracing and debugging. If you’re familiar with printf(3) you can tell printk() is based on it, although it has some functional differences:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh block_quote)}(hXE- printk() messages can specify a log level. - the format string, while largely compatible with C99, doesn't follow the exact same specification. It has some extensions and a few limitations (no ``%n`` or floating point conversion specifiers). See :ref:`How to get printk format specifiers right `. h]h bullet_list)}(hhh](h list_item)}(h+printk() messages can specify a log level. h]h)}(h*printk() messages can specify a log level.h]h*printk() messages can specify a log level.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hXthe format string, while largely compatible with C99, doesn't follow the exact same specification. It has some extensions and a few limitations (no ``%n`` or floating point conversion specifiers). See :ref:`How to get printk format specifiers right `. h]h)}(hXthe format string, while largely compatible with C99, doesn't follow the exact same specification. It has some extensions and a few limitations (no ``%n`` or floating point conversion specifiers). See :ref:`How to get printk format specifiers right `.h](hthe format string, while largely compatible with C99, doesn’t follow the exact same specification. It has some extensions and a few limitations (no }(hjhhhNhNubhliteral)}(h``%n``h]h%n}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/ or floating point conversion specifiers). See }(hjhhhNhNubh)}(hD:ref:`How to get printk format specifiers right `h]hinline)}(hj4h]h)How to get printk format specifiers right}(hj8hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j6hj2ubah}(h]h ]h"]h$]h&]refdoccore-api/printk-basics refdomainjCreftyperef refexplicitrefwarn reftargetprintk-specifiersuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]bullet-uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hAll printk() messages are printed to the kernel log buffer, which is a ring buffer exported to userspace through /dev/kmsg. The usual way to read it is using ``dmesg``.h](hAll printk() messages are printed to the kernel log buffer, which is a ring buffer exported to userspace through /dev/kmsg. The usual way to read it is using }(hjuhhhNhNubj)}(h ``dmesg``h]hdmesg}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubh.}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h&printk() is typically used like this::h]h%printk() is typically used like this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh literal_block)}(h'printk(KERN_INFO "Message: %s\n", arg);h]h'printk(KERN_INFO "Message: %s\n", arg);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhhhhubh)}(hwhere ``KERN_INFO`` is the log level (note that it's concatenated to the format string, the log level is not a separate argument). The available log levels are:h](hwhere }(hjhhhNhNubj)}(h ``KERN_INFO``h]h KERN_INFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is the log level (note that it’s concatenated to the format string, the log level is not a separate argument). The available log levels are:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK/uh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hNameh]hName}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hStringh]hString}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hAlias functionh]hAlias function}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj7ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(h KERN_EMERGh]h KERN_EMERG}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjbubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(h"0"h]h“0”}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjyubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(h pr_emerg()h]h pr_emerg()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h KERN_ALERTh]h KERN_ALERT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"1"h]h“1”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h pr_alert()h]h pr_alert()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h KERN_CRITh]h KERN_CRIT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"2"h]h“2”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h pr_crit()h]h pr_crit()}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hj,ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(hKERN_ERRh]hKERN_ERR}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjLubah}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh]h)}(h"3"h]h“3”}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjcubah}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh]h)}(hpr_err()h]hpr_err()}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjzubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h KERN_WARNINGh]h KERN_WARNING}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"4"h]h“4”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h pr_warn()h]h pr_warn()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h KERN_NOTICEh]h KERN_NOTICE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"5"h]h“5”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h pr_notice()h]h pr_notice()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h KERN_INFOh]h KERN_INFO}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hj6ubah}(h]h ]h"]h$]h&]uh1jhj3ubj)}(hhh]h)}(h"6"h]h“6”}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjMubah}(h]h ]h"]h$]h&]uh1jhj3ubj)}(hhh]h)}(h pr_info()h]h pr_info()}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjdubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h KERN_DEBUGh]h KERN_DEBUG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"7"h]h“7”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h-pr_debug() and pr_devel() if DEBUG is definedh]h-pr_debug() and pr_devel() if DEBUG is defined}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h KERN_DEFAULTh]h KERN_DEFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h""h]h“”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh](j)}(hhh]h)}(h KERN_CONTh]h KERN_CONT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h"c"h]h“c”}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hj)ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h pr_cont()h]h pr_cont()}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hj@ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jZhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hXiThe log level specifies the importance of a message. The kernel decides whether to show the message immediately (printing it to the current console) depending on its log level and the current *console_loglevel* (a kernel variable). If the message priority is higher (lower log level value) than the *console_loglevel* the message will be printed to the console.h](hThe log level specifies the importance of a message. The kernel decides whether to show the message immediately (printing it to the current console) depending on its log level and the current }(hjphhhNhNubhemphasis)}(h*console_loglevel*h]hconsole_loglevel}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjpubhY (a kernel variable). If the message priority is higher (lower log level value) than the }(hjphhhNhNubjy)}(h*console_loglevel*h]hconsole_loglevel}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjpubh, the message will be printed to the console.}(hjphhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK7hhhhubh)}(hPIf the log level is omitted, the message is printed with ``KERN_DEFAULT`` level.h](h9If the log level is omitted, the message is printed with }(hjhhhNhNubj)}(h``KERN_DEFAULT``h]h KERN_DEFAULT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh level.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK=hhhhubh)}(h3You can check the current *console_loglevel* with::h](hYou can check the current }(hjhhhNhNubjy)}(h*console_loglevel*h]hconsole_loglevel}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjubh with:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK@hhhhubj)}(h:$ cat /proc/sys/kernel/printk 4 4 1 7h]h:$ cat /proc/sys/kernel/printk 4 4 1 7}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKBhhhhubh)}(hXThe result shows the *current*, *default*, *minimum* and *boot-time-default* log levels.h](hThe result shows the }(hjhhhNhNubjy)}(h *current*h]hcurrent}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjubh, }(hjhhhNhNubjy)}(h *default*h]hdefault}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjubh, }hjsbjy)}(h *minimum*h]hminimum}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjubh and }(hjhhhNhNubjy)}(h*boot-time-default*h]hboot-time-default}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jxhjubh log levels.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKEhhhhubh)}(hTo change the current console_loglevel simply write the desired level to ``/proc/sys/kernel/printk``. For example, to print all messages to the console::h](hITo change the current console_loglevel simply write the desired level to }(hjHhhhNhNubj)}(h``/proc/sys/kernel/printk``h]h/proc/sys/kernel/printk}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh4. For example, to print all messages to the console:}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKHhhhhubj)}(h"# echo 8 > /proc/sys/kernel/printkh]h"# echo 8 > /proc/sys/kernel/printk}hjhsbah}(h]h ]h"]h$]h&]hhuh1jhhhKKhhhhubh)}(hAnother way, using ``dmesg``::h](hAnother way, using }(hjvhhhNhNubj)}(h ``dmesg``h]hdmesg}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh:}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKMhhhhubj)}(h # dmesg -n 5h]h # dmesg -n 5}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKOhhhhubh)}(h~sets the console_loglevel to print KERN_WARNING (4) or more severe messages to console. See ``dmesg(1)`` for more information.h](h\sets the console_loglevel to print KERN_WARNING (4) or more severe messages to console. See }(hjhhhNhNubj)}(h ``dmesg(1)``h]hdmesg(1)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh for more information.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKQhhhhubh)}(hAs an alternative to printk() you can use the ``pr_*()`` aliases for logging. This family of macros embed the log level in the macro names. For example::h](h.As an alternative to printk() you can use the }(hjhhhNhNubj)}(h ``pr_*()``h]hpr_*()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh` aliases for logging. This family of macros embed the log level in the macro names. For example:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKThhhhubj)}(h*pr_info("Info message no. %d\n", msg_num);h]h*pr_info("Info message no. %d\n", msg_num);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKXhhhhubh)}(hprints a ``KERN_INFO`` message.h](h prints a }(hjhhhNhNubj)}(h ``KERN_INFO``h]h KERN_INFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh message.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKZhhhhubh)}(hBesides being more concise than the equivalent printk() calls, they can use a common definition for the format string through the pr_fmt() macro. For instance, defining this at the top of a source file (before any ``#include`` directive)::h](hBesides being more concise than the equivalent printk() calls, they can use a common definition for the format string through the pr_fmt() macro. For instance, defining this at the top of a source file (before any }(hjhhhNhNubj)}(h ``#include``h]h#include}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh directive):}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK\hhhhubj)}(h;#define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__h]h;#define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__}hj2sbah}(h]h ]h"]h$]h&]hhuh1jhhhKahhhhubh)}(hmwould prefix every pr_*() message in that file with the module and function name that originated the message.h]hmwould prefix every pr_*() message in that file with the module and function name that originated the message.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchhhhubh)}(hFor debugging purposes there are also two conditionally-compiled macros: pr_debug() and pr_devel(), which are compiled-out unless ``DEBUG`` (or also ``CONFIG_DYNAMIC_DEBUG`` in the case of pr_debug()) is defined.h](hFor debugging purposes there are also two conditionally-compiled macros: pr_debug() and pr_devel(), which are compiled-out unless }(hjNhhhNhNubj)}(h ``DEBUG``h]hDEBUG}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubh (or also }(hjNhhhNhNubj)}(h``CONFIG_DYNAMIC_DEBUG``h]hCONFIG_DYNAMIC_DEBUG}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubh' in the case of pr_debug()) is defined.}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKfhhhhubh)}(hhh](h)}(h,Avoiding lockups from excessive printk() useh]h,Avoiding lockups from excessive printk() use}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKkubhnote)}(hThis section is relevant only for legacy console drivers (those not using the nbcon API) and !PREEMPT_RT kernels. Once all console drivers are updated to nbcon, this documentation can be removed.h]h)}(hThis section is relevant only for legacy console drivers (those not using the nbcon API) and !PREEMPT_RT kernels. Once all console drivers are updated to nbcon, this documentation can be removed.h]hThis section is relevant only for legacy console drivers (those not using the nbcon API) and !PREEMPT_RT kernels. Once all console drivers are updated to nbcon, this documentation can be removed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubh)}(hXkUsing ``printk()`` in hot paths (such as interrupt handlers, timer callbacks, or high-frequency network receive routines) with legacy consoles (e.g., ``console=ttyS0``) may cause lockups. Legacy consoles synchronously acquire ``console_sem`` and block while flushing messages, potentially disabling interrupts long enough to trigger hard or soft lockup detectors.h](hUsing }(hjhhhNhNubj)}(h ``printk()``h]hprintk()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh in hot paths (such as interrupt handlers, timer callbacks, or high-frequency network receive routines) with legacy consoles (e.g., }(hjhhhNhNubj)}(h``console=ttyS0``h]h console=ttyS0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh;) may cause lockups. Legacy consoles synchronously acquire }(hjhhhNhNubj)}(h``console_sem``h]h console_sem}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhz and block while flushing messages, potentially disabling interrupts long enough to trigger hard or soft lockup detectors.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKshjhhubh)}(hTo avoid this:h]hTo avoid this:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjhhubh)}(hhh](h)}(hUse rate-limited variants (e.g., ``pr_*_ratelimited()``) or one-time macros (e.g., ``pr_*_once()``) to reduce message frequency.h]h)}(hUse rate-limited variants (e.g., ``pr_*_ratelimited()``) or one-time macros (e.g., ``pr_*_once()``) to reduce message frequency.h](h!Use rate-limited variants (e.g., }(hjhhhNhNubj)}(h``pr_*_ratelimited()``h]hpr_*_ratelimited()}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) or one-time macros (e.g., }(hjhhhNhNubj)}(h``pr_*_once()``h]h pr_*_once()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) to reduce message frequency.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK|hjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(h|Assign lower log levels (e.g., ``KERN_DEBUG``) to non-essential messages and filter console output via ``console_loglevel``.h]h)}(h|Assign lower log levels (e.g., ``KERN_DEBUG``) to non-essential messages and filter console output via ``console_loglevel``.h](hAssign lower log levels (e.g., }(hj@hhhNhNubj)}(h``KERN_DEBUG``h]h KERN_DEBUG}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh:) to non-essential messages and filter console output via }(hj@hhhNhNubj)}(h``console_loglevel``h]hconsole_loglevel}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubh.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK~hj<ubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hUse ``printk_deferred()`` to log messages immediately to the ringbuffer and defer console printing. This is a workaround for legacy consoles.h]h)}(hUse ``printk_deferred()`` to log messages immediately to the ringbuffer and defer console printing. This is a workaround for legacy consoles.h](hUse }(hj|hhhNhNubj)}(h``printk_deferred()``h]hprintk_deferred()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubht to log messages immediately to the ringbuffer and defer console printing. This is a workaround for legacy consoles.}(hj|hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjxubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubh)}(hPort legacy console drivers to the non-blocking ``nbcon`` API (indicated by ``CON_NBCON``). This is the preferred solution, as nbcon consoles offload message printing to a dedicated kernel thread. h]h)}(hPort legacy console drivers to the non-blocking ``nbcon`` API (indicated by ``CON_NBCON``). This is the preferred solution, as nbcon consoles offload message printing to a dedicated kernel thread.h](h0Port legacy console drivers to the non-blocking }(hjhhhNhNubj)}(h ``nbcon``h]hnbcon}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh API (indicated by }(hjhhhNhNubj)}(h ``CON_NBCON``h]h CON_NBCON}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhk). This is the preferred solution, as nbcon consoles offload message printing to a dedicated kernel thread.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhNubeh}(h]h ]h"]h$]h&]jmjnuh1hhhhK|hjhhubh)}(hFor temporary debugging, ``trace_printk()`` can be used, but it must not appear in mainline code. See ``Documentation/trace/debugging.rst`` for more information.h](hFor temporary debugging, }(hjhhhNhNubj)}(h``trace_printk()``h]htrace_printk()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh; can be used, but it must not appear in mainline code. See }(hjhhhNhNubj)}(h%``Documentation/trace/debugging.rst``h]h!Documentation/trace/debugging.rst}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh for more information.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hIf more permanent output is needed in a hot path, trace events can be used. See ``Documentation/trace/events.rst`` and ``samples/trace_events/trace-events-sample.[ch]``.h](hPIf more permanent output is needed in a hot path, trace events can be used. See }(hj hhhNhNubj)}(h"``Documentation/trace/events.rst``h]hDocumentation/trace/events.rst}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh and }(hj hhhNhNubj)}(h1``samples/trace_events/trace-events-sample.[ch]``h]h-samples/trace_events/trace-events-sample.[ch]}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]*avoiding-lockups-from-excessive-printk-useah ]h"],avoiding lockups from excessive printk() useah$]h&]uh1hhhhhhhhKkubh)}(hhh](h)}(hFunction referenceh]hFunction reference}(hjS hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjP hhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlepr_fmt (C macro)c.pr_fmthNtauh1ja hjP hhhNhNubhdesc)}(hhh](hdesc_signature)}(hpr_fmth]hdesc_signature_line)}(hpr_fmth]h desc_name)}(hpr_fmth]h desc_sig_name)}(hj{ h]hpr_fmt}(hj hhhNhNubah}(h]h ]nah"]h$]h&]uh1j hj ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j hj hhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMubah}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1j} sphinx_line_type declaratorhjy hhhj hMubah}(h]jp ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jw hj hMhjt hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1j hjt hhhj hMubeh}(h]h ](cmacroeh"]h$]h&]domainj objtypej desctypej noindex noindexentrynocontentsentryuh1jr hhhjP hNhNubh)}(h``pr_fmt (fmt)``h]j)}(hj h]h pr_fmt (fmt)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjP hhubh)}(h?used by the pr_*() macros to generate the printk format string h]h)}(h>used by the pr_*() macros to generate the printk format stringh]h>used by the pr_*() macros to generate the printk format string}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubah}(h]h ]h"]h$]h&]uh1hhj hMhjP hhubh container)}(hX**Parameters** ``fmt`` format string passed from a pr_*() macro **Description** This macro can be used to generate a unified format string for pr_*() macros. A common use is to prefix all pr_*() messages in a file with a common string. For example, defining this at the top of a source file: #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt would prefix all pr_info, pr_emerg... messages in the file with the module name.h](h)}(h**Parameters**h]hstrong)}(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/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubhdefinition_list)}(hhh]hdefinition_list_item)}(h1``fmt`` format string passed from a pr_*() macro h](hterm)}(h``fmt``h]j)}(hj/ h]hfmt}(hj1 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj- ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj' ubh definition)}(hhh]h)}(h(format string passed from a pr_*() macroh]h(format string passed from a pr_*() macro}(hjJ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD hMhjG ubah}(h]h ]h"]h$]h&]uh1jE hj' ubeh}(h]h ]h"]h$]h&]uh1j% hjD hMhj" ubah}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]j )}(hjl h]h Description}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubh)}(hThis macro can be used to generate a unified format string for pr_*() macros. A common use is to prefix all pr_*() messages in a file with a common string. For example, defining this at the top of a source file:h]hThis macro can be used to generate a unified format string for pr_*() macros. A common use is to prefix all pr_*() messages in a file with a common string. For example, defining this at the top of a source file:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubh)}(h,#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt h]h)}(h+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmth]h/#define pr_fmt(fmt) KBUILD_MODNAME “: “ fmt}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubh)}(hPwould prefix all pr_info, pr_emerg... messages in the file with the module name.h]hPwould prefix all pr_info, pr_emerg... messages in the file with the module name.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn printk (C macro)c.printkhNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hprintkh]j~ )}(hprintkh]j )}(hprintkh]j )}(hj h]hprintk}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j j eh"]h$]h&]hhuh1j hj hhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMubah}(h]h ]h"]h$]h&]hhj uh1j} j j hj hhhj hMubah}(h]j ah ](j j eh"]h$]h&]j j )j huh1jw hj hMhj hhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hj hhhj hMubeh}(h]h ](j macroeh"]h$]h&]j j j j j j j j j uh1jr hhhjP hNhNubh)}(h``printk (fmt, ...)``h]j)}(hj h]hprintk (fmt, ...)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjP hhubh)}(hprint a kernel message h]h)}(hprint a kernel messageh]hprint a kernel message}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj% ubah}(h]h ]h"]h$]h&]uh1hhj7 hMhjP hhubj )}(hX**Parameters** ``fmt`` format string ``...`` variable arguments **Description** This is printk(). It can be called from any context. We want it to work. If printk indexing is enabled, _printk() is called from printk_index_wrap. Otherwise, printk is simply #defined to _printk. We try to grab the console_lock. If we succeed, it's easy - we log the output and call the console drivers. If we fail to get the semaphore, we place the output into the log buffer and return. The current holder of the console_sem will notice the new output in console_unlock(); and will send it to the consoles before releasing the lock. One effect of this deferred printing is that code which calls printk() and then changes console_loglevel may break. This is because console_loglevel is inspected when the actual printing occurs. See also: printf(3) See the vsnprintf() documentation for format string extensions over C99.h](h)}(h**Parameters**h]j )}(hjD h]h Parameters}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjB ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj> ubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hjc h]hfmt}(hje hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj] ubjF )}(hhh]h)}(h format stringh]h format string}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjx hMhjy ubah}(h]h ]h"]h$]h&]uh1jE hj] ubeh}(h]h ]h"]h$]h&]uh1j% hjx hMhjZ ubj& )}(h``...`` variable arguments h](j, )}(h``...``h]j)}(hj h]h...}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhKhj ubjF )}(hhh]h)}(hvariable argumentsh]hvariable arguments}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj ubah}(h]h ]h"]h$]h&]uh1jE hj ubeh}(h]h ]h"]h$]h&]uh1j% hj hKhjZ ubeh}(h]h ]h"]h$]h&]uh1j hj> ubh)}(h**Description**h]j )}(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/core-api/printk-basics:146: ./include/linux/printk.hhKhj> ubh)}(hHThis is printk(). It can be called from any context. We want it to work.h]hHThis is printk(). It can be called from any context. We want it to work.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj> ubh)}(h{If printk indexing is enabled, _printk() is called from printk_index_wrap. Otherwise, printk is simply #defined to _printk.h]h{If printk indexing is enabled, _printk() is called from printk_index_wrap. Otherwise, printk is simply #defined to _printk.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj> ubh)}(hXSWe try to grab the console_lock. If we succeed, it's easy - we log the output and call the console drivers. If we fail to get the semaphore, we place the output into the log buffer and return. The current holder of the console_sem will notice the new output in console_unlock(); and will send it to the consoles before releasing the lock.h]hXUWe try to grab the console_lock. If we succeed, it’s easy - we log the output and call the console drivers. If we fail to get the semaphore, we place the output into the log buffer and return. The current holder of the console_sem will notice the new output in console_unlock(); and will send it to the consoles before releasing the lock.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj> ubh)}(hOne effect of this deferred printing is that code which calls printk() and then changes console_loglevel may break. This is because console_loglevel is inspected when the actual printing occurs.h]hOne effect of this deferred printing is that code which calls printk() and then changes console_loglevel may break. This is because console_loglevel is inspected when the actual printing occurs.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj> ubh)}(hSee also: printf(3)h]hSee also: printf(3)}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj> ubh)}(hHSee the vsnprintf() documentation for format string extensions over C99.h]hHSee the vsnprintf() documentation for format string extensions over C99.}(hj8 hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj> ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_emerg (C macro) c.pr_emerghNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_emergh]j~ )}(hpr_emergh]j )}(hpr_emergh]j )}(hja h]hpr_emerg}(hjk hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjg ubah}(h]h ](j j eh"]h$]h&]hhuh1j hjc hhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMubah}(h]h ]h"]h$]h&]hhj uh1j} j j hj_ hhhj~ hMubah}(h]jZ ah ](j j eh"]h$]h&]j j )j huh1jw hj~ hMhj\ hhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hj\ hhhj~ hMubeh}(h]h ](j macroeh"]h$]h&]j j j j j j j j j uh1jr hhhjP hNhNubh)}(h``pr_emerg (fmt, ...)``h]j)}(hj h]hpr_emerg (fmt, ...)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjP hhubh)}(h!Print an emergency-level message h]h)}(h Print an emergency-level messageh]h Print an emergency-level message}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubah}(h]h ]h"]h$]h&]uh1hhj hMhjP hhubj )}(h**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_EMERG loglevel. It uses pr_fmt() to generate the format string.h](h)}(h**Parameters**h]j )}(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/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hj h]hfmt}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubjF )}(hhh]h)}(h format stringh]h format string}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMhj ubah}(h]h ]h"]h$]h&]uh1jE hj ubeh}(h]h ]h"]h$]h&]uh1j% hj hMhj ubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hj* h]h...}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj( ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj$ ubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj? hMhj@ ubah}(h]h ]h"]h$]h&]uh1jE hj$ ubeh}(h]h ]h"]h$]h&]uh1j% hj? hMhj ubeh}(h]h ]h"]h$]h&]uh1j hj ubh)}(h**Description**h]j )}(hje h]h Description}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjc ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubh)}(hhThis macro expands to a printk with KERN_EMERG loglevel. It uses pr_fmt() to generate the format string.h]hhThis macro expands to a printk with KERN_EMERG loglevel. It uses pr_fmt() to generate the format string.}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_alert (C macro) c.pr_alerthNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_alerth]j~ )}(hpr_alerth]j )}(hpr_alerth]j )}(hj h]hpr_alert}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubah}(h]h ](j j eh"]h$]h&]hhuh1j hj hhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMubah}(h]h ]h"]h$]h&]hhj uh1j} j j hj hhhj hMubah}(h]j ah ](j j eh"]h$]h&]j j )j huh1jw hj hMhj hhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hj hhhj hMubeh}(h]h ](j macroeh"]h$]h&]j j j j j j j j j uh1jr hhhjP hNhNubh)}(h``pr_alert (fmt, ...)``h]j)}(hj h]hpr_alert (fmt, ...)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjP hhubh)}(hPrint an alert-level message h]h)}(hPrint an alert-level messageh]hPrint an alert-level message}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj ubah}(h]h ]h"]h$]h&]uh1hhjhMhjP hhubj )}(h**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_ALERT loglevel. It uses pr_fmt() to generate the format string.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hj4h]hfmt}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj.ubjF )}(hhh]h)}(h format stringh]h format string}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjIhMhjJubah}(h]h ]h"]h$]h&]uh1jE hj.ubeh}(h]h ]h"]h$]h&]uh1j% hjIhMhj+ubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hjmh]h...}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjgubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jE hjgubeh}(h]h ]h"]h$]h&]uh1j% hjhMhj+ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjubh)}(hhThis macro expands to a printk with KERN_ALERT loglevel. It uses pr_fmt() to generate the format string.h]hhThis macro expands to a printk with KERN_ALERT loglevel. It uses pr_fmt() to generate the format string.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_crit (C macro) c.pr_crithNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_crith]j~ )}(hpr_crith]j )}(hpr_crith]j )}(hjh]hpr_crit}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]hhuh1j hjhhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMubah}(h]h ]h"]h$]h&]hhj uh1j} j j hjhhhjhMubah}(h]jah ](j j eh"]h$]h&]j j )j huh1jw hjhMhjhhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hjhhhjhMubeh}(h]h ](j macroeh"]h$]h&]j j j jj jj j j uh1jr hhhjP hNhNubh)}(h``pr_crit (fmt, ...)``h]j)}(hj#h]hpr_crit (fmt, ...)}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjP hhubh)}(hPrint a critical-level message h]h)}(hPrint a critical-level messageh]hPrint a critical-level message}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhj9ubah}(h]h ]h"]h$]h&]uh1hhjKhMhjP hhubj )}(h**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_CRIT loglevel. It uses pr_fmt() to generate the format string.h](h)}(h**Parameters**h]j )}(hjXh]h Parameters}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjVubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjRubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hjwh]hfmt}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjqubjF )}(hhh]h)}(h format stringh]h format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jE hjqubeh}(h]h ]h"]h$]h&]uh1j% hjhMhjnubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhMhjnubeh}(h]h ]h"]h$]h&]uh1j hjRubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjRubh)}(hgThis macro expands to a printk with KERN_CRIT loglevel. It uses pr_fmt() to generate the format string.h]hgThis macro expands to a printk with KERN_CRIT loglevel. It uses pr_fmt() to generate the format string.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMhjRubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_err (C macro)c.pr_errhNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_errh]j~ )}(hpr_errh]j )}(hpr_errh]j )}(hj*h]hpr_err}(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj0ubah}(h]h ](j j eh"]h$]h&]hhuh1j hj,hhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM"ubah}(h]h ]h"]h$]h&]hhj uh1j} j j hj(hhhjGhM"ubah}(h]j#ah ](j j eh"]h$]h&]j j )j huh1jw hjGhM"hj%hhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hj%hhhjGhM"ubeh}(h]h ](j macroeh"]h$]h&]j j j j`j j`j j j uh1jr hhhjP hNhNubh)}(h``pr_err (fmt, ...)``h]j)}(hjfh]hpr_err (fmt, ...)}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjdubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM$hjP hhubh)}(hPrint an error-level message h]h)}(hPrint an error-level messageh]hPrint an error-level message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM"hj|ubah}(h]h ]h"]h$]h&]uh1hhjhM"hjP hhubj )}(h**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_ERR loglevel. It uses pr_fmt() to generate the format string.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM&hjubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hjh]hfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM#hjubjF )}(hhh]h)}(h format stringh]h format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM#hjubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhM#hjubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM$hjubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM$hj ubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhM$hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj.h]h Description}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj,ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM&hjubh)}(hfThis macro expands to a printk with KERN_ERR loglevel. It uses pr_fmt() to generate the format string.h]hfThis macro expands to a printk with KERN_ERR loglevel. It uses pr_fmt() to generate the format string.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM%hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_warn (C macro) c.pr_warnhNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_warnh]j~ )}(hpr_warnh]j )}(hpr_warnh]j )}(hjmh]hpr_warn}(hjwhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubah}(h]h ](j j eh"]h$]h&]hhuh1j hjohhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM,ubah}(h]h ]h"]h$]h&]hhj uh1j} j j hjkhhhjhM,ubah}(h]jfah ](j j eh"]h$]h&]j j )j huh1jw hjhM,hjhhhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hjhhhhjhM,ubeh}(h]h ](j macroeh"]h$]h&]j j j jj jj j j uh1jr hhhjP hNhNubh)}(h``pr_warn (fmt, ...)``h]j)}(hjh]hpr_warn (fmt, ...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM.hjP hhubh)}(hPrint a warning-level message h]h)}(hPrint a warning-level messageh]hPrint a warning-level message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM,hjubah}(h]h ]h"]h$]h&]uh1hhjhM,hjP hhubj )}(h**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_WARNING loglevel. It uses pr_fmt() to generate the format string.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM0hjubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hjh]hfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM-hjubjF )}(hhh]h)}(h format stringh]h format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM-hjubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhM-hjubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hj6h]h...}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM.hj0ubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhM.hjLubah}(h]h ]h"]h$]h&]uh1jE hj0ubeh}(h]h ]h"]h$]h&]uh1j% hjKhM.hjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjqh]h Description}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j hjoubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM0hjubh)}(hjThis macro expands to a printk with KERN_WARNING loglevel. It uses pr_fmt() to generate the format string.h]hjThis macro expands to a printk with KERN_WARNING loglevel. It uses pr_fmt() to generate the format string.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM/hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_notice (C macro) c.pr_noticehNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(h pr_noticeh]j~ )}(h pr_noticeh]j )}(h pr_noticeh]j )}(hjh]h pr_notice}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]hhuh1j hjhhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM6ubah}(h]h ]h"]h$]h&]hhj uh1j} j j hjhhhjhM6ubah}(h]jah ](j j eh"]h$]h&]j j )j huh1jw hjhM6hjhhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hjhhhjhM6ubeh}(h]h ](j macroeh"]h$]h&]j j j jj jj j j uh1jr hhhjP hNhNubh)}(h``pr_notice (fmt, ...)``h]j)}(hjh]hpr_notice (fmt, ...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM8hjP hhubh)}(hPrint a notice-level message h]h)}(hPrint a notice-level messageh]hPrint a notice-level message}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM6hjubah}(h]h ]h"]h$]h&]uh1hhjhM6hjP hhubj )}(h**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_NOTICE loglevel. It uses pr_fmt() to generate the format string.h](h)}(h**Parameters**h]j )}(hj!h]h Parameters}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM:hjubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hj@h]hfmt}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM7hj:ubjF )}(hhh]h)}(h format stringh]h format string}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhM7hjVubah}(h]h ]h"]h$]h&]uh1jE hj:ubeh}(h]h ]h"]h$]h&]uh1j% hjUhM7hj7ubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hjyh]h...}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM8hjsubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM8hjubah}(h]h ]h"]h$]h&]uh1jE hjsubeh}(h]h ]h"]h$]h&]uh1j% hjhM8hj7ubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM:hjubh)}(hiThis macro expands to a printk with KERN_NOTICE loglevel. It uses pr_fmt() to generate the format string.h]hiThis macro expands to a printk with KERN_NOTICE loglevel. It uses pr_fmt() to generate the format string.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM9hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_info (C macro) c.pr_infohNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_infoh]j~ )}(hpr_infoh]j )}(hpr_infoh]j )}(hjh]hpr_info}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]hhuh1j hjhhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM@ubah}(h]h ]h"]h$]h&]hhj uh1j} j j hjhhhjhM@ubah:M}(h]jah ](j j eh"]h$]h&]j j )j huh1jw hjhM@hjhhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hjhhhjhM@ubeh}(h]h ](j macroeh"]h$]h&]j j j j)j j)j j j uh1jr hhhjP hNhNubh)}(h``pr_info (fmt, ...)``h]j)}(hj/h]hpr_info (fmt, ...)}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMBhjP hhubh)}(hPrint an info-level message h]h)}(hPrint an info-level messageh]hPrint an info-level message}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM@hjEubah}(h]h ]h"]h$]h&]uh1hhjWhM@hjP hhubj )}(h**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_INFO loglevel. It uses pr_fmt() to generate the format string.h](h)}(h**Parameters**h]j )}(hjdh]h Parameters}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjbubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMDhj^ubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hjh]hfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMAhj}ubjF )}(hhh]h)}(h format stringh]h format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMAhjubah}(h]h ]h"]h$]h&]uh1jE hj}ubeh}(h]h ]h"]h$]h&]uh1j% hjhMAhjzubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMBhjubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMBhjubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhMBhjzubeh}(h]h ]h"]h$]h&]uh1j hj^ubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMDhj^ubh)}(hgThis macro expands to a printk with KERN_INFO loglevel. It uses pr_fmt() to generate the format string.h]hgThis macro expands to a printk with KERN_INFO loglevel. It uses pr_fmt() to generate the format string.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMChj^ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_cont (C macro) c.pr_conthNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_conth]j~ )}(hpr_conth]j )}(hpr_conth]j )}(hj6h]hpr_cont}(hj@hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj<ubah}(h]h ](j j eh"]h$]h&]hhuh1j hj8hhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMKubah}(h]h ]h"]h$]h&]hhj uh1j} j j hj4hhhjShMKubah}(h]j/ah ](j j eh"]h$]h&]j j )j huh1jw hjShMKhj1hhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hj1hhhjShMKubeh}(h]h ](j macroeh"]h$]h&]j j j jlj jlj j j uh1jr hhhjP hNhNubh)}(h``pr_cont (fmt, ...)``h]j)}(hjrh]hpr_cont (fmt, ...)}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMMhjP hhubh)}(h3Continues a previous log message in the same line. h]h)}(h2Continues a previous log message in the same line.h]h2Continues a previous log message in the same line.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMKhjubah}(h]h ]h"]h$]h&]uh1hhjhMKhjP hhubj )}(hX'**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_CONT loglevel. It should only be used when continuing a log message with no newline ('\n') enclosed. Otherwise it defaults back to KERN_DEFAULT loglevel.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMOhjubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hjh]hfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMLhjubjF )}(hhh]h)}(h format stringh]h format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMLhjubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhMLhjubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMMhjubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMMhjubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhMMhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj:h]h Description}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj8ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMOhjubh)}(hThis macro expands to a printk with KERN_CONT loglevel. It should only be used when continuing a log message with no newline ('\n') enclosed. Otherwise it defaults back to KERN_DEFAULT loglevel.h]hThis macro expands to a printk with KERN_CONT loglevel. It should only be used when continuing a log message with no newline (’n’) enclosed. Otherwise it defaults back to KERN_DEFAULT loglevel.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMNhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_devel (C macro) c.pr_develhNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_develh]j~ )}(hpr_develh]j )}(hpr_develh]j )}(hjyh]hpr_devel}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]hhuh1j hj{hhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMWubah}(h]h ]h"]h$]h&]hhj uh1j} j j hjwhhhjhMWubah}(h]jrah ](j j eh"]h$]h&]j j )j huh1jw hjhMWhjthhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hjthhhjhMWubeh}(h]h ](j macroeh"]h$]h&]j j j jj jj j j uh1jr hhhjP hNhNubh)}(h``pr_devel (fmt, ...)``h]j)}(hjh]hpr_devel (fmt, ...)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMYhjP hhubh)}(h*Print a debug-level message conditionally h]h)}(h)Print a debug-level message conditionallyh]h)Print a debug-level message conditionally}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMWhjubah}(h]h ]h"]h$]h&]uh1hhjhMWhjP hhubj )}(h**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to a printk with KERN_DEBUG loglevel if DEBUG is defined. Otherwise it does nothing. It uses pr_fmt() to generate the format string.h](h)}(h**Parameters**h]j )}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM[hjubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hj h]hfmt}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMXhjubjF )}(hhh]h)}(h format stringh]h format string}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMXhjubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhMXhjubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hjBh]h...}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMYhj<ubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMYhjXubah}(h]h ]h"]h$]h&]uh1jE hj<ubeh}(h]h ]h"]h$]h&]uh1j% hjWhMYhjubeh}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j )}(hj}h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hj{ubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM[hjubh)}(hgThis macro expands to a printk with KERN_DEBUG loglevel if DEBUG is defined. Otherwise it does nothing.h]hgThis macro expands to a printk with KERN_DEBUG loglevel if DEBUG is defined. Otherwise it does nothing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMZhjubh)}(h/It uses pr_fmt() to generate the format string.h]h/It uses pr_fmt() to generate the format string.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhM]hjubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubjb )}(hhh]h}(h]h ]h"]h$]h&]entries](jn pr_debug (C macro) c.pr_debughNtauh1ja hjP hhhNhNubjs )}(hhh](jx )}(hpr_debugh]j~ )}(hpr_debugh]j )}(hpr_debugh]j )}(hjh]hpr_debug}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubah}(h]h ](j j eh"]h$]h&]hhuh1j hjhhh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMoubah}(h]h ]h"]h$]h&]hhj uh1j} j j hjhhhjhMoubah}(h]jah ](j j eh"]h$]h&]j j )j huh1jw hjhMohjhhubj )}(hhh]h}(h]h ]h"]h$]h&]uh1j hjhhhjhMoubeh}(h]h ](j macroeh"]h$]h&]j j j jj jj j j uh1jr hhhjP hNhNubh)}(h``pr_debug (fmt, ...)``h]j)}(hjh]hpr_debug (fmt, ...)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMqhjP hhubh)}(h*Print a debug-level message conditionally h]h)}(h)Print a debug-level message conditionallyh]h)Print a debug-level message conditionally}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMohjubah}(h]h ]h"]h$]h&]uh1hhj/hMohjP hhubj )}(hX**Parameters** ``fmt`` format string ``...`` arguments for the format string **Description** This macro expands to dynamic_pr_debug() if CONFIG_DYNAMIC_DEBUG is set. Otherwise, if DEBUG is defined, it's equivalent to a printk with KERN_DEBUG loglevel. If DEBUG is not defined it does nothing. It uses pr_fmt() to generate the format string (dynamic_pr_debug() uses pr_fmt() internally).h](h)}(h**Parameters**h]j )}(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/core-api/printk-basics:146: ./include/linux/printk.hhMshj6ubj! )}(hhh](j& )}(h``fmt`` format string h](j, )}(h``fmt``h]j)}(hj[h]hfmt}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMphjUubjF )}(hhh]h)}(h format stringh]h format string}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphMphjqubah}(h]h ]h"]h$]h&]uh1jE hjUubeh}(h]h ]h"]h$]h&]uh1j% hjphMphjRubj& )}(h(``...`` arguments for the format string h](j, )}(h``...``h]j)}(hjh]h...}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j+ h^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMqhjubjF )}(hhh]h)}(harguments for the format stringh]harguments for the format string}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMqhjubah}(h]h ]h"]h$]h&]uh1jE hjubeh}(h]h ]h"]h$]h&]uh1j% hjhMqhjRubeh}(h]h ]h"]h$]h&]uh1j hj6ubh)}(h**Description**h]j )}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMshj6ubh)}(hThis macro expands to dynamic_pr_debug() if CONFIG_DYNAMIC_DEBUG is set. Otherwise, if DEBUG is defined, it's equivalent to a printk with KERN_DEBUG loglevel. If DEBUG is not defined it does nothing.h]hThis macro expands to dynamic_pr_debug() if CONFIG_DYNAMIC_DEBUG is set. Otherwise, if DEBUG is defined, it’s equivalent to a printk with KERN_DEBUG loglevel. If DEBUG is not defined it does nothing.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMrhj6ubh)}(h]It uses pr_fmt() to generate the format string (dynamic_pr_debug() uses pr_fmt() internally).h]h]It uses pr_fmt() to generate the format string (dynamic_pr_debug() uses pr_fmt() internally).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/core-api/printk-basics:146: ./include/linux/printk.hhMvhj6ubeh}(h]h ] kernelindentah"]h$]h&]uh1j hjP hhhNhNubeh}(h]function-referenceah ]h"]function referenceah$]h&]uh1hhhhhhhhKubeh}(h]message-logging-with-printkah ]h"]message logging with printkah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_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<error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _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}(jjjM jJ jj u nametypes}(jjM juh}(jhjJ jj jP jp jy j j jZ j_ j j jjj#j(jfjkjjjjj/j4jrjwjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]hsystem_message)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOlineK2sourcehuh1jhjubatransform_messages] transformerN include_log] decorationNhhub.