diff options
author | 2022-09-04 15:40:49 -0600 | |
---|---|---|
committer | 2022-09-07 17:04:48 +0200 | |
commit | ca90fca7f7b51830dfb95bf655210a1c84588f15 (patch) | |
tree | 4ce32392e5c033a7245364ef8f01696af79abb1c /kernel/module | |
parent | dyndbg: gather __dyndbg[] state into struct _ddebug_info (diff) | |
download | linux-dev-ca90fca7f7b51830dfb95bf655210a1c84588f15.tar.xz linux-dev-ca90fca7f7b51830dfb95bf655210a1c84588f15.zip |
dyndbg: add class_id to pr_debug callsites
DRM issues ~10 exclusive categories of debug messages; to represent
this directly in dyndbg, add a new 6-bit field: struct _ddebug.class_id.
This gives us 64 classes, which should be more than enough.
#> echo 0x012345678 > /sys/module/drm/parameters/debug
All existing callsites are initialized with _DPRINTK_CLASS_DFLT, which
is 2^6-1. This reserves 0-62 for use in new categorized/class'd
pr_debugs, which fits perfectly with natural enums (ints: 0..N).
Thats done by extending the init macro: DEFINE_DYNAMIC_DEBUG_METADATA()
with _CLS(cls, ...) suffix, and redefing old name using extended name.
Then extend the factory macro callchain with _cls() versions to provide
the callsite.class_id, with old-names passing _DPRINTK_CLASS_DFLT.
This sets us up to create class'd prdebug callsites (class'd callsites
are those with .class_id != _DPRINTK_CLASS_DFLT).
No behavior change.
cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20220904214134.408619-13-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/module')
0 files changed, 0 insertions, 0 deletions