lsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftargetH/translations/zh_CN/process/debugging/driver_development_debugging_guidemodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetH/translations/zh_TW/process/debugging/driver_development_debugging_guidemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetH/translations/it_IT/process/debugging/driver_development_debugging_guidemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetH/translations/ja_JP/process/debugging/driver_development_debugging_guidemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetH/translations/ko_KR/process/debugging/driver_development_debugging_guidemodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetH/translations/sp_SP/process/debugging/driver_development_debugging_guidemodnameN 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:spacepreserveuh1hhhhhhb/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide.rsthKubhsection)}(hhh](htitle)}(h'Debugging advice for driver developmenth]h'Debugging advice for driver development}(hhhhhNhNubah}(h]h ]h"]h$]h&]refidid1uh1hhhhhhhhKubh paragraph)}(hXThis document serves as a general starting point and lookup for debugging device drivers. While this guide focuses on debugging that requires re-compiling the module/kernel, the :doc:`userspace debugging guide ` will guide you through tools like dynamic debug, ftrace and other tools useful for debugging issues and behavior. For general debugging advice, see the :doc:`general advice document `.h](hThis document serves as a general starting point and lookup for debugging device drivers. While this guide focuses on debugging that requires re-compiling the module/kernel, the }(hhhhhNhNubh)}(hO:doc:`userspace debugging guide `h]hinline)}(hhh]huserspace debugging guide}(hhhhhNhNubah}(h]h ](xrefstdstd-doceh"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]refdoc4process/debugging/driver_development_debugging_guide refdomainhreftypedoc refexplicitrefwarn reftarget,/process/debugging/userspace_debugging_guideuh1hhhhKhhubh will guide you through tools like dynamic debug, ftrace and other tools useful for debugging issues and behavior. For general debugging advice, see the }(hhhhhNhNubh)}(h9:doc:`general advice document `h]h)}(hjh]hgeneral advice document}(hjhhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]refdoch refdomainj reftypedoc refexplicitrefwarnh/process/debugging/indexuh1hhhhKhhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhtopic)}(h Contents h](h)}(hContentsh]hContents}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hhhKubh bullet_list)}(hhh]h list_item)}(hhh](h)}(hhh]h reference)}(hhh]h'Debugging advice for driver development}(hjKhhhNhNubah}(h]hah ]h"]h$]h&]refid'debugging-advice-for-driver-developmentuh1jIhjFubah}(h]h ]h"]h$]h&]uh1hhjCubj=)}(hhh](jB)}(hhh](h)}(hhh]jJ)}(hhh]hprintk() & friends}(hjihhhNhNubah}(h]id2ah ]h"]h$]h&]refidprintk-friendsuh1jIhjfubah}(h]h ]h"]h$]h&]uh1hhjcubj=)}(hhh](jB)}(hhh]h)}(hhh]jJ)}(hhh]hSimple printk()}(hjhhhNhNubah}(h]id3ah ]h"]h$]h&]refid simple-printkuh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jAhjubjB)}(hhh]h)}(hhh]jJ)}(hhh]h Trace_printk}(hjhhhNhNubah}(h]id4ah ]h"]h$]h&]refid trace-printkuh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jAhjubjB)}(hhh]h)}(hhh]jJ)}(hhh]hdev_dbg}(hjhhhNhNubah}(h]id5ah ]h"]h$]h&]refiddev-dbguh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jAhjubjB)}(hhh]h)}(hhh]jJ)}(hhh]h Custom printk}(hjhhhNhNubah}(h]id6ah ]h"]h$]h&]refid custom-printkuh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jAhjubeh}(h]h ]h"]h$]h&]uh1j<hjcubeh}(h]h ]h"]h$]h&]uh1jAhj`ubjB)}(hhh](h)}(hhh]jJ)}(hhh]hFtrace}(hjhhhNhNubah}(h]id7ah ]h"]h$]h&]refidftraceuh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubj=)}(hhh]jB)}(hhh]h)}(hhh]jJ)}(hhh]h#Creating a custom Ftrace tracepoint}(hj;hhhNhNubah}(h]id8ah ]h"]h$]h&]refid#creating-a-custom-ftrace-tracepointuh1jIhj8ubah}(h]h ]h"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]uh1jAhj2ubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]uh1jAhj`ubjB)}(hhh]h)}(hhh]jJ)}(hhh]hDebugFS}(hjihhhNhNubah}(h]id9ah ]h"]h$]h&]refiddebugfsuh1jIhjfubah}(h]h ]h"]h$]h&]uh1hhjcubah}(h]h ]h"]h$]h&]uh1jAhj`ubjB)}(hhh](h)}(hhh]jJ)}(hhh]h.KASAN, UBSAN, lockdep and other error checkers}(hjhhhNhNubah}(h]id10ah ]h"]h$]h&]refid,kasan-ubsan-lockdep-and-other-error-checkersuh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubj=)}(hhh](jB)}(hhh]h)}(hhh]jJ)}(hhh]h KASAN (Kernel Address Sanitizer)}(hjhhhNhNubah}(h]id11ah ]h"]h$]h&]refidkasan-kernel-address-sanitizeruh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jAhjubjB)}(hhh]h)}(hhh]jJ)}(hhh]h$UBSAN (Undefined Behavior Sanitizer)}(hjhhhNhNubah}(h]id12ah ]h"]h$]h&]refid"ubsan-undefined-behavior-sanitizeruh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jAhjubjB)}(hhh]h)}(hhh]jJ)}(hhh]h#lockdep (Lock Dependency Validator)}(hjhhhNhNubah}(h]id13ah ]h"]h$]h&]refid!lockdep-lock-dependency-validatoruh1jIhjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jAhjubjB)}(hhh]h)}(hhh]jJ)}(hhh]h)PSI (Pressure stall information tracking)}(hjhhhNhNubah}(h]id14ah ]h"]h$]h&]refid'psi-pressure-stall-information-trackinguh1jIhj ubah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]uh1jAhjubeh}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]uh1jAhj`ubjB)}(hhh](h)}(hhh]jJ)}(hhh]hdevice coredump}(hj>hhhNhNubah}(h]id15ah ]h"]h$]h&]refiddevice-coredumpuh1jIhj;ubah}(h]h ]h"]h$]h&]uh1hhj8ubj=)}(hhh]jB)}(hhh]h)}(hhh]jJ)}(hhh]hdevcoredump interfaces}(hj]hhhNhNubah}(h]id16ah ]h"]h$]h&]refiddevcoredump-interfacesuh1jIhjZubah}(h]h ]h"]h$]h&]uh1hhjWubah}(h]h ]h"]h$]h&]uh1jAhjTubah}(h]h ]h"]h$]h&]uh1j<hj8ubeh}(h]h ]h"]h$]h&]uh1jAhj`ubeh}(h]h ]h"]h$]h&]uh1j<hjCubeh}(h]h ]h"]h$]h&]uh1jAhj>ubah}(h]h ]h"]h$]h&]uh1j<hj*hhhNhNubeh}(h]contentsah ]contentsah"]contentsah$]h&]uh1j(hhhKhhhhubh)}(h4The following sections show you the available tools.h]h4The following sections show you the available tools.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hprintk() & friendsh]hprintk() & friends}(hjhhhNhNubah}(h]h ]h"]h$]h&]hjruh1hhjhhhhhKubh)}(hThese are derivatives of printf() with varying destinations and support for being dynamically turned on or off, or lack thereof.h]hThese are derivatives of printf() with varying destinations and support for being dynamically turned on or off, or lack thereof.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh](h)}(hSimple printk()h]hSimple printk()}(hjhhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhjhhhhhKubh)}(hThe classic, can be used to great effect for quick and dirty development of new modules or to extract arbitrary necessary data for troubleshooting.h]hThe classic, can be used to great effect for quick and dirty development of new modules or to extract arbitrary necessary data for troubleshooting.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h``h](hPrerequisite: }(hj<hhhNhNubj)}(h``CONFIG_DYNAMIC_FTRACE``h]hCONFIG_DYNAMIC_FTRACE}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubh & }(hj<hhhNhNubj)}(h``#include ``h]h#include }(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj<ubeh}(h]h ]h"]h$]h&]uh1hhhhK7hj+hhubh)}(hX&It is a tiny bit less comfortable to use than printk(), because you will have to read the messages from the trace file (See: :ref:`read_ftrace_log` instead of from the kernel log, but very useful when printk() adds unwanted delays into the code execution, causing issues to be flaky or hidden.)h](h}It is a tiny bit less comfortable to use than printk(), because you will have to read the messages from the trace file (See: }(hjjhhhNhNubh)}(h:ref:`read_ftrace_log`h]h)}(hjth]hread_ftrace_log}(hjvhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjrubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnhread_ftrace_loguh1hhhhK9hjjubh instead of from the kernel log, but very useful when printk() adds unwanted delays into the code execution, causing issues to be flaky or hidden.)}(hjjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK9hj+hhubh)}(hSIf the processing of this still causes timing issues then you can try trace_puts().h]hSIf the processing of this still causes timing issues then you can try trace_puts().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hj+hhubh)}(h-For the full Documentation see trace_printk()h]h-For the full Documentation see trace_printk()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhj+hhubeh}(h]jah ]h"] trace_printkah$]h&]uh1hhjhhhhhK5ubh)}(hhh](h)}(hdev_dbgh]hdev_dbg}(hjhhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhjhhhhhKDubh)}(hPrint statement, which can be targeted by :ref:`process/debugging/userspace_debugging_guide:dynamic debug` that contains additional information about the device used within the context.h](h*Print statement, which can be targeted by }(hjhhhNhNubh)}(h@:ref:`process/debugging/userspace_debugging_guide:dynamic debug`h]h)}(hjh]h9process/debugging/userspace_debugging_guide:dynamic debug}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnh9process/debugging/userspace_debugging_guide:dynamic debuguh1hhhhKFhjubhO that contains additional information about the device used within the context.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKFhjhhubh)}(h>**When is it appropriate to leave a debug print in the code?**h]j)}(hjh]h:When is it appropriate to leave a debug print in the code?}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKJhjhhubh)}(hXxPermanent debug statements have to be useful for a developer to troubleshoot driver misbehavior. Judging that is a bit more of an art than a science, but some guidelines are in the :ref:`Coding style guidelines `. In almost all cases the debug statements shouldn't be upstreamed, as a working driver is supposed to be silent.h](hPermanent debug statements have to be useful for a developer to troubleshoot driver misbehavior. Judging that is a bit more of an art than a science, but some guidelines are in the }(hjhhhNhNubh)}(hR:ref:`Coding style guidelines `h]h)}(hj#h]hCoding style guidelines}(hj%hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdoch refdomainj/reftyperef refexplicitrefwarnh1process/coding-style:13) printing kernel messagesuh1hhhhKLhjubhs. In almost all cases the debug statements shouldn’t be upstreamed, as a working driver is supposed to be silent.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKLhjhhubeh}(h]jah ]h"]dev_dbgah$]h&]uh1hhjhhhhhKDubh)}(hhh](h)}(h Custom printkh]h Custom printk}(hjUhhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhjRhhhhhKTubh)}(h Example::h]hExample:}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjRhhubh literal_block)}(h#define core_dbg(fmt, arg...) do { \ if (core_debug) \ printk(KERN_DEBUG pr_fmt("core: " fmt), ## arg); \ } while (0)h]h#define core_dbg(fmt, arg...) do { \ if (core_debug) \ printk(KERN_DEBUG pr_fmt("core: " fmt), ## arg); \ } while (0)}hjssbah}(h]h ]h"]h$]h&]hhuh1jqhhhKXhjRhhubh)}(h**When should you do this?**h]j)}(hjh]hWhen should you do this?}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK]hjRhhubh)}(hXNIt is better to just use a pr_debug(), which can later be turned on/off with dynamic debug. Additionally, a lot of drivers activate these prints via a variable like ``core_debug`` set by a module parameter. However, Module parameters `are not recommended anymore `_.h](hIt is better to just use a pr_debug(), which can later be turned on/off with dynamic debug. Additionally, a lot of drivers activate these prints via a variable like }(hjhhhNhNubj)}(h``core_debug``h]h core_debug}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh7 set by a module parameter. However, Module parameters }(hjhhhNhNubjJ)}(hc`are not recommended anymore `_h]hare not recommended anymore}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameare not recommended anymorerefuriBhttps://lore.kernel.org/all/2024032757-surcharge-grime-d3dd@gregkhuh1jIhjubhtarget)}(hE h]h}(h]are-not-recommended-anymoreah ]h"]are not recommended anymoreah$]h&]refurijuh1j referencedKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK_hjRhhubeh}(h]jah ]h"] custom printkah$]h&]uh1hhjhhhhhKTubeh}(h]jxah ]h"]printk() & friendsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hFtraceh]hFtrace}(hjhhhNhNubah}(h]h ]h"]h$]h&]hj%uh1hhjhhhhhKfubh)}(hhh](h)}(h#Creating a custom Ftrace tracepointh]h#Creating a custom Ftrace tracepoint}(hjhhhNhNubah}(h]h ]h"]h$]h&]hjDuh1hhjhhhhhKiubh)}(hX A tracepoint adds a hook into your code that will be called and logged when the tracepoint is enabled. This can be used, for example, to trace hitting a conditional branch or to dump the internal state at specific points of the code flow during a debugging session.h]hX A tracepoint adds a hook into your code that will be called and logged when the tracepoint is enabled. This can be used, for example, to trace hitting a conditional branch or to dump the internal state at specific points of the code flow during a debugging session.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjhhubh)}(haHere is a basic description of :ref:`how to implement new tracepoints `.h](hHere is a basic description of }(hjhhhNhNubh)}(hA:ref:`how to implement new tracepoints `h]h)}(hj&h]h how to implement new tracepoints}(hj(hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]refdoch refdomainj2reftyperef refexplicitrefwarnhtrace/tracepoints:usageuh1hhhhKphjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKphjhhubh)}(hAFor the full event tracing documentation see :doc:`/trace/events`h](h-For the full event tracing documentation see }(hjNhhhNhNubh)}(h:doc:`/trace/events`h]h)}(hjXh]h /trace/events}(hjZhhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhjVubah}(h]h ]h"]h$]h&]refdoch refdomainjdreftypedoc refexplicitrefwarnh /trace/eventsuh1hhhhKshjNubeh}(h]h ]h"]h$]h&]uh1hhhhKshjhhubh)}(h:For the full Ftrace documentation see :doc:`/trace/ftrace`h](h&For the full Ftrace documentation see }(hj|hhhNhNubh)}(h:doc:`/trace/ftrace`h]h)}(hjh]h /trace/ftrace}(hjhhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftypedoc refexplicitrefwarnh /trace/ftraceuh1hhhhKuhj|ubeh}(h]h ]h"]h$]h&]uh1hhhhKuhjhhubeh}(h]jJah ]h"]#creating a custom ftrace tracepointah$]h&]uh1hhjhhhhhKiubeh}(h]j+ah ]h"]ftraceah$]h&]uh1hhhhhhhhKfubh)}(hhh](h)}(hDebugFSh]hDebugFS}(hjhhhNhNubah}(h]h ]h"]h$]h&]hjruh1hhjhhhhhKxubh)}(h@Prerequisite: ``CONFIG_DEBUG_FS` & `#include ``h](hPrerequisite: }(hjhhhNhNubj)}(h2``CONFIG_DEBUG_FS` & `#include ``h]h.CONFIG_DEBUG_FS` & `#include }(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKzhjhhubh)}(hXcDebugFS differs from the other approaches of debugging, as it doesn't write messages to the kernel log nor add traces to the code. Instead it allows the developer to handle a set of files. With these files you can either store values of variables or make register/memory dumps or you can make these files writable and modify values/settings in the driver.h]hXeDebugFS differs from the other approaches of debugging, as it doesn’t write messages to the kernel log nor add traces to the code. Instead it allows the developer to handle a set of files. With these files you can either store values of variables or make register/memory dumps or you can make these files writable and modify values/settings in the driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjhhubh)}(h Possible use-cases among others:h]h Possible use-cases among others:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj=)}(hhh](jB)}(hStore register valuesh]h)}(hjh]hStore register values}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jAhjhhhhhNubjB)}(hKeep track of variablesh]h)}(hjh]hKeep track of variables}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jAhjhhhhhNubjB)}(h Store errorsh]h)}(hj4h]h Store errors}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj2ubah}(h]h ]h"]h$]h&]uh1jAhjhhhhhNubjB)}(hStore settingsh]h)}(hjKh]hStore settings}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIubah}(h]h ]h"]h$]h&]uh1jAhjhhhhhNubjB)}(h"Toggle a setting like debug on/offh]h)}(hjbh]h"Toggle a setting like debug on/off}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj`ubah}(h]h ]h"]h$]h&]uh1jAhjhhhhhNubjB)}(hError injection h]h)}(hError injectionh]hError injection}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjwubah}(h]h ]h"]h$]h&]uh1jAhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1j<hhhKhjhhubh)}(hXThis is especially useful, when the size of a data dump would be hard to digest as part of the general kernel log (for example when dumping raw bitstream data) or when you are not interested in all the values all the time, but with the possibility to inspect them.h]hXThis is especially useful, when the size of a data dump would be hard to digest as part of the general kernel log (for example when dumping raw bitstream data) or when you are not interested in all the values all the time, but with the possibility to inspect them.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe general idea is:h]hThe general idea is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj=)}(hhh](jB)}(hdCreate a directory during probe (``struct dentry *parent = debugfs_create_dir("my_driver", NULL);``)h]h)}(hdCreate a directory during probe (``struct dentry *parent = debugfs_create_dir("my_driver", NULL);``)h](h!Create a directory during probe (}(hjhhhNhNubj)}(hB``struct dentry *parent = debugfs_create_dir("my_driver", NULL);``h]h>struct dentry *parent = debugfs_create_dir("my_driver", NULL);}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jAhjhhhhhNubjB)}(hX)Create a file (``debugfs_create_u32("my_value", 444, parent, &my_variable);``) - In this example the file is found in ``/sys/kernel/debug/my_driver/my_value`` (with read permissions for user/group/all) - any read of the file will return the current contents of the variable ``my_variable`` h](h)}(hNCreate a file (``debugfs_create_u32("my_value", 444, parent, &my_variable);``)h](hCreate a file (}(hjhhhNhNubj)}(h>``debugfs_create_u32("my_value", 444, parent, &my_variable);``h]h:debugfs_create_u32("my_value", 444, parent, &my_variable);}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh)}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubj=)}(hhh](jB)}(hxIn this example the file is found in ``/sys/kernel/debug/my_driver/my_value`` (with read permissions for user/group/all)h]h)}(hxIn this example the file is found in ``/sys/kernel/debug/my_driver/my_value`` (with read permissions for user/group/all)h](h%In this example the file is found in }(hj hhhNhNubj)}(h(``/sys/kernel/debug/my_driver/my_value``h]h$/sys/kernel/debug/my_driver/my_value}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh+ (with read permissions for user/group/all)}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jAhj ubjB)}(hVany read of the file will return the current contents of the variable ``my_variable`` h]h)}(hUany read of the file will return the current contents of the variable ``my_variable``h](hFany read of the file will return the current contents of the variable }(hj3 hhhNhNubj)}(h``my_variable``h]h my_variable}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3 ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj/ ubah}(h]h ]h"]h$]h&]uh1jAhj ubeh}(h]h ]h"]h$]h&]jjuh1j<hhhKhjubeh}(h]h ]h"]h$]h&]uh1jAhjhhhNhNubjB)}(hXClean up the directory when removing the device (``debugfs_remove_recursive(parent);``) h]h)}(hWClean up the directory when removing the device (``debugfs_remove_recursive(parent);``)h](h1Clean up the directory when removing the device (}(hje hhhNhNubj)}(h%``debugfs_remove_recursive(parent);``h]h!debugfs_remove_recursive(parent);}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje ubh)}(hje hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhja ubah}(h]h ]h"]h$]h&]uh1jAhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1j<hhhKhjhhubh)}(h;For the full documentation see :doc:`/filesystems/debugfs`.h](hFor the full documentation see }(hj hhhNhNubh)}(h:doc:`/filesystems/debugfs`h]h)}(hj h]h/filesystems/debugfs}(hj hhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftypedoc refexplicitrefwarnh/filesystems/debugfsuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]jxah ]h"]debugfsah$]h&]uh1hhhhhhhhKxubh)}(hhh](h)}(h.KASAN, UBSAN, lockdep and other error checkersh]h.KASAN, UBSAN, lockdep and other error checkers}(hj hhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhj hhhhhKubh)}(hhh](h)}(h KASAN (Kernel Address Sanitizer)h]h KASAN (Kernel Address Sanitizer)}(hj hhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhj hhhhhKubh)}(hPrerequisite: ``CONFIG_KASAN``h](hPrerequisite: }(hj hhhNhNubj)}(h``CONFIG_KASAN``h]h CONFIG_KASAN}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hKASAN is a dynamic memory error detector that helps to find use-after-free and out-of-bounds bugs. It uses compile-time instrumentation to check every memory access.h]hKASAN is a dynamic memory error detector that helps to find use-after-free and out-of-bounds bugs. It uses compile-time instrumentation to check every memory access.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h7For the full documentation see :doc:`/dev-tools/kasan`.h](hFor the full documentation see }(hj hhhNhNubh)}(h:doc:`/dev-tools/kasan`h]h)}(hj h]h/dev-tools/kasan}(hj" hhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj, reftypedoc refexplicitrefwarnh/dev-tools/kasanuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]jah ]h"] kasan (kernel address sanitizer)ah$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(h$UBSAN (Undefined Behavior Sanitizer)h]h$UBSAN (Undefined Behavior Sanitizer)}(hjR hhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhjO hhhhhKubh)}(hPrerequisite: ``CONFIG_UBSAN``h](hPrerequisite: }(hj` hhhNhNubj)}(h``CONFIG_UBSAN``h]h CONFIG_UBSAN}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj` ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjO hhubh)}(hUBSAN relies on compiler instrumentation and runtime checks to detect undefined behavior. It is designed to find a variety of issues, including signed integer overflow, array index out of bounds, and more.h]hUBSAN relies on compiler instrumentation and runtime checks to detect undefined behavior. It is designed to find a variety of issues, including signed integer overflow, array index out of bounds, and more.}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjO hhubh)}(h6For the full documentation see :doc:`/dev-tools/ubsan`h](hFor the full documentation see }(hj hhhNhNubh)}(h:doc:`/dev-tools/ubsan`h]h)}(hj h]h/dev-tools/ubsan}(hj hhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftypedoc refexplicitrefwarnh/dev-tools/ubsanuh1hhhhKhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjO hhubeh}(h]jah ]h"]$ubsan (undefined behavior sanitizer)ah$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(h#lockdep (Lock Dependency Validator)h]h#lockdep (Lock Dependency Validator)}(hj hhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhj hhhhhKubh)}(h&Prerequisite: ``CONFIG_DEBUG_LOCKDEP``h](hPrerequisite: }(hj hhhNhNubj)}(h``CONFIG_DEBUG_LOCKDEP``h]hCONFIG_DEBUG_LOCKDEP}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXKlockdep is a runtime lock dependency validator that detects potential deadlocks and other locking-related issues in the kernel. It tracks lock acquisitions and releases, building a dependency graph that is analyzed for potential deadlocks. lockdep is especially useful for validating the correctness of lock ordering in the kernel.h]hXKlockdep is a runtime lock dependency validator that detects potential deadlocks and other locking-related issues in the kernel. It tracks lock acquisitions and releases, building a dependency graph that is analyzed for potential deadlocks. lockdep is especially useful for validating the correctness of lock ordering in the kernel.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]jah ]h"]#lockdep (lock dependency validator)ah$]h&]uh1hhj hhhhhKubh)}(hhh](h)}(h)PSI (Pressure stall information tracking)h]h)PSI (Pressure stall information tracking)}(hj hhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhj hhhhhKubh)}(hPrerequisite: ``CONFIG_PSI``h](hPrerequisite: }(hj hhhNhNubj)}(h``CONFIG_PSI``h]h CONFIG_PSI}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hPSI is a measurement tool to identify excessive overcommits on hardware resources, that can cause performance disruptions or even OOM kills.h]hPSI is a measurement tool to identify excessive overcommits on hardware resources, that can cause performance disruptions or even OOM kills.}(hj. hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]jah ]h"])psi (pressure stall information tracking)ah$]h&]uh1hhj hhhhhKubeh}(h]jah ]h"].kasan, ubsan, lockdep and other error checkersah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hdevice coredumph]hdevice coredump}(hjM hhhNhNubah}(h]h ]h"]h$]h&]hjGuh1hhjJ hhhhhKubh)}(hJPrerequisite: ``CONFIG_DEV_COREDUMP`` & ``#include ``h](hPrerequisite: }(hj[ hhhNhNubj)}(h``CONFIG_DEV_COREDUMP``h]hCONFIG_DEV_COREDUMP}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ ubh & }(hj[ hhhNhNubj)}(h"``#include ``h]h#include }(hju hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjJ hhubh)}(hXProvides the infrastructure for a driver to provide arbitrary data to userland. It is most often used in conjunction with udev or similar userland application to listen for kernel uevents, which indicate that the dump is ready. Udev has rules to copy that file somewhere for long-term storage and analysis, as by default, the data for the dump is automatically cleaned up after a default 5 minutes. That data is analyzed with driver-specific tools or GDB.h]hXProvides the infrastructure for a driver to provide arbitrary data to userland. It is most often used in conjunction with udev or similar userland application to listen for kernel uevents, which indicate that the dump is ready. Udev has rules to copy that file somewhere for long-term storage and analysis, as by default, the data for the dump is automatically cleaned up after a default 5 minutes. That data is analyzed with driver-specific tools or GDB.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJ hhubh)}(hjA device coredump can be created with a vmalloc area, with read/free methods, or as a scatter/gather list.h]hjA device coredump can be created with a vmalloc area, with read/free methods, or as a scatter/gather list.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJ hhubh)}(hX You can find an example implementation at: `drivers/media/platform/qcom/venus/core.c `__, in the Bluetooth HCI layer, in several wireless drivers, and in several DRM drivers.h](h+You can find an example implementation at: }(hj hhhNhNubjJ)}(h`drivers/media/platform/qcom/venus/core.c `__h]h(drivers/media/platform/qcom/venus/core.c}(hj hhhNhNubah}(h]h ]h"]h$]h&]name(drivers/media/platform/qcom/venus/core.cj\https://elixir.bootlin.com/linux/v6.11.6/source/drivers/media/platform/qcom/venus/core.c#L30uh1jIhj ubhV, in the Bluetooth HCI layer, in several wireless drivers, and in several DRM drivers.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjJ hhubh)}(hhh](h)}(hdevcoredump interfacesh]hdevcoredump interfaces}(hj hhhNhNubah}(h]h ]h"]h$]h&]hjfuh1hhj hhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singledev_coredumpm (C function)c.dev_coredumpmhNtauh1j hj hhhNhNubhdesc)}(hhh](hdesc_signature)}(hvoid dev_coredumpm (struct device *dev, struct module *owner, void *data, size_t datalen, gfp_t gfp, ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen), void (*free)(void *data))h]hdesc_signature_line)}(hvoid dev_coredumpm(struct device *dev, struct module *owner, void *data, size_t datalen, gfp_t gfp, ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen), void (*free)(void *data))h](hdesc_sig_keyword_type)}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]ktah"]h$]h&]uh1j hj hhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKtubhdesc_sig_space)}(h h]h }(hj hhhNhNubah}(h]h ]wah"]h$]h&]uh1j hj hhhj hKtubh desc_name)}(h dev_coredumpmh]h desc_sig_name)}(h dev_coredumpmh]h dev_coredumpm}(hj& hhhNhNubah}(h]h ]nah"]h$]h&]uh1j$ hj ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j hj hhhj hKtubhdesc_parameterlist)}(h(struct device *dev, struct module *owner, void *data, size_t datalen, gfp_t gfp, ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen), void (*free)(void *data))h](hdesc_parameter)}(hstruct device *devh](hdesc_sig_keyword)}(hstructh]hstruct}(hjK hhhNhNubah}(h]h ]kah"]h$]h&]uh1jI hjE ubj )}(h h]h }(hjZ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjE ubh)}(hhh]j% )}(hdeviceh]hdevice}(hjk hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjh ubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjm modnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}j j( sbc.dev_coredumpmasbuh1hhjE ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjE ubhdesc_sig_punctuation)}(h*h]h*}(hj hhhNhNubah}(h]h ]pah"]h$]h&]uh1j hjE ubj% )}(hdevh]hdev}(hj hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjE ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj? ubjD )}(hstruct module *ownerh](jJ )}(hjM h]hstruct}(hj hhhNhNubah}(h]h ]jV ah"]h$]h&]uh1jI hj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j% )}(hmoduleh]hmodule}(hj hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj modnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj h]h*}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hownerh]howner}(hj# hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj? ubjD )}(h void *datah](j )}(hvoidh]hvoid}(hj< hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8 ubj )}(h h]h }(hjJ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8 ubj )}(hj h]h*}(hjX hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj8 ubj% )}(hdatah]hdata}(hje hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj8 ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj? ubjD )}(hsize_t datalenh](h)}(hhh]j% )}(hsize_th]hsize_t}(hj hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj~ ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj modnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhjz ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjz ubj% )}(hdatalenh]hdatalen}(hj hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjz ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj? ubjD )}(h gfp_t gfph](h)}(hhh]j% )}(hgfp_th]hgfp_t}(hj hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj modnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hgfph]hgfp}(hj hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj? ubjD )}(hVssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)h](h)}(hhh]j% )}(hssize_th]hssize_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhj ubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h(h]h(}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj h]h*}(hjKhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hreadh]hread}(hjXhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubj )}(h)h]h)}(hjfhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj?h]h(}(hjthhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hcharh]hchar}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hbufferh]hbuffer}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubj )}(h,h]h,}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j% )}(hloff_th]hloff_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hoffseth]hoffset}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubj )}(hjh]h,}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j% )}(hsize_th]hsize_t}(hj/hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj,ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj1modnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhj ubj )}(h h]h }(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hcounth]hcount}(hj[hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubj )}(hjh]h,}(hjihhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjvhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubj )}(hjh]h,}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubh)}(hhh]j% )}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hdatalenh]hdatalen}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubj )}(hjhh]h)}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj? ubjD )}(hvoid (*free)(void *data)h](j )}(hvoidh]hvoid}(hj+hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj )}(h h]h }(hj9hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj )}(hj?h]h(}(hjGhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj )}(hj h]h*}(hjThhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj% )}(hfreeh]hfree}(hjahhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj'ubj )}(hjhh]h)}(hjohhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj )}(hj?h]h(}(hj|hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubj% )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj'ubj )}(hjhh]h)}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj'ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj? ubeh}(h]h ]h"]h$]h&]hhuh1j= hj hhhj hKtubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1j sphinx_line_type declaratorhj hhhj hKtubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j hj hKthj hhubh desc_content)}(hhh]h)}(h-create device coredump with read/free methodsh]h-create device coredump with read/free methods}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKfhjhhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKtubeh}(h]h ](j functioneh"]h$]h&]domainj objtypej desctypej noindex noindexentrynocontentsentryuh1j hhhj hNhNubh container)}(hX,**Parameters** ``struct device *dev`` the struct device for the crashed device ``struct module *owner`` the module that contains the read/free functions, use ``THIS_MODULE`` ``void *data`` data cookie for the **read**/**free** functions ``size_t datalen`` length of the data ``gfp_t gfp`` allocation flags ``ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)`` function to read from the given buffer ``void (*free)(void *data)`` function to free the given buffer **Description** Creates a new device coredump for the given device. If a previous one hasn't been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed the **free** function will be called to free the data.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKjhjubhdefinition_list)}(hhh](hdefinition_list_item)}(h@``struct device *dev`` the struct device for the crashed device h](hterm)}(h``struct device *dev``h]j)}(hjBh]hstruct device *dev}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKghj:ubh definition)}(hhh]h)}(h(the struct device for the crashed deviceh]h(the struct device for the crashed device}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhKghjZubah}(h]h ]h"]h$]h&]uh1jXhj:ubeh}(h]h ]h"]h$]h&]uh1j8hjWhKghj5ubj9)}(h_``struct module *owner`` the module that contains the read/free functions, use ``THIS_MODULE`` h](j?)}(h``struct module *owner``h]j)}(hj}h]hstruct module *owner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKhhjwubjY)}(hhh]h)}(hEthe module that contains the read/free functions, use ``THIS_MODULE``h](h6the module that contains the read/free functions, use }(hjhhhNhNubj)}(h``THIS_MODULE``h]h THIS_MODULE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhjhKhhjubah}(h]h ]h"]h$]h&]uh1jXhjwubeh}(h]h ]h"]h$]h&]uh1j8hjhKhhj5ubj9)}(h?``void *data`` data cookie for the **read**/**free** functions h](j?)}(h``void *data``h]j)}(hjh]h void *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKihjubjY)}(hhh]h)}(h/data cookie for the **read**/**free** functionsh](hdata cookie for the }(hjhhhNhNubj)}(h**read**h]hread}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/}(hjhhhNhNubj)}(h**free**h]hfree}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh functions}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKihjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hjhKihj5ubj9)}(h&``size_t datalen`` length of the data h](j?)}(h``size_t datalen``h]j)}(hj!h]hsize_t datalen}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKjhjubjY)}(hhh]h)}(hlength of the datah]hlength of the data}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hKjhj7ubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hj6hKjhj5ubj9)}(h``gfp_t gfp`` allocation flags h](j?)}(h ``gfp_t gfp``h]j)}(hjZh]h gfp_t gfp}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKkhjTubjY)}(hhh]h)}(hallocation flagsh]hallocation flags}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohKkhjpubah}(h]h ]h"]h$]h&]uh1jXhjTubeh}(h]h ]h"]h$]h&]uh1j8hjohKkhj5ubj9)}(h``ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)`` function to read from the given buffer h](j?)}(hZ``ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)``h]j)}(hjh]hVssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKlhjubjY)}(hhh]h)}(h&function to read from the given bufferh]h&function to read from the given buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKlhjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hjhKlhj5ubj9)}(h?``void (*free)(void *data)`` function to free the given buffer h](j?)}(h``void (*free)(void *data)``h]j)}(hjh]hvoid (*free)(void *data)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKmhjubjY)}(hhh]h)}(h!function to free the given bufferh]h!function to free the given buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKmhjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hjhKmhj5ubeh}(h]h ]h"]h$]h&]uh1j3hjubh)}(h**Description**h]j)}(hjh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKohjubh)}(hXCreates a new device coredump for the given device. If a previous one hasn't been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed the **free** function will be called to free the data.h](hCreates a new device coredump for the given device. If a previous one hasn’t been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed the }(hjhhhNhNubj)}(h**free**h]hfree}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh* function will be called to free the data.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKohjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dev_coredumpv (C function)c.dev_coredumpvhNtauh1j hj hhhNhNubj )}(hhh](j )}(hNvoid dev_coredumpv (struct device *dev, void *data, size_t datalen, gfp_t gfp)h]j )}(hMvoid dev_coredumpv(struct device *dev, void *data, size_t datalen, gfp_t gfp)h](j )}(hvoidh]hvoid}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZhhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKubj )}(h h]h }(hjmhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjZhhhjlhKubj )}(h dev_coredumpvh]j% )}(h dev_coredumpvh]h dev_coredumpv}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj{ubah}(h]h ](j8 j9 eh"]h$]h&]hhuh1j hjZhhhjlhKubj> )}(h;(struct device *dev, void *data, size_t datalen, gfp_t gfp)h](jD )}(hstruct device *devh](jJ )}(hjM h]hstruct}(hjhhhNhNubah}(h]h ]jV ah"]h$]h&]uh1jI hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j% )}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j )}j jsbc.dev_coredumpvasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdevh]hdev}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(h void *datah](j )}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj h]h*}(hj)hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hdatah]hdata}(hj6hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(hsize_t datalenh](h)}(hhh]j% )}(hsize_th]hsize_t}(hjRhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjOubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjTmodnameN classnameNj j )}j ]jc.dev_coredumpvasbuh1hhjKubj )}(h h]h }(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjKubj% )}(hdatalenh]hdatalen}(hj~hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjKubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(h gfp_t gfph](h)}(hhh]j% )}(hgfp_th]hgfp_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]jc.dev_coredumpvasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hgfph]hgfp}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubeh}(h]h ]h"]h$]h&]hhuh1j= hjZhhhjlhKubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjVhhhjlhKubah}(h]jQah ](jjeh"]h$]h&]jj)jhuh1j hjlhKhjShhubj)}(hhh]h)}(h(create device coredump with vmalloc datah]h(create device coredump with vmalloc data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKhjhhubah}(h]h ]h"]h$]h&]uh1jhjShhhjlhKubeh}(h]h ](j functioneh"]h$]h&]jj jjjjjjjuh1j hhhj hNhNubj)}(hXw**Parameters** ``struct device *dev`` the struct device for the crashed device ``void *data`` vmalloc data containing the device coredump ``size_t datalen`` length of the data ``gfp_t gfp`` allocation flags **Description** This function takes ownership of the vmalloc'ed data and will free it when it is no longer used. See dev_coredumpm() for more information.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKhj ubj4)}(hhh](j9)}(h@``struct device *dev`` the struct device for the crashed device h](j?)}(h``struct device *dev``h]j)}(hj1h]hstruct device *dev}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKhj+ubjY)}(hhh]h)}(h(the struct device for the crashed deviceh]h(the struct device for the crashed device}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhKhjGubah}(h]h ]h"]h$]h&]uh1jXhj+ubeh}(h]h ]h"]h$]h&]uh1j8hjFhKhj(ubj9)}(h;``void *data`` vmalloc data containing the device coredump h](j?)}(h``void *data``h]j)}(hjjh]h void *data}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKhjdubjY)}(hhh]h)}(h+vmalloc data containing the device coredumph]h+vmalloc data containing the device coredump}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jXhjdubeh}(h]h ]h"]h$]h&]uh1j8hjhKhj(ubj9)}(h&``size_t datalen`` length of the data h](j?)}(h``size_t datalen``h]j)}(hjh]hsize_t datalen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKhjubjY)}(hhh]h)}(hlength of the datah]hlength of the data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hjhKhj(ubj9)}(h``gfp_t gfp`` allocation flags h](j?)}(h ``gfp_t gfp``h]j)}(hjh]h gfp_t gfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKhjubjY)}(hhh]h)}(hallocation flagsh]hallocation flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hjhKhj(ubeh}(h]h ]h"]h$]h&]uh1j3hj ubh)}(h**Description**h]j)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKhj ubh)}(hThis function takes ownership of the vmalloc'ed data and will free it when it is no longer used. See dev_coredumpm() for more information.h]hThis function takes ownership of the vmalloc’ed data and will free it when it is no longer used. See dev_coredumpm() for more information.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chKhj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j devcd_free_sgtable (C function)c.devcd_free_sgtablehNtauh1j hj hhhNhNubj )}(hhh](j )}(h$void devcd_free_sgtable (void *data)h]j )}(h#void devcd_free_sgtable(void *data)h](j )}(hvoidh]hvoid}(hj\hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXhhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMubj )}(h h]h }(hjkhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjXhhhjjhMubj )}(hdevcd_free_sgtableh]j% )}(hdevcd_free_sgtableh]hdevcd_free_sgtable}(hj}hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjyubah}(h]h ](j8 j9 eh"]h$]h&]hhuh1j hjXhhhjjhMubj> )}(h (void *data)h]jD )}(h void *datah](j )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubah}(h]h ]h"]h$]h&]hhuh1j= hjXhhhjjhMubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjThhhjjhMubah}(h]jOah ](jjeh"]h$]h&]jj)jhuh1j hjjhMhjQhhubj)}(hhh]h)}(h^free all the memory of the given scatterlist table (i.e. both pages and scatterlist instances)h]h^free all the memory of the given scatterlist table (i.e. both pages and scatterlist instances)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjQhhhjjhMubeh}(h]h ](j functioneh"]h$]h&]jj jjjjjjjuh1j hhhj hNhNubj)}(h**Parameters** ``void *data`` pointer to sg_table to free **NOTE** if two tables allocated with devcd_alloc_sgtable and then chained using the sg_chain function then that function should be called only once on the chained tableh](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM hjubj4)}(hhh]j9)}(h+``void *data`` pointer to sg_table to free h](j?)}(h``void *data``h]j)}(hj-h]h void *data}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM hj'ubjY)}(hhh]h)}(hpointer to sg_table to freeh]hpointer to sg_table to free}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhM hjCubah}(h]h ]h"]h$]h&]uh1jXhj'ubeh}(h]h ]h"]h$]h&]uh1j8hjBhM hj$ubah}(h]h ]h"]h$]h&]uh1j3hjubh)}(h**NOTE**h]j)}(hjhh]hNOTE}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjfubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubh)}(hif two tables allocated with devcd_alloc_sgtable and then chained using the sg_chain function then that function should be called only once on the chained tableh]hif two tables allocated with devcd_alloc_sgtable and then chained using the sg_chain function then that function should be called only once on the chained table}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j $devcd_read_from_sgtable (C function)c.devcd_read_from_sgtablehNtauh1j hj hhhNhNubj )}(hhh](j )}(hjssize_t devcd_read_from_sgtable (char *buffer, loff_t offset, size_t buf_len, void *data, size_t data_len)h]j )}(hissize_t devcd_read_from_sgtable(char *buffer, loff_t offset, size_t buf_len, void *data, size_t data_len)h](h)}(hhh]j% )}(hssize_th]hssize_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j )}j devcd_read_from_sgtablesbc.devcd_read_from_sgtableasbuh1hhjhhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMubj )}(hdevcd_read_from_sgtableh]j% )}(hjh]hdevcd_read_from_sgtable}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ](j8 j9 eh"]h$]h&]hhuh1j hjhhhjhMubj> )}(hJ(char *buffer, loff_t offset, size_t buf_len, void *data, size_t data_len)h](jD )}(h char *bufferh](j )}(hcharh]hchar}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hbufferh]hbuffer}(hj(hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(h loff_t offseth](h)}(hhh]j% )}(hloff_th]hloff_t}(hjDhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjAubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjFmodnameN classnameNj j )}j ]jc.devcd_read_from_sgtableasbuh1hhj=ubj )}(h h]h }(hjbhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj=ubj% )}(hoffseth]hoffset}(hjphhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj=ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(hsize_t buf_lenh](h)}(hhh]j% )}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]jc.devcd_read_from_sgtableasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hbuf_lenh]hbuf_len}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(h void *datah](j )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(hsize_t data_lenh](h)}(hhh]j% )}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]jc.devcd_read_from_sgtableasbuh1hhjubj )}(h h]h }(hj4hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdata_lenh]hdata_len}(hjBhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubeh}(h]h ]h"]h$]h&]hhuh1j= hjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j hjhMhjhhubj)}(hhh]h)}(hMcopy data from sg_table to a given buffer and return the number of bytes readh]hMcopy data from sg_table to a given buffer and return the number of bytes read}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjihhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](j functioneh"]h$]h&]jj jjjjjjjuh1j hhhj hNhNubj)}(hX}**Parameters** ``char *buffer`` the buffer to copy the data to it ``loff_t offset`` start copy from **offset****** bytes from the head of the data in the given scatterlist ``size_t buf_len`` the length of the buffer ``void *data`` the scatterlist table to copy from ``size_t data_len`` the length of the data in the sg_table **Return** the number of bytes copiedh](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubj4)}(hhh](j9)}(h3``char *buffer`` the buffer to copy the data to it h](j?)}(h``char *buffer``h]j)}(hjh]h char *buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubjY)}(hhh]h)}(h!the buffer to copy the data to ith]h!the buffer to copy the data to it}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hjhMhjubj9)}(hj``loff_t offset`` start copy from **offset****** bytes from the head of the data in the given scatterlist h](j?)}(h``loff_t offset``h]j)}(hjh]h loff_t offset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubjY)}(hhh]h)}(hWstart copy from **offset****** bytes from the head of the data in the given scatterlisth](hstart copy from }(hjhhhNhNubj)}(h**offset******h]h offset****}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9 bytes from the head of the data in the given scatterlist}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hjhMhjubj9)}(h,``size_t buf_len`` the length of the buffer h](j?)}(h``size_t buf_len``h]j)}(hj2h]hsize_t buf_len}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj,ubjY)}(hhh]h)}(hthe length of the bufferh]hthe length of the buffer}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhMhjHubah}(h]h ]h"]h$]h&]uh1jXhj,ubeh}(h]h ]h"]h$]h&]uh1j8hjGhMhjubj9)}(h2``void *data`` the scatterlist table to copy from h](j?)}(h``void *data``h]j)}(hjkh]h void *data}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjeubjY)}(hhh]h)}(h"the scatterlist table to copy fromh]h"the scatterlist table to copy from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jXhjeubeh}(h]h ]h"]h$]h&]uh1j8hjhMhjubj9)}(h;``size_t data_len`` the length of the data in the sg_table h](j?)}(h``size_t data_len``h]j)}(hjh]hsize_t data_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubjY)}(hhh]h)}(h&the length of the data in the sg_tableh]h&the length of the data in the sg_table}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hjhMhjubeh}(h]h ]h"]h$]h&]uh1j3hjubh)}(h **Return**h]j)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubh)}(hthe number of bytes copiedh]hthe number of bytes copied}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dev_coredump_put (C function)c.dev_coredump_puthNtauh1j hj hhhNhNubj )}(hhh](j )}(h*void dev_coredump_put (struct device *dev)h]j )}(h)void dev_coredump_put(struct device *dev)h](j )}(hvoidh]hvoid}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM8ubj )}(h h]h }(hj3hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj hhhj2hM8ubj )}(hdev_coredump_puth]j% )}(hdev_coredump_puth]hdev_coredump_put}(hjEhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjAubah}(h]h ](j8 j9 eh"]h$]h&]hhuh1j hj hhhj2hM8ubj> )}(h(struct device *dev)h]jD )}(hstruct device *devh](jJ )}(hjM h]hstruct}(hjahhhNhNubah}(h]h ]jV ah"]h$]h&]uh1jI hj]ubj )}(h h]h }(hjnhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubh)}(hhh]j% )}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj|ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j )}j jGsbc.dev_coredump_putasbuh1hhj]ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj]ubj% )}(hdevh]hdev}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjYubah}(h]h ]h"]h$]h&]hhuh1j= hj hhhj2hM8ubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjhhhj2hM8ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j hj2hM8hjhhubj)}(hhh]h)}(hremove device coredumph]hremove device coredump}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM/hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj2hM8ubeh}(h]h ](j functioneh"]h$]h&]jj jjjjjjjuh1j hhhj hNhNubj)}(hXI**Parameters** ``struct device *dev`` the struct device for the crashed device **Description** dev_coredump_put() removes coredump, if exists, for a given device from the file system and free its associated data otherwise, does nothing. It is useful for modules that do not want to keep coredump available after its unload.h](h)}(h**Parameters**h]j)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM3hjubj4)}(hhh]j9)}(h@``struct device *dev`` the struct device for the crashed device h](j?)}(h``struct device *dev``h]j)}(hj%h]hstruct device *dev}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM0hjubjY)}(hhh]h)}(h(the struct device for the crashed deviceh]h(the struct device for the crashed device}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:hM0hj;ubah}(h]h ]h"]h$]h&]uh1jXhjubeh}(h]h ]h"]h$]h&]uh1j8hj:hM0hjubah}(h]h ]h"]h$]h&]uh1j3hjubh)}(h**Description**h]j)}(hj`h]h Description}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM2hjubh)}(hdev_coredump_put() removes coredump, if exists, for a given device from the file system and free its associated data otherwise, does nothing.h]hdev_coredump_put() removes coredump, if exists, for a given device from the file system and free its associated data otherwise, does nothing.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM2hjubh)}(hVIt is useful for modules that do not want to keep coredump available after its unload.h]hVIt is useful for modules that do not want to keep coredump available after its unload.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM5hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j "dev_coredumpm_timeout (C function)c.dev_coredumpm_timeouthNtauh1j hj hhhNhNubj )}(hhh](j )}(hvoid dev_coredumpm_timeout (struct device *dev, struct module *owner, void *data, size_t datalen, gfp_t gfp, ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen), void (*free)(void *data), unsigned long timeout)h]j )}(hvoid dev_coredumpm_timeout(struct device *dev, struct module *owner, void *data, size_t datalen, gfp_t gfp, ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen), void (*free)(void *data), unsigned long timeout)h](j )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMVubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjhhhjhMVubj )}(hdev_coredumpm_timeouth]j% )}(hdev_coredumpm_timeouth]hdev_coredumpm_timeout}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ](j8 j9 eh"]h$]h&]hhuh1j hjhhhjhMVubj> )}(h(struct device *dev, struct module *owner, void *data, size_t datalen, gfp_t gfp, ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen), void (*free)(void *data), unsigned long timeout)h](jD )}(hstruct device *devh](jJ )}(hjM h]hstruct}(hjhhhNhNubah}(h]h ]jV ah"]h$]h&]uh1jI hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j% )}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j )}j jsbc.dev_coredumpm_timeoutasbuh1hhjubj )}(h h]h }(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdevh]hdev}(hjJhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(hstruct module *ownerh](jJ )}(hjM h]hstruct}(hjchhhNhNubah}(h]h ]jV ah"]h$]h&]uh1jI hj_ubj )}(h h]h }(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubh)}(hhh]j% )}(hmoduleh]hmodule}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj~ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j+c.dev_coredumpm_timeoutasbuh1hhj_ubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj_ubj% )}(hownerh]howner}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(h void *datah](j )}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(hsize_t datalenh](h)}(hhh]j% )}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j+c.dev_coredumpm_timeoutasbuh1hhjubj )}(h h]h }(hj6hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdatalenh]hdatalen}(hjDhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(h gfp_t gfph](h)}(hhh]j% )}(hgfp_th]hgfp_t}(hj`hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj]ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjbmodnameN classnameNj j )}j ]j+c.dev_coredumpm_timeoutasbuh1hhjYubj )}(h h]h }(hj~hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjYubj% )}(hgfph]hgfp}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjYubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(hVssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)h](h)}(hhh]j% )}(hssize_th]hssize_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j+c.dev_coredumpm_timeoutasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj?h]h(}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hreadh]hread}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubj )}(hjhh]h)}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj?h]h(}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcharh]hchar}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hj2hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hbufferh]hbuffer}(hj?hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubj )}(hjh]h,}(hjMhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjZhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j% )}(hloff_th]hloff_t}(hjkhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjhubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmmodnameN classnameNj j )}j ]j+c.dev_coredumpm_timeoutasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hoffseth]hoffset}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubj )}(hjh]h,}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j% )}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j+c.dev_coredumpm_timeoutasbuh1hhjubj )}(h h]h }(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hcounth]hcount}(hjhhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubj )}(hjh]h,}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj& hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hj4 hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdatah]hdata}(hjA hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubj )}(hjh]h,}(hjO hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(h h]h }(hj\ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubh)}(hhh]j% )}(hsize_th]hsize_t}(hjm hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjj ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjo modnameN classnameNj j )}j ]j+c.dev_coredumpm_timeoutasbuh1hhjubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj% )}(hdatalenh]hdatalen}(hj hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjubj )}(hjhh]h)}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(hvoid (*free)(void *data)h](j )}(hvoidh]hvoid}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj?h]h(}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj h]h*}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hfreeh]hfree}(hj hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubj )}(hjhh]h)}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj?h]h(}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hvoidh]hvoid}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(h h]h }(hj+!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hj h]h*}(hj9!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj% )}(hdatah]hdata}(hjF!hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj ubj )}(hjhh]h)}(hjT!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubjD )}(hunsigned long timeouth](j )}(hunsignedh]hunsigned}(hjl!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh!ubj )}(h h]h }(hjz!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh!ubj )}(hlongh]hlong}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh!ubj )}(h h]h }(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjh!ubj% )}(htimeouth]htimeout}(hj!hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hjh!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hjubeh}(h]h ]h"]h$]h&]hhuh1j= hjhhhjhMVubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjhhhjhMVubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j hjhMVhjhhubj)}(hhh]h)}(hDcreate device coredump with read/free methods with a custom timeout.h]hDcreate device coredump with read/free methods with a custom timeout.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMFhj!hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMVubeh}(h]h ](j functioneh"]h$]h&]jj jj!jj!jjjuh1j hhhj hNhNubj)}(hXl**Parameters** ``struct device *dev`` the struct device for the crashed device ``struct module *owner`` the module that contains the read/free functions, use ``THIS_MODULE`` ``void *data`` data cookie for the **read**/**free** functions ``size_t datalen`` length of the data ``gfp_t gfp`` allocation flags ``ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)`` function to read from the given buffer ``void (*free)(void *data)`` function to free the given buffer ``unsigned long timeout`` time in jiffies to remove coredump **Description** Creates a new device coredump for the given device. If a previous one hasn't been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed the **free** function will be called to free the data.h](h)}(h**Parameters**h]j)}(hj!h]h Parameters}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMJhj!ubj4)}(hhh](j9)}(h@``struct device *dev`` the struct device for the crashed device h](j?)}(h``struct device *dev``h]j)}(hj"h]hstruct device *dev}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj "ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMHhj "ubjY)}(hhh]h)}(h(the struct device for the crashed deviceh]h(the struct device for the crashed device}(hj("hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$"hMHhj%"ubah}(h]h ]h"]h$]h&]uh1jXhj "ubeh}(h]h ]h"]h$]h&]uh1j8hj$"hMHhj"ubj9)}(h_``struct module *owner`` the module that contains the read/free functions, use ``THIS_MODULE`` h](j?)}(h``struct module *owner``h]j)}(hjH"h]hstruct module *owner}(hjJ"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjF"ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMIhjB"ubjY)}(hhh]h)}(hEthe module that contains the read/free functions, use ``THIS_MODULE``h](h6the module that contains the read/free functions, use }(hja"hhhNhNubj)}(h``THIS_MODULE``h]h THIS_MODULE}(hji"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja"ubeh}(h]h ]h"]h$]h&]uh1hhj]"hMIhj^"ubah}(h]h ]h"]h$]h&]uh1jXhjB"ubeh}(h]h ]h"]h$]h&]uh1j8hj]"hMIhj"ubj9)}(h?``void *data`` data cookie for the **read**/**free** functions h](j?)}(h``void *data``h]j)}(hj"h]h void *data}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMJhj"ubjY)}(hhh]h)}(h/data cookie for the **read**/**free** functionsh](hdata cookie for the }(hj"hhhNhNubj)}(h**read**h]hread}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh/}(hj"hhhNhNubj)}(h**free**h]hfree}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh functions}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj"hMJhj"ubah}(h]h ]h"]h$]h&]uh1jXhj"ubeh}(h]h ]h"]h$]h&]uh1j8hj"hMJhj"ubj9)}(h&``size_t datalen`` length of the data h](j?)}(h``size_t datalen``h]j)}(hj"h]hsize_t datalen}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMKhj"ubjY)}(hhh]h)}(hlength of the datah]hlength of the data}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMKhj#ubah}(h]h ]h"]h$]h&]uh1jXhj"ubeh}(h]h ]h"]h$]h&]uh1j8hj#hMKhj"ubj9)}(h``gfp_t gfp`` allocation flags h](j?)}(h ``gfp_t gfp``h]j)}(hj%#h]h gfp_t gfp}(hj'#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj##ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMLhj#ubjY)}(hhh]h)}(hallocation flagsh]hallocation flags}(hj>#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:#hMLhj;#ubah}(h]h ]h"]h$]h&]uh1jXhj#ubeh}(h]h ]h"]h$]h&]uh1j8hj:#hMLhj"ubj9)}(h``ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)`` function to read from the given buffer h](j?)}(hZ``ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)``h]j)}(hj^#h]hVssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)}(hj`#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\#ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMMhjX#ubjY)}(hhh]h)}(h&function to read from the given bufferh]h&function to read from the given buffer}(hjw#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs#hMMhjt#ubah}(h]h ]h"]h$]h&]uh1jXhjX#ubeh}(h]h ]h"]h$]h&]uh1j8hjs#hMMhj"ubj9)}(h?``void (*free)(void *data)`` function to free the given buffer h](j?)}(h``void (*free)(void *data)``h]j)}(hj#h]hvoid (*free)(void *data)}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMNhj#ubjY)}(hhh]h)}(h!function to free the given bufferh]h!function to free the given buffer}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMNhj#ubah}(h]h ]h"]h$]h&]uh1jXhj#ubeh}(h]h ]h"]h$]h&]uh1j8hj#hMNhj"ubj9)}(h=``unsigned long timeout`` time in jiffies to remove coredump h](j?)}(h``unsigned long timeout``h]j)}(hj#h]hunsigned long timeout}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMOhj#ubjY)}(hhh]h)}(h"time in jiffies to remove coredumph]h"time in jiffies to remove coredump}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMOhj#ubah}(h]h ]h"]h$]h&]uh1jXhj#ubeh}(h]h ]h"]h$]h&]uh1j8hj#hMOhj"ubeh}(h]h ]h"]h$]h&]uh1j3hj!ubh)}(h**Description**h]j)}(hj $h]h Description}(hj $hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj $ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMQhj!ubh)}(hXCreates a new device coredump for the given device. If a previous one hasn't been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed the **free** function will be called to free the data.h](hCreates a new device coredump for the given device. If a previous one hasn’t been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed the }(hj!$hhhNhNubj)}(h**free**h]hfree}(hj)$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!$ubh* function will be called to free the data.}(hj!$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMQhj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubj )}(hhh]h}(h]h ]h"]h$]h&]entries](j dev_coredumpsg (C function)c.dev_coredumpsghNtauh1j hj hhhNhNubj )}(hhh](j )}(h^void dev_coredumpsg (struct device *dev, struct scatterlist *table, size_t datalen, gfp_t gfp)h]j )}(h]void dev_coredumpsg(struct device *dev, struct scatterlist *table, size_t datalen, gfp_t gfp)h](j )}(hvoidh]hvoid}(hjb$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^$hhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMubj )}(h h]h }(hjq$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj^$hhhjp$hMubj )}(hdev_coredumpsgh]j% )}(hdev_coredumpsgh]hdev_coredumpsg}(hj$hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj$ubah}(h]h ](j8 j9 eh"]h$]h&]hhuh1j hj^$hhhjp$hMubj> )}(hJ(struct device *dev, struct scatterlist *table, size_t datalen, gfp_t gfp)h](jD )}(hstruct device *devh](jJ )}(hjM h]hstruct}(hj$hhhNhNubah}(h]h ]jV ah"]h$]h&]uh1jI hj$ubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubh)}(hhh]j% )}(hdeviceh]hdevice}(hj$hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj$ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj$modnameN classnameNj j )}j ]j )}j j$sbc.dev_coredumpsgasbuh1hhj$ubj )}(h h]h }(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubj )}(hj h]h*}(hj$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj$ubj% )}(hdevh]hdev}(hj$hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj$ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj$ubjD )}(hstruct scatterlist *tableh](jJ )}(hjM h]hstruct}(hj%hhhNhNubah}(h]h ]jV ah"]h$]h&]uh1jI hj %ubj )}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj %ubh)}(hhh]j% )}(h scatterlisth]h scatterlist}(hj/%hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj,%ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj1%modnameN classnameNj j )}j ]j$c.dev_coredumpsgasbuh1hhj %ubj )}(h h]h }(hjM%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj %ubj )}(hj h]h*}(hj[%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj %ubj% )}(htableh]htable}(hjh%hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj %ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj$ubjD )}(hsize_t datalenh](h)}(hhh]j% )}(hsize_th]hsize_t}(hj%hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj%ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj%modnameN classnameNj j )}j ]j$c.dev_coredumpsgasbuh1hhj}%ubj )}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj}%ubj% )}(hdatalenh]hdatalen}(hj%hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj}%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj$ubjD )}(h gfp_t gfph](h)}(hhh]j% )}(hgfp_th]hgfp_t}(hj%hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj%ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj%modnameN classnameNj j )}j ]j$c.dev_coredumpsgasbuh1hhj%ubj )}(h h]h }(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj%ubj% )}(hgfph]hgfp}(hj%hhhNhNubah}(h]h ]j1 ah"]h$]h&]uh1j$ hj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jC hj$ubeh}(h]h ]h"]h$]h&]hhuh1j= hj^$hhhjp$hMubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjZ$hhhjp$hMubah}(h]jU$ah ](jjeh"]h$]h&]jj)jhuh1j hjp$hMhjW$hhubj)}(hhh]h)}(h>create device coredump that uses scatterlist as data parameterh]h>create device coredump that uses scatterlist as data parameter}(hj"&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj&hhubah}(h]h ]h"]h$]h&]uh1jhjW$hhhjp$hMubeh}(h]h ](j functioneh"]h$]h&]jj jj:&jj:&jjjuh1j hhhj hNhNubj)}(hX**Parameters** ``struct device *dev`` the struct device for the crashed device ``struct scatterlist *table`` the dump data ``size_t datalen`` length of the data ``gfp_t gfp`` allocation flags **Description** Creates a new device coredump for the given device. If a previous one hasn't been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed it will free the data.h](h)}(h**Parameters**h]j)}(hjD&h]h Parameters}(hjF&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjB&ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj>&ubj4)}(hhh](j9)}(h@``struct device *dev`` the struct device for the crashed device h](j?)}(h``struct device *dev``h]j)}(hjc&h]hstruct device *dev}(hje&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhja&ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj]&ubjY)}(hhh]h)}(h(the struct device for the crashed deviceh]h(the struct device for the crashed device}(hj|&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjx&hMhjy&ubah}(h]h ]h"]h$]h&]uh1jXhj]&ubeh}(h]h ]h"]h$]h&]uh1j8hjx&hMhjZ&ubj9)}(h,``struct scatterlist *table`` the dump data h](j?)}(h``struct scatterlist *table``h]j)}(hj&h]hstruct scatterlist *table}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj&ubjY)}(hhh]h)}(h the dump datah]h the dump data}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jXhj&ubeh}(h]h ]h"]h$]h&]uh1j8hj&hMhjZ&ubj9)}(h&``size_t datalen`` length of the data h](j?)}(h``size_t datalen``h]j)}(hj&h]hsize_t datalen}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj&ubjY)}(hhh]h)}(hlength of the datah]hlength of the data}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jXhj&ubeh}(h]h ]h"]h$]h&]uh1j8hj&hMhjZ&ubj9)}(h``gfp_t gfp`` allocation flags h](j?)}(h ``gfp_t gfp``h]j)}(hj'h]h gfp_t gfp}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj 'ubah}(h]h ]h"]h$]h&]uh1j>h/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj'ubjY)}(hhh]h)}(hallocation flagsh]hallocation flags}(hj''hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#'hMhj$'ubah}(h]h ]h"]h$]h&]uh1jXhj'ubeh}(h]h ]h"]h$]h&]uh1j8hj#'hMhjZ&ubeh}(h]h ]h"]h$]h&]uh1j3hj>&ubh)}(h**Description**h]j)}(hjI'h]h Description}(hjK'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG'ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj>&ubh)}(hCreates a new device coredump for the given device. If a previous one hasn't been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed it will free the data.h]hCreates a new device coredump for the given device. If a previous one hasn’t been read yet, the new coredump is discarded. The data lifetime is determined by the device coredump framework and when it is no longer needed it will free the data.}(hj_'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj>&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj hhhNhNubh)}(h **Copyright** ©2024 : Collaborah](j)}(h **Copyright**h]h Copyright}(hjy'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju'ubh ©2024 : Collabora}(hju'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]jlah ]h"]devcoredump interfacesah$]h&]uh1hhjJ hhhhhKubeh}(h]jMah ]h"]device coredumpah$]h&]uh1hhhhhhhhKubeh}(h]jYah ]h"]'debugging advice for driver developmentah$]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'error_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}(j'jYjjjjxj(jjjjOjjjjjjj+jjJj jxjG jjL jj jj jj@ jj'jMj'jlu nametypes}(j'jjj(jjOjjjjj jG jL j j j@ j'j'uh}(jYhjj*jxjjjjj+jjjjRjjj+jjJjjxjjj jj jjO jj jj jMjJ jlj j j jQjVjOjTjjjjjjjU$jZ$hjKjrjijjjjjjjjj%jjDj;jrjijjjjjjjjjjjGj>jfj]u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j'KsRparse_messages]transform_messages] transformerN include_log] decorationNhhub.