Ysphinx.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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftargetH/translations/pt_BR/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&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainj reftypedoc refexplicitrefwarnj /process/debugging/indexuh1hhhhKhhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhtopic)}(h Contents h](h)}(hContentsh]hContents}(hjBhhhNhNubah}(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}(hj_hhhNhNubah}(h]hah ]h"]h$]h&]refid'debugging-advice-for-driver-developmentuh1j]hjZubah}(h]h ]h"]h$]h&]uh1hhjWubjQ)}(hhh](jV)}(hhh](h)}(hhh]j^)}(hhh]hprintk() & friends}(hj}hhhNhNubah}(h]id2ah ]h"]h$]h&]refidprintk-friendsuh1j]hjzubah}(h]h ]h"]h$]h&]uh1hhjwubjQ)}(hhh](jV)}(hhh]h)}(hhh]j^)}(hhh]hSimple printk()}(hjhhhNhNubah}(h]id3ah ]h"]h$]h&]refid simple-printkuh1j]hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jUhjubjV)}(hhh]h)}(hhh]j^)}(hhh]h Trace_printk}(hjhhhNhNubah}(h]id4ah ]h"]h$]h&]refid trace-printkuh1j]hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jUhjubjV)}(hhh]h)}(hhh]j^)}(hhh]hdev_dbg}(hjhhhNhNubah}(h]id5ah ]h"]h$]h&]refiddev-dbguh1j]hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jUhjubjV)}(hhh]h)}(hhh]j^)}(hhh]h Custom printk}(hjhhhNhNubah}(h]id6ah ]h"]h$]h&]refid custom-printkuh1j]hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jUhjubeh}(h]h ]h"]h$]h&]uh1jPhjwubeh}(h]h ]h"]h$]h&]uh1jUhjtubjV)}(hhh](h)}(hhh]j^)}(hhh]hFtrace}(hj0hhhNhNubah}(h]id7ah ]h"]h$]h&]refidftraceuh1j]hj-ubah}(h]h ]h"]h$]h&]uh1hhj*ubjQ)}(hhh]jV)}(hhh]h)}(hhh]j^)}(hhh]h#Creating a custom Ftrace tracepoint}(hjOhhhNhNubah}(h]id8ah ]h"]h$]h&]refid#creating-a-custom-ftrace-tracepointuh1j]hjLubah}(h]h ]h"]h$]h&]uh1hhjIubah}(h]h ]h"]h$]h&]uh1jUhjFubah}(h]h ]h"]h$]h&]uh1jPhj*ubeh}(h]h ]h"]h$]h&]uh1jUhjtubjV)}(hhh]h)}(hhh]j^)}(hhh]hDebugFS}(hj}hhhNhNubah}(h]id9ah ]h"]h$]h&]refiddebugfsuh1j]hjzubah}(h]h ]h"]h$]h&]uh1hhjwubah}(h]h ]h"]h$]h&]uh1jUhjtubjV)}(hhh](h)}(hhh]j^)}(hhh]h.KASAN, UBSAN, lockdep and other error checkers}(hjhhhNhNubah}(h]id10ah ]h"]h$]h&]refid,kasan-ubsan-lockdep-and-other-error-checkersuh1j]hjubah}(h]h ]h"]h$]h&]uh1hhjubjQ)}(hhh](jV)}(hhh]h)}(hhh]j^)}(hhh]h KASAN (Kernel Address Sanitizer)}(hjhhhNhNubah}(h]id11ah ]h"]h$]h&]refidkasan-kernel-address-sanitizeruh1j]hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jUhjubjV)}(hhh]h)}(hhh]j^)}(hhh]h$UBSAN (Undefined Behavior Sanitizer)}(hjhhhNhNubah}(h]id12ah ]h"]h$]h&]refid"ubsan-undefined-behavior-sanitizeruh1j]hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jUhjubjV)}(hhh]h)}(hhh]j^)}(hhh]h#lockdep (Lock Dependency Validator)}(hjhhhNhNubah}(h]id13ah ]h"]h$]h&]refid!lockdep-lock-dependency-validatoruh1j]hjubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jUhjubjV)}(hhh]h)}(hhh]j^)}(hhh]h)PSI (Pressure stall information tracking)}(hj$hhhNhNubah}(h]id14ah ]h"]h$]h&]refid'psi-pressure-stall-information-trackinguh1j]hj!ubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jUhjubeh}(h]h ]h"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]uh1jUhjtubjV)}(hhh](h)}(hhh]j^)}(hhh]hdevice coredump}(hjRhhhNhNubah}(h]id15ah ]h"]h$]h&]refiddevice-coredumpuh1j]hjOubah}(h]h ]h"]h$]h&]uh1hhjLubjQ)}(hhh]jV)}(hhh]h)}(hhh]j^)}(hhh]hdevcoredump interfaces}(hjqhhhNhNubah}(h]id16ah ]h"]h$]h&]refiddevcoredump-interfacesuh1j]hjnubah}(h]h ]h"]h$]h&]uh1hhjkubah}(h]h ]h"]h$]h&]uh1jUhjhubah}(h]h ]h"]h$]h&]uh1jPhjLubeh}(h]h ]h"]h$]h&]uh1jUhjtubeh}(h]h ]h"]h$]h&]uh1jPhjWubeh}(h]h ]h"]h$]h&]uh1jUhjRubah}(h]h ]h"]h$]h&]uh1jPhj>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&]hjuh1hhjhhhhhKubh)}(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: }(hjPhhhNhNubj )}(h``CONFIG_DYNAMIC_FTRACE``h]hCONFIG_DYNAMIC_FTRACE}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubh & }(hjPhhhNhNubj )}(h``#include ``h]h#include }(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubeh}(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: }(hj~hhhNhNubh)}(h:ref:`read_ftrace_log`h]h)}(hjh]hread_ftrace_log}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj read_ftrace_loguh1hhhhK9hj~ubh 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.)}(hj~hhhNhNubeh}(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&]refdocj refdomainjreftyperef refexplicitrefwarnj 9process/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&]uh1j&hjubah}(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 }(hj-hhhNhNubh)}(hR:ref:`Coding style guidelines `h]h)}(hj7h]hCoding style guidelines}(hj9hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj5ubah}(h]h ]h"]h$]h&]refdocj refdomainjCreftyperef refexplicitrefwarnj 1process/coding-style:13) printing kernel messagesuh1hhhhKLhj-ubhs. In almost all cases the debug statements shouldn’t be upstreamed, as a working driver is supposed to be silent.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKLhjhhubeh}(h]jah ]h"]dev_dbgah$]h&]uh1hhjhhhhhKDubh)}(hhh](h)}(h Custom printkh]h Custom printk}(hjihhhNhNubah}(h]h ]h"]h$]h&]hj uh1hhjfhhhhhKTubh)}(h Example::h]hExample:}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjfhhubh 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)}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKXhjfhhubh)}(h**When should you do this?**h]j')}(hjh]hWhen should you do this?}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1hhhhK]hjfhhubh)}(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 }(hjhhhNhNubj^)}(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@gregkhuh1j]hjubhtarget)}(hE h]h}(h]are-not-recommended-anymoreah ]h"]are not recommended anymoreah$]h&]refurijuh1j referencedKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK_hjfhhubeh}(h]jah ]h"] custom printkah$]h&]uh1hhjhhhhhKTubeh}(h]jah ]h"]printk() & friendsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hFtraceh]hFtrace}(hjhhhNhNubah}(h]h ]h"]h$]h&]hj9uh1hhjhhhhhKfubh)}(hhh](h)}(h#Creating a custom Ftrace tracepointh]h#Creating a custom Ftrace tracepoint}(hjhhhNhNubah}(h]h ]h"]h$]h&]hjXuh1hhjhhhhhKiubh)}(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.}(hj"hhhNhNubah}(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 }(hj0hhhNhNubh)}(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&]uh1hhj8ubah}(h]h ]h"]h$]h&]refdocj refdomainjFreftyperef refexplicitrefwarnj trace/tracepoints:usageuh1hhhhKphj0ubh.}(hj0hhhNhNubeh}(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 }(hjbhhhNhNubh)}(h:doc:`/trace/events`h]h)}(hjlh]h /trace/events}(hjnhhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhjjubah}(h]h ]h"]h$]h&]refdocj refdomainjxreftypedoc refexplicitrefwarnj  /trace/eventsuh1hhhhKshjbubeh}(h]h ]h"]h$]h&]uh1hhhhKshjhhubh)}(h:For the full Ftrace documentation see :doc:`/trace/ftrace`h](h&For the full Ftrace documentation see }(hjhhhNhNubh)}(h:doc:`/trace/ftrace`h]h)}(hjh]h /trace/ftrace}(hjhhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftypedoc refexplicitrefwarnj  /trace/ftraceuh1hhhhKuhjubeh}(h]h ]h"]h$]h&]uh1hhhhKuhjhhubeh}(h]j^ah ]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&]hjuh1hhjhhhhhKxubh)}(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&]uh1hhhhKhjhhubjQ)}(hhh](jV)}(hStore register valuesh]h)}(hjh]hStore register values}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jUhjhhhhhNubjV)}(hKeep track of variablesh]h)}(hj1h]hKeep track of variables}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/ubah}(h]h ]h"]h$]h&]uh1jUhjhhhhhNubjV)}(h Store errorsh]h)}(hjHh]h Store errors}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjFubah}(h]h ]h"]h$]h&]uh1jUhjhhhhhNubjV)}(hStore settingsh]h)}(hj_h]hStore settings}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubah}(h]h ]h"]h$]h&]uh1jUhjhhhhhNubjV)}(h"Toggle a setting like debug on/offh]h)}(hjvh]h"Toggle a setting like debug on/off}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjtubah}(h]h ]h"]h$]h&]uh1jUhjhhhhhNubjV)}(hError injection h]h)}(hError injectionh]hError injection}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jUhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jPhhhKhjhhubh)}(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&]uh1hhhhKhjhhubjQ)}(hhh](jV)}(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&]uh1jUhjhhhhhNubjV)}(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&]uh1hhhhKhjubjQ)}(hhh](jV)}(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&]uh1jUhj ubjV)}(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 }(hjG hhhNhNubj )}(h``my_variable``h]h my_variable}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjC ubah}(h]h ]h"]h$]h&]uh1jUhj ubeh}(h]h ]h"]h$]h&]jjuh1jPhhhKhjubeh}(h]h ]h"]h$]h&]uh1jUhjhhhNhNubjV)}(hNClean up the directory when removing the device (``debugfs_remove(parent);``) h]h)}(hMClean up the directory when removing the device (``debugfs_remove(parent);``)h](h1Clean up the directory when removing the device (}(hjy hhhNhNubj )}(h``debugfs_remove(parent);``h]hdebugfs_remove(parent);}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjy ubh)}(hjy hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhju ubah}(h]h ]h"]h$]h&]uh1jUhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jPhhhKhjhhubh)}(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&]refdocj refdomainj reftypedoc refexplicitrefwarnj /filesystems/debugfsuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]jah ]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)}(hj4 h]h/dev-tools/kasan}(hj6 hhhNhNubah}(h]h ](hstdstd-doceh"]h$]h&]uh1hhj2 ubah}(h]h ]h"]h$]h&]refdocj refdomainj@ reftypedoc refexplicitrefwarnj /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)}(hjf hhhNhNubah}(h]h ]h"]h$]h&]hjuh1hhjc hhhhhKubh)}(hPrerequisite: ``CONFIG_UBSAN``h](hPrerequisite: }(hjt hhhNhNubj )}(h``CONFIG_UBSAN``h]h CONFIG_UBSAN}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjt ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjc 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&]uh1hhhhKhjc 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&]refdocj refdomainj reftypedoc refexplicitrefwarnj /dev-tools/ubsanuh1hhhhKhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjc 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&]hj uh1hhj 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&]hj-uh1hhj 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.}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]j3ah ]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}(hja hhhNhNubah}(h]h ]h"]h$]h&]hj[uh1hhj^ hhhhhKubh)}(hJPrerequisite: ``CONFIG_DEV_COREDUMP`` & ``#include ``h](hPrerequisite: }(hjo hhhNhNubj )}(h``CONFIG_DEV_COREDUMP``h]hCONFIG_DEV_COREDUMP}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo ubh & }(hjo hhhNhNubj )}(h"``#include ``h]h#include }(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjo ubeh}(h]h ]h"]h$]h&]uh1hhhhKhj^ 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&]uh1hhhhKhj^ 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&]uh1hhhhKhj^ 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 hhhNhNubj^)}(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#L30uh1j]hj ubhV, in the Bluetooth HCI layer, in several wireless drivers, and in several DRM drivers.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj^ hhubh)}(hhh](h)}(hdevcoredump interfacesh]hdevcoredump interfaces}(hj hhhNhNubah}(h]h ]h"]h$]h&]hjzuh1hhj 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.hhKfubhdesc_sig_space)}(h h]h }(hj# hhhNhNubah}(h]h ]wah"]h$]h&]uh1j! hj hhhj hKfubh desc_name)}(h dev_coredumpmh]h desc_sig_name)}(h dev_coredumpmh]h dev_coredumpm}(hj: hhhNhNubah}(h]h ]nah"]h$]h&]uh1j8 hj4 ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j2 hj hhhj hKfubhdesc_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}(hj_ hhhNhNubah}(h]h ]kah"]h$]h&]uh1j] hjY ubj" )}(h h]h }(hjn hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjY ubh)}(hhh]j9 )}(hdeviceh]hdevice}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj| ubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetj modnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}j j< sbc.dev_coredumpmasbuh1hhjY ubj" )}(h h]h }(hj hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjY ubhdesc_sig_punctuation)}(h*h]h*}(hj hhhNhNubah}(h]h ]pah"]h$]h&]uh1j hjY ubj9 )}(hdevh]hdev}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjY ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjS ubjX )}(hstruct module *ownerh](j^ )}(hja h]hstruct}(hj hhhNhNubah}(h]h ]jj ah"]h$]h&]uh1j] hj ubj" )}(h h]h }(hj hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj ubh)}(hhh]j9 )}(hmoduleh]hmodule}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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 ubj9 )}(hownerh]howner}(hj7 hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjS ubjX )}(h void *datah](j )}(hvoidh]hvoid}(hjP hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjL ubj" )}(h h]h }(hj^ hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjL ubj )}(hj h]h*}(hjl hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjL ubj9 )}(hdatah]hdata}(hjy hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjL ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjS ubjX )}(hsize_t datalenh](h)}(hhh]j9 )}(hsize_th]hsize_t}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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 ubj9 )}(hdatalenh]hdatalen}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjS ubjX )}(h gfp_t gfph](h)}(hhh]j9 )}(hgfp_th]hgfp_t}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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 ubj9 )}(hgfph]hgfp}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjS ubjX )}(hVssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)h](h)}(hhh]j9 )}(hssize_th]hssize_t}(hj%hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj"ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj'modnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhjubj" )}(h h]h }(hjChhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubj )}(h(h]h(}(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hj_hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj9 )}(hreadh]hread}(hjlhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(h)h]h)}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hjSh]h(}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcharh]hchar}(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 hjubj9 )}(hbufferh]hbuffer}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(h,h]h,}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubh)}(hhh]j9 )}(hloff_th]hloff_t}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhjubj" )}(h h]h }(hj hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubj9 )}(hoffseth]hoffset}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(hjh]h,}(hj%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj" )}(h h]h }(hj2hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubh)}(hhh]j9 )}(hsize_th]hsize_t}(hjChhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj@ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjEmodnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhjubj" )}(h h]h }(hjahhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubj9 )}(hcounth]hcount}(hjohhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(hjh]h,}(hj}hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubj )}(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 hjubj9 )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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]j9 )}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j c.dev_coredumpmasbuh1hhjubj" )}(h h]h }(hj hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubj9 )}(hdatalenh]hdatalen}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(hj|h]h)}(hj'hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjS ubjX )}(hvoid (*free)(void *data)h](j )}(hvoidh]hvoid}(hj?hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj" )}(h h]h }(hjMhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj;ubj )}(hjSh]h(}(hj[hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj )}(hj h]h*}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj9 )}(hfreeh]hfree}(hjuhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj;ubj )}(hj|h]h)}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubj )}(hjSh]h(}(hjhhhNhNubah}(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;ubj9 )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj;ubj )}(hj|h]h)}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj;ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjS ubeh}(h]h ]h"]h$]h&]hhuh1jQ hj hhhj hKfubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1j sphinx_line_type declaratorhj hhhj hKfubah}(h]j ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j hj hKfhj 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 hKfubeh}(h]h ](j functioneh"]h$]h&]domainj objtypejdesctypejnoindex 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')}(hj1h]h Parameters}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj/ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKjhj+ubhdefinition_list)}(hhh](hdefinition_list_item)}(h@``struct device *dev`` the struct device for the crashed device h](hterm)}(h``struct device *dev``h]j )}(hjVh]hstruct device *dev}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKghjNubh definition)}(hhh]h)}(h(the struct device for the crashed deviceh]h(the struct device for the crashed device}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhKghjnubah}(h]h ]h"]h$]h&]uh1jlhjNubeh}(h]h ]h"]h$]h&]uh1jLhjkhKghjIubjM)}(h_``struct module *owner`` the module that contains the read/free functions, use ``THIS_MODULE`` h](jS)}(h``struct module *owner``h]j )}(hjh]hstruct module *owner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKhhjubjm)}(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&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhKhhjIubjM)}(h?``void *data`` data cookie for the **read**/**free** functions h](jS)}(h``void *data``h]j )}(hjh]h void *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKihjubjm)}(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&]uh1j&hjubh/}(hjhhhNhNubj')}(h**free**h]hfree}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubh functions}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjhKihjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhKihjIubjM)}(h&``size_t datalen`` length of the data h](jS)}(h``size_t datalen``h]j )}(hj5h]hsize_t datalen}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKjhj/ubjm)}(hhh]h)}(hlength of the datah]hlength of the data}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhKjhjKubah}(h]h ]h"]h$]h&]uh1jlhj/ubeh}(h]h ]h"]h$]h&]uh1jLhjJhKjhjIubjM)}(h``gfp_t gfp`` allocation flags h](jS)}(h ``gfp_t gfp``h]j )}(hjnh]h gfp_t gfp}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKkhjhubjm)}(hhh]h)}(hallocation flagsh]hallocation flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKkhjubah}(h]h ]h"]h$]h&]uh1jlhjhubeh}(h]h ]h"]h$]h&]uh1jLhjhKkhjIubjM)}(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](jS)}(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&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKlhjubjm)}(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&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhKlhjIubjM)}(h?``void (*free)(void *data)`` function to free the given buffer h](jS)}(h``void (*free)(void *data)``h]j )}(hjh]hvoid (*free)(void *data)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKmhjubjm)}(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&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhKmhjIubeh}(h]h ]h"]h$]h&]uh1jGhj+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/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKohj+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 }(hj1hhhNhNubj')}(h**free**h]hfree}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj1ubh* function will be called to free the data.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:231: ./include/linux/devcoredump.hhKnhj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1j)hj 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}(hjrhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjnhhh/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! hjnhhhjhMubj3 )}(h dev_coredumpvh]j9 )}(h dev_coredumpvh]h dev_coredumpv}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubah}(h]h ](jL jM eh"]h$]h&]hhuh1j2 hjnhhhjhMubjR )}(h;(struct device *dev, void *data, size_t datalen, gfp_t gfp)h](jX )}(hstruct device *devh](j^ )}(hja h]hstruct}(hjhhhNhNubah}(h]h ]jj ah"]h$]h&]uh1j] hjubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubh)}(hhh]j9 )}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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 hjubj9 )}(hdevh]hdev}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(h void *datah](j )}(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*}(hj=hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj9 )}(hdatah]hdata}(hjJhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(hsize_t datalenh](h)}(hhh]j9 )}(hsize_th]hsize_t}(hjfhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjcubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjhmodnameN classnameNj j )}j ]jc.dev_coredumpvasbuh1hhj_ubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj_ubj9 )}(hdatalenh]hdatalen}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj_ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(h gfp_t gfph](h)}(hhh]j9 )}(hgfp_th]hgfp_t}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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! hjubj9 )}(hgfph]hgfp}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubeh}(h]h ]h"]h$]h&]hhuh1jQ hjnhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjjhhhjhMubah}(h]jeah ](jjeh"]h$]h&]jj)jhuh1j hjhMhjghhubj)}(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.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjghhhjhMubeh}(h]h ](j functioneh"]h$]h&]j#j j$jj%jj&j'j(uh1j 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')}(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/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj ubjH)}(hhh](jM)}(h@``struct device *dev`` the struct device for the crashed device h](jS)}(h``struct device *dev``h]j )}(hjEh]hstruct device *dev}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjCubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj?ubjm)}(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&]uh1hhjZhMhj[ubah}(h]h ]h"]h$]h&]uh1jlhj?ubeh}(h]h ]h"]h$]h&]uh1jLhjZhMhj<ubjM)}(h;``void *data`` vmalloc data containing the device coredump h](jS)}(h``void *data``h]j )}(hj~h]h void *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjxubjm)}(hhh]h)}(h+vmalloc data containing the device coredumph]h+vmalloc data containing the device coredump}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jlhjxubeh}(h]h ]h"]h$]h&]uh1jLhjhMhj<ubjM)}(h&``size_t datalen`` length of the data h](jS)}(h``size_t datalen``h]j )}(hjh]hsize_t datalen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubjm)}(hhh]h)}(hlength of the datah]hlength of the data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhMhj<ubjM)}(h``gfp_t gfp`` allocation flags h](jS)}(h ``gfp_t gfp``h]j )}(hjh]h gfp_t gfp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubjm)}(hhh]h)}(hallocation flagsh]hallocation flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhMhj<ubeh}(h]h ]h"]h$]h&]uh1jGhj 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/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj 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.}(hjAhhhNhNubah}(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&]uh1j)hj 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}(hjphhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjlhhh/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! hjlhhhj~hMubj3 )}(hdevcd_free_sgtableh]j9 )}(hdevcd_free_sgtableh]hdevcd_free_sgtable}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubah}(h]h ](jL jM eh"]h$]h&]hhuh1j2 hjlhhhj~hMubjR )}(h (void *data)h]jX )}(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 hjubj9 )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubah}(h]h ]h"]h$]h&]hhuh1jQ hjlhhhj~hMubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjhhhhj~hMubah}(h]jcah ](jjeh"]h$]h&]jj)jhuh1j hj~hMhjehhubj)}(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&]uh1jhjehhhj~hMubeh}(h]h ](j functioneh"]h$]h&]j#j j$jj%jj&j'j(uh1j 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')}(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/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjubjH)}(hhh]jM)}(h+``void *data`` pointer to sg_table to free h](jS)}(h``void *data``h]j )}(hjAh]h void *data}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj;ubjm)}(hhh]h)}(hpointer to sg_table to freeh]hpointer to sg_table to free}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjWubah}(h]h ]h"]h$]h&]uh1jlhj;ubeh}(h]h ]h"]h$]h&]uh1jLhjVhMhj8ubah}(h]h ]h"]h$]h&]uh1jGhjubh)}(h**NOTE**h]j')}(hj|h]hNOTE}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjzubah}(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}(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&]uh1j)hj 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]j9 )}(hssize_th]hssize_t}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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.chM%ubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjhhhjhM%ubj3 )}(hdevcd_read_from_sgtableh]j9 )}(hjh]hdevcd_read_from_sgtable}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubah}(h]h ](jL jM eh"]h$]h&]hhuh1j2 hjhhhjhM%ubjR )}(hJ(char *buffer, loff_t offset, size_t buf_len, void *data, size_t data_len)h](jX )}(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*}(hj/hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj9 )}(hbufferh]hbuffer}(hj<hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj ubjX )}(h loff_t offseth](h)}(hhh]j9 )}(hloff_th]hloff_t}(hjXhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjUubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjZmodnameN classnameNj j )}j ]jc.devcd_read_from_sgtableasbuh1hhjQubj" )}(h h]h }(hjvhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjQubj9 )}(hoffseth]hoffset}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjQubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj ubjX )}(hsize_t buf_lenh](h)}(hhh]j9 )}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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! hjubj9 )}(hbuf_lenh]hbuf_len}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj ubjX )}(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 hjubj9 )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj ubjX )}(hsize_t data_lenh](h)}(hhh]j9 )}(hsize_th]hsize_t}(hj*hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj'ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj,modnameN classnameNj j )}j ]jc.devcd_read_from_sgtableasbuh1hhj#ubj" )}(h h]h }(hjHhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj#ubj9 )}(hdata_lenh]hdata_len}(hjVhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj#ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj ubeh}(h]h ]h"]h$]h&]hhuh1jQ hjhhhjhM%ubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjhhhjhM%ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j hjhM%hjhhubj)}(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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM%hj}hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM%ubeh}(h]h ](j functioneh"]h$]h&]j#j j$jj%jj&j'j(uh1j 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&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM)hjubjH)}(hhh](jM)}(h3``char *buffer`` the buffer to copy the data to it h](jS)}(h``char *buffer``h]j )}(hjh]h char *buffer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM'hjubjm)}(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&]uh1hhjhM'hjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhM'hjubjM)}(hj``loff_t offset`` start copy from **offset****** bytes from the head of the data in the given scatterlist h](jS)}(h``loff_t offset``h]j )}(hjh]h loff_t offset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM+hjubjm)}(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&]uh1j&hjubh9 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.chM*hjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhM+hjubjM)}(h,``size_t buf_len`` the length of the buffer h](jS)}(h``size_t buf_len``h]j )}(hjFh]hsize_t buf_len}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjDubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM(hj@ubjm)}(hhh]h)}(hthe length of the bufferh]hthe length of the buffer}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hM(hj\ubah}(h]h ]h"]h$]h&]uh1jlhj@ubeh}(h]h ]h"]h$]h&]uh1jLhj[hM(hjubjM)}(h2``void *data`` the scatterlist table to copy from h](jS)}(h``void *data``h]j )}(hjh]h void *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM)hjyubjm)}(hhh]h)}(h"the scatterlist table to copy fromh]h"the scatterlist table to copy from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM)hjubah}(h]h ]h"]h$]h&]uh1jlhjyubeh}(h]h ]h"]h$]h&]uh1jLhjhM)hjubjM)}(h;``size_t data_len`` the length of the data in the sg_table h](jS)}(h``size_t data_len``h]j )}(hjh]hsize_t data_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM,hjubjm)}(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&]uh1hhjhM,hjubah}(h]h ]h"]h$]h&]uh1jlhjubeh}(h]h ]h"]h$]h&]uh1jLhjhM,hjubeh}(h]h ]h"]h$]h&]uh1jGhjubh)}(h **Return**h]j')}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM.hjubh)}(hthe number of bytes copiedh]hthe number of bytes copied}(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&]uh1j)hj 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}(hj8hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj4hhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM@ubj" )}(h h]h }(hjGhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj4hhhjFhM@ubj3 )}(hdev_coredump_puth]j9 )}(hdev_coredump_puth]hdev_coredump_put}(hjYhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjUubah}(h]h ](jL jM eh"]h$]h&]hhuh1j2 hj4hhhjFhM@ubjR )}(h(struct device *dev)h]jX )}(hstruct device *devh](j^ )}(hja h]hstruct}(hjuhhhNhNubah}(h]h ]jj ah"]h$]h&]uh1j] hjqubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjqubh)}(hhh]j9 )}(hdeviceh]hdevice}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j )}j j[sbc.dev_coredump_putasbuh1hhjqubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjqubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjqubj9 )}(hdevh]hdev}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjqubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjmubah}(h]h ]h"]h$]h&]hhuh1jQ hj4hhhjFhM@ubeh}(h]h ]h"]h$]h&]hhjuh1j jjhj0hhhjFhM@ubah}(h]j+ah ](jjeh"]h$]h&]jj)jhuh1j hjFhM@hj-hhubj)}(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&]uh1jhj-hhhjFhM@ubeh}(h]h ](j functioneh"]h$]h&]j#j j$jj%jj&j'j(uh1j 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&]uh1j&hjubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMDhjubjH)}(hhh]jM)}(h@``struct device *dev`` the struct device for the crashed device h](jS)}(h``struct device *dev``h]j )}(hj9h]hstruct device *dev}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMAhj3ubjm)}(hhh]h)}(h(the struct device for the crashed deviceh]h(the struct device for the crashed device}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNhMAhjOubah}(h]h ]h"]h$]h&]uh1jlhj3ubeh}(h]h ]h"]h$]h&]uh1jLhjNhMAhj0ubah}(h]h ]h"]h$]h&]uh1jGhjubh)}(h**Description**h]j')}(hjth]h Description}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjrubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMChjubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMBhjubh)}(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.chMEhjubeh}(h]h ] kernelindentah"]h$]h&]uh1j)hj 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.chMWubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjhhhjhMWubj3 )}(hdev_coredumpm_timeouth]j9 )}(hdev_coredumpm_timeouth]hdev_coredumpm_timeout}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubah}(h]h ](jL jM eh"]h$]h&]hhuh1j2 hjhhhjhMWubjR )}(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](jX )}(hstruct device *devh](j^ )}(hja h]hstruct}(hjhhhNhNubah}(h]h ]jj ah"]h$]h&]uh1j] hjubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubh)}(hhh]j9 )}(hdeviceh]hdevice}(hj#hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj%modnameN classnameNj j )}j ]j )}j jsbc.dev_coredumpm_timeoutasbuh1hhjubj" )}(h h]h }(hjChhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubj )}(hj h]h*}(hjQhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj9 )}(hdevh]hdev}(hj^hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(hstruct module *ownerh](j^ )}(hja h]hstruct}(hjwhhhNhNubah}(h]h ]jj ah"]h$]h&]uh1j] hjsubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjsubh)}(hhh]j9 )}(hmoduleh]hmodule}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjmodnameN classnameNj j )}j ]j?c.dev_coredumpm_timeoutasbuh1hhjsubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjsubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjsubj9 )}(hownerh]howner}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjsubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(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 hjubj9 )}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(hsize_t datalenh](h)}(hhh]j9 )}(hsize_th]hsize_t}(hj,hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj)ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj.modnameN classnameNj j )}j ]j?c.dev_coredumpm_timeoutasbuh1hhj%ubj" )}(h h]h }(hjJhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj%ubj9 )}(hdatalenh]hdatalen}(hjXhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(h gfp_t gfph](h)}(hhh]j9 )}(hgfp_th]hgfp_t}(hjthhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjqubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjvmodnameN classnameNj j )}j ]j?c.dev_coredumpm_timeoutasbuh1hhjmubj" )}(h h]h }(hjhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjmubj9 )}(hgfph]hgfp}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjmubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(hVssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)h](h)}(hhh]j9 )}(hssize_th]hssize_t}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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 )}(hjSh]h(}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hj h]h*}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj9 )}(hreadh]hread}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(hj|h]h)}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hjSh]h(}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj )}(hcharh]hchar}(hj*hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj" )}(h h]h }(hj8hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubj )}(hj h]h*}(hjFhhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj9 )}(hbufferh]hbuffer}(hjShhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(hjh]h,}(hjahhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj" )}(h h]h }(hjnhhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubh)}(hhh]j9 )}(hloff_th]hloff_t}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj|ubah}(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! hjubj9 )}(hoffseth]hoffset}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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]j9 )}(hsize_th]hsize_t}(hjhhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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! hjubj9 )}(hcounth]hcount}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(hjh]h,}(hj hhhNhNubah}(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*}(hjH hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj9 )}(hdatah]hdata}(hjU hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(hjh]h,}(hjc hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubj" )}(h h]h }(hjp hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubh)}(hhh]j9 )}(hsize_th]hsize_t}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj~ ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetj modnameN classnameNj j )}j ]j?c.dev_coredumpm_timeoutasbuh1hhjubj" )}(h h]h }(hj hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjubj9 )}(hdatalenh]hdatalen}(hj hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hjubj )}(hj|h]h)}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(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 )}(hjSh]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 ubj9 )}(hfreeh]hfree}(hj !hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj ubj )}(hj|h]h)}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hjSh]h(}(hj$!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj )}(hvoidh]hvoid}(hj1!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*}(hjM!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubj9 )}(hdatah]hdata}(hjZ!hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj ubj )}(hj|h]h)}(hjh!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubjX )}(hunsigned long timeouth](j )}(hunsignedh]hunsigned}(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 )}(hlongh]hlong}(hj!hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj|!ubj" )}(h h]h }(hj!hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj|!ubj9 )}(htimeouth]htimeout}(hj!hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj|!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hjubeh}(h]h ]h"]h$]h&]hhuh1jQ hjhhhjhMWubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjhhhjhMWubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j hjhMWhjhhubj)}(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.chMWhj!hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMWubeh}(h]h ](j functioneh"]h$]h&]j#j j$j!j%j!j&j'j(uh1j 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&]uh1j&hj"ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM[hj!ubjH)}(hhh](jM)}(h@``struct device *dev`` the struct device for the crashed device h](jS)}(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&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMYhj"ubjm)}(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&]uh1hhj8"hMYhj9"ubah}(h]h ]h"]h$]h&]uh1jlhj"ubeh}(h]h ]h"]h$]h&]uh1jLhj8"hMYhj"ubjM)}(h_``struct module *owner`` the module that contains the read/free functions, use ``THIS_MODULE`` h](jS)}(h``struct module *owner``h]j )}(hj\"h]hstruct module *owner}(hj^"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ"ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMZhjV"ubjm)}(hhh]h)}(hEthe module that contains the read/free functions, use ``THIS_MODULE``h](h6the module that contains the read/free functions, use }(hju"hhhNhNubj )}(h``THIS_MODULE``h]h THIS_MODULE}(hj}"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju"ubeh}(h]h ]h"]h$]h&]uh1hhjq"hMZhjr"ubah}(h]h ]h"]h$]h&]uh1jlhjV"ubeh}(h]h ]h"]h$]h&]uh1jLhjq"hMZhj"ubjM)}(h?``void *data`` data cookie for the **read**/**free** functions h](jS)}(h``void *data``h]j )}(hj"h]h void *data}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM[hj"ubjm)}(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&]uh1j&hj"ubh/}(hj"hhhNhNubj')}(h**free**h]hfree}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj"ubh functions}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj"hM[hj"ubah}(h]h ]h"]h$]h&]uh1jlhj"ubeh}(h]h ]h"]h$]h&]uh1jLhj"hM[hj"ubjM)}(h&``size_t datalen`` length of the data h](jS)}(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&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM\hj"ubjm)}(hhh]h)}(hlength of the datah]hlength of the data}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hM\hj#ubah}(h]h ]h"]h$]h&]uh1jlhj"ubeh}(h]h ]h"]h$]h&]uh1jLhj#hM\hj"ubjM)}(h``gfp_t gfp`` allocation flags h](jS)}(h ``gfp_t gfp``h]j )}(hj9#h]h gfp_t gfp}(hj;#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7#ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM]hj3#ubjm)}(hhh]h)}(hallocation flagsh]hallocation flags}(hjR#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjN#hM]hjO#ubah}(h]h ]h"]h$]h&]uh1jlhj3#ubeh}(h]h ]h"]h$]h&]uh1jLhjN#hM]hj"ubjM)}(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](jS)}(hZ``ssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)``h]j )}(hjr#h]hVssize_t (*read)(char *buffer, loff_t offset, size_t count, void *data, size_t datalen)}(hjt#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjp#ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM^hjl#ubjm)}(hhh]h)}(h&function to read from the given bufferh]h&function to read from the given buffer}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hM^hj#ubah}(h]h ]h"]h$]h&]uh1jlhjl#ubeh}(h]h ]h"]h$]h&]uh1jLhj#hM^hj"ubjM)}(h?``void (*free)(void *data)`` function to free the given buffer h](jS)}(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&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM_hj#ubjm)}(hhh]h)}(h!function to free the given bufferh]h!function to free the given buffer}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hM_hj#ubah}(h]h ]h"]h$]h&]uh1jlhj#ubeh}(h]h ]h"]h$]h&]uh1jLhj#hM_hj"ubjM)}(h=``unsigned long timeout`` time in jiffies to remove coredump h](jS)}(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&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chM`hj#ubjm)}(hhh]h)}(h"time in jiffies to remove coredumph]h"time in jiffies to remove coredump}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hM`hj#ubah}(h]h ]h"]h$]h&]uh1jlhj#ubeh}(h]h ]h"]h$]h&]uh1jLhj#hM`hj"ubeh}(h]h ]h"]h$]h&]uh1jGhj!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/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMbhj!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 }(hj5$hhhNhNubj')}(h**free**h]hfree}(hj=$hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj5$ubh* function will be called to free the data.}(hj5$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMahj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1j)hj 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}(hjv$hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hjr$hhh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMubj" )}(h h]h }(hj$hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hjr$hhhj$hMubj3 )}(hdev_coredumpsgh]j9 )}(hdev_coredumpsgh]hdev_coredumpsg}(hj$hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj$ubah}(h]h ](jL jM eh"]h$]h&]hhuh1j2 hjr$hhhj$hMubjR )}(hJ(struct device *dev, struct scatterlist *table, size_t datalen, gfp_t gfp)h](jX )}(hstruct device *devh](j^ )}(hja h]hstruct}(hj$hhhNhNubah}(h]h ]jj ah"]h$]h&]uh1j] hj$ubj" )}(h h]h }(hj$hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj$ubh)}(hhh]j9 )}(hdeviceh]hdevice}(hj$hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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$ubj9 )}(hdevh]hdev}(hj %hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj$ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj$ubjX )}(hstruct scatterlist *tableh](j^ )}(hja h]hstruct}(hj%%hhhNhNubah}(h]h ]jj ah"]h$]h&]uh1j] hj!%ubj" )}(h h]h }(hj2%hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj!%ubh)}(hhh]j9 )}(h scatterlisth]h scatterlist}(hjC%hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj@%ubah}(h]h ]h"]h$]h&] refdomainj reftypej reftargetjE%modnameN classnameNj j )}j ]j$c.dev_coredumpsgasbuh1hhj!%ubj" )}(h h]h }(hja%hhhNhNubah}(h]h ]j. ah"]h$]h&]uh1j! hj!%ubj )}(hj h]h*}(hjo%hhhNhNubah}(h]h ]j ah"]h$]h&]uh1j hj!%ubj9 )}(htableh]htable}(hj|%hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj!%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj$ubjX )}(hsize_t datalenh](h)}(hhh]j9 )}(hsize_th]hsize_t}(hj%hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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%ubj9 )}(hdatalenh]hdatalen}(hj%hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj$ubjX )}(h gfp_t gfph](h)}(hhh]j9 )}(hgfp_th]hgfp_t}(hj%hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 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%ubj9 )}(hgfph]hgfp}(hj &hhhNhNubah}(h]h ]jE ah"]h$]h&]uh1j8 hj%ubeh}(h]h ]h"]h$]h&]noemphhhuh1jW hj$ubeh}(h]h ]h"]h$]h&]hhuh1jQ hjr$hhhj$hMubeh}(h]h ]h"]h$]h&]hhjuh1j jjhjn$hhhj$hMubah}(h]ji$ah ](jjeh"]h$]h&]jj)jhuh1j hj$hMhjk$hhubj)}(hhh]h)}(h>create device coredump that uses scatterlist as data parameterh]h>create device coredump that uses scatterlist as data parameter}(hj6&hhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj3&hhubah}(h]h ]h"]h$]h&]uh1jhjk$hhhj$hMubeh}(h]h ](j functioneh"]h$]h&]j#j j$jN&j%jN&j&j'j(uh1j 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')}(hjX&h]h Parameters}(hjZ&hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hjV&ubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjR&ubjH)}(hhh](jM)}(h@``struct device *dev`` the struct device for the crashed device h](jS)}(h``struct device *dev``h]j )}(hjw&h]hstruct device *dev}(hjy&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhju&ubah}(h]h ]h"]h$]h&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjq&ubjm)}(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&hMhj&ubah}(h]h ]h"]h$]h&]uh1jlhjq&ubeh}(h]h ]h"]h$]h&]uh1jLhj&hMhjn&ubjM)}(h,``struct scatterlist *table`` the dump data h](jS)}(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&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj&ubjm)}(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&]uh1jlhj&ubeh}(h]h ]h"]h$]h&]uh1jLhj&hMhjn&ubjM)}(h&``size_t datalen`` length of the data h](jS)}(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&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj&ubjm)}(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&]uh1jlhj&ubeh}(h]h ]h"]h$]h&]uh1jLhj&hMhjn&ubjM)}(h``gfp_t gfp`` allocation flags h](jS)}(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&]uh1jRh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhj'ubjm)}(hhh]h)}(hallocation flagsh]hallocation flags}(hj;'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7'hMhj8'ubah}(h]h ]h"]h$]h&]uh1jlhj'ubeh}(h]h ]h"]h$]h&]uh1jLhj7'hMhjn&ubeh}(h]h ]h"]h$]h&]uh1jGhjR&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/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjR&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.}(hjs'hhhNhNubah}(h]h ]h"]h$]h&]uh1hh/var/lib/git/docbuild/linux/Documentation/process/debugging/driver_development_debugging_guide:233: ./drivers/base/devcoredump.chMhjR&ubeh}(h]h ] kernelindentah"]h$]h&]uh1j)hj hhhNhNubh)}(h **Copyright** ©2024 : Collaborah](j')}(h **Copyright**h]h Copyright}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j&hj'ubh ©2024 : Collabora}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]jah ]h"]devcoredump interfacesah$]h&]uh1hhj^ hhhhhKubeh}(h]jaah ]h"]device coredumpah$]h&]uh1hhhhhhhhKubeh}(h]jmah ]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_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}(j'jmjjjjj<jjjjcjjjjjjj?jj^j jj[ jj` jj jj jjT j3j'jaj'ju nametypes}(j'jjj<jjcjjjjj j[ j` j j jT j'j'uh}(jmhjj>jjjjjj?jjjjfjjj?jj^jjjjj jj jjc jj j3j jaj^ jj j j jejjjcjhjjj+j0jjji$jn$hj_jj}jjjjjjj jj9j0jXjOjj}jjjjjjj jj-j$j[jRjzjqu 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.