Re: [PATCH v3 26/54] dyndbg: change __dynamic_func_call_cls* macros into expressions

2025-04-15 Thread jim . cromie
On Tue, Apr 15, 2025 at 4:06 AM Louis Chauvet wrote: > > > > Le 02/04/2025 à 19:41, Jim Cromie a écrit : > > The Xe driver's XE_IOCTL_DBG macro calls drm_dbg() from inside an if > > (expression). This breaks when CONFIG_DRM_USE_DYNAMIC_DEBUG=y because > >

Re: [PATCH v3 23/54] dyndbg: treat comma as a token separator

2025-04-15 Thread jim . cromie
On Tue, Apr 15, 2025 at 4:05 AM Louis Chauvet wrote: > > > > Le 02/04/2025 à 19:41, Jim Cromie a écrit : > > Treat comma as a token terminator, just like a space. This allows a > > user to avoid quoting hassles when spaces are otherwise needed: > > > > :#>

Re: [PATCH v3 21/54] dyndbg-test: change do_prints testpoint to accept a loopct

2025-04-15 Thread jim . cromie
On Tue, Apr 15, 2025 at 4:04 AM Louis Chauvet wrote: > > > > Le 02/04/2025 à 19:41, Jim Cromie a écrit : > > echo 1000 > /sys/module/test_dynamic_debug/parameters/do_prints > > > > This allows its use as a scriptable load generator, to generate > > dynami

Re: [PATCH v3 20/54] dyndbg: check DYNAMIC_DEBUG_CLASSMAP_DEFINE args at compile-time

2025-04-15 Thread jim . cromie
On Tue, Apr 15, 2025 at 4:04 AM Louis Chauvet wrote: > > > > Le 02/04/2025 à 19:41, Jim Cromie a écrit : > > Add __DYNAMIC_DEBUG_CLASSMAP_CHECK to implement the following > > arg-checks at compile-time: > > > > 0 <= _base < 63 > > class_

Re: [PATCH v3 18/54] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/*

2025-04-15 Thread jim . cromie
On Tue, Apr 15, 2025 at 4:02 AM Louis Chauvet wrote: > > > > Le 02/04/2025 à 19:41, Jim Cromie a écrit : > > Add a selftest script for dynamic-debug. The config requires > > CONFIG_TEST_DYNAMIC_DEBUG=m and CONFIG_TEST_DYNAMIC_DEBUG_SUBMOD=m, > > which tacitly requir

Re: [PATCH v3 17/54] dyndbg-API: replace DECLARE_DYNDBG_CLASSMAP

2025-04-15 Thread jim . cromie
On Tue, Apr 15, 2025 at 4:01 AM Louis Chauvet wrote: > > > > Le 02/04/2025 à 19:41, Jim Cromie a écrit : > > DECLARE_DYNDBG_CLASSMAP() has a design error; its usage fails a basic > > K&R rule: "define once, refer many times". > > > > When D

[PATCH v2 48/59] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv

2025-04-05 Thread Jim Cromie
etnaviv has 5 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs as well as plain-old pr_debug()s Signed-off-by: Jim Cromie --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH v2 39/59] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver

2025-04-05 Thread Jim Cromie
drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH v3 40/54] drm-dyndbg: add DRM_CLASSMAP_USE to virtio_gpu

2025-04-05 Thread Jim Cromie
virtio_gpu has 10 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/virtio/virtgpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/v

Re: [PATCH v2 30/59] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-04-05 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:20 AM Louis Chauvet wrote: > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > Current classmap code protects class'd pr_debugs from unintended > > changes by "legacy" unclassed queries: > > > ># this doesn&#

[PATCH v2 00/59] Fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2025-04-05 Thread Jim Cromie
new _DPRINTK flags for LOOKUP, CACHED_PREFIX use LOOKUP to refine dynamic_emit_prefix() = cleanup most spurious name variances: s/\bdd_|\bddebug_/_ddebug_/g most of s/DYNDBG/DYNAMIC_DEBUG/. = moved doc patches to back of dydnbg-core part. more wordsmithing / bikeshedding chan

[PATCH v2 56/59] drm-dyndbg: add DRM_CLASSMAP_USE to the qxl driver

2025-04-05 Thread Jim Cromie
The qxl driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c

[PATCH v3 29/54] docs/dyndbg: add classmap info to howto

2025-04-05 Thread Jim Cromie
TBD: some of this might be over-specification, or just over-talked. NB: The _DEFINE & _USE model makes the user dependent on the definer, just like EXPORT_SYMBOL(__drm_debug) already does. cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- v3- rework protection around PARAM v0

[PATCH v3 38/54] drm-dyndbg: DRM_CLASSMAP_USE in nouveau

2025-04-05 Thread Jim Cromie
drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie --- drivers/gpu/drm/nouveau/nouveau_drm.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm

[PATCH v3 39/54] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver

2025-04-05 Thread Jim Cromie
Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this tells dydnbg that Xe has drm.debug callsites. Signed-off-by: Jim Cromie --- drivers/gpu/drm/xe/xe_drm_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/xe

[PATCH v2 40/59] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver

2025-04-05 Thread Jim Cromie
drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie --- drivers/gpu/drm/i915/i915_params.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_params.c b/drive

[PATCH v3 31/54] drm-dyndbg: adapt drm core to use dyndbg classmaps-v2

2025-04-05 Thread Jim Cromie
r now, so they still redundantly re-declare the classmap, but we can convert the drivers later to DYNDBG_CLASSMAP_USE Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- this ignores a checkpatch WARNING: Argument 'name' is not used in function-like macro #70: FILE: include/

[PATCH v2 55/59] drm-dyndbg: add DRM_CLASSMAP_USE to the gud driver

2025-04-05 Thread Jim Cromie
The gud driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/gud/gud_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gud/gud_drv.c

[PATCH v3 20/54] dyndbg: check DYNAMIC_DEBUG_CLASSMAP_DEFINE args at compile-time

2025-04-05 Thread Jim Cromie
examples are added to test_dynamic_debug_submod.ko, and will fail compilation if -DDD_MACRO_ARGCHECK is added to cflags. This wouldn't be a useful CONFIG_ item, since it breaks the build. Signed-off-by: Jim Cromie --- v3- $macro_name =~ s/DYNDBG/DYNAMIC_DEBUG/ prev- - split sta

[PATCH v2 42/59] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper

2025-04-05 Thread Jim Cromie
drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie --- drivers/gpu/drm/display/drm_dp_helper.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/display/drm_dp_helper

[PATCH v3 32/54] drm-dyndbg: adapt DRM to invoke DYNAMIC_DEBUG_CLASSMAP_PARAM

2025-04-05 Thread Jim Cromie
Invoke DYNAMIC_DEBUG_CLASSMAP_PARAM to hook drm.debug (__drm_debug) to the DRM_UT_* classmap, replacing the ad-hoc wiring previously doing it. Add DRM_CLASSMAP_* adapter macros to selectively use DYNAMIC_DEBUG_CLASSMAP_* when DRM_USE_DYNAMIC_DEBUG=y is configured. Signed-off-by: Jim Cromie

[PATCH v3 18/54] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/*

2025-04-05 Thread Jim Cromie
g: query 0: "=_" mod:* [ 35.553544] dyndbg: processed 1 queries, with 1778 matches, 0 errs Signed-off-by: Jim Cromie Co-developed-by: Łukasz Bartosik Signed-off-by: Łukasz Bartosik --- -r3 turn off green at end drop config dep on TEST_DYNAMIC_DEBUG, since basic-test uses builtin params -

Re: [PATCH v2 44/59] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver

2025-04-05 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:24 AM Louis Chauvet wrote: > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with > > CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this tells dydnbg that Xe uses > > has drm.debug calls. >

[PATCH v3 10/54] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2025-04-05 Thread Jim Cromie
old_bits arg is currently a pointer to the input bits, but this could allow inadvertent changes to the input by the fn. Disallow this. And constify new_bits while here. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- lib/dynamic_debug.c | 21 +++-- 1 file changed, 11

[PATCH v3 14/54] dyndbg: hoist classmap-filter-by-modname up to ddebug_add_module

2025-04-05 Thread Jim Cromie
Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 56 ++--- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 104cf8abdf33..046c4ffb38f8 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_de

[PATCH v2 47/59] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

2025-04-05 Thread Jim Cromie
tiny/bochs has 5 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/tiny/bochs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/boch

[PATCH v3 04/54] test-dyndbg: fixup CLASSMAP usage error

2025-04-05 Thread Jim Cromie
t value, in this case it was _base + 1. This leaves HI class un-selectable. NB: the macro could better validate its arguments. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet Tested-by: Louis Chauvet --- lib/test_dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v3 01/54] vmlinux.lds.h: fixup HEADERED_SECTION{,_BY} macros

2025-04-05 Thread Jim Cromie
commit 1d926e259d8f ("vmlinux.lds.h: add HEADERED_SECTION_* macros") I flubbed the defn of the outer 2 macros; they missed the extra arg needed: _front/_hdr. Fix it now, before anyone notices. Signed-off-by: Jim Cromie --- include/asm-generic/vmlinux.lds.h | 7 --- 1 file

[PATCH v2 17/59] dyndbg-API: replace DECLARE_DYNDBG_CLASSMAP

2025-04-05 Thread Jim Cromie
h M/M didn't see because the module-loader memory placement constrains it instead. Fixes: aad0214f3026 ("dyndbg: add DECLARE_DYNDBG_CLASSMAP macro") cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- v2 a. building 2 .ko's from 1 source file is weird; add a clear

[PATCH v3 02/54] docs/dyndbg: update examples \012 to \n

2025-04-04 Thread Jim Cromie
commit 47ea6f99d06e ("dyndbg: use ESCAPE_SPACE for cat control") changed the control-file to display format strings with "\n" rather than "\012". Update the docs to match the new reality. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet Tested-by: Louis Cha

[PATCH v3 42/54] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

2025-04-04 Thread Jim Cromie
tiny/bochs has 5 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/tiny/bochs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/boch

[PATCH v3 35/54] drm-dyndbg: DRM_CLASSMAP_USE in i915 driver

2025-04-04 Thread Jim Cromie
drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- drivers/gpu/drm/i915/i915_params.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH v2 53/59] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver

2025-04-04 Thread Jim Cromie
The udl driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/udl/udl_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/udl

[PATCH v2 44/59] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver

2025-04-04 Thread Jim Cromie
Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this tells dydnbg that Xe uses has drm.debug calls. Signed-off-by: Jim Cromie --- drivers/gpu/drm/xe/xe_drm_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/xe

[PATCH v3 30/54] drm: use correct ccflags-y spelling

2025-04-04 Thread Jim Cromie
; modules built with CONFIG_DYNAMIC_DEBUG=y (!1) don't need the flag. Fixes: 84ec67288c10 ("drm_print: wrap drm_*_dbg in dyndbg descriptor factory macro") Signed-off-by: Jim Cromie --- drivers/gpu/drm/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

[PATCH v2 05/59] dyndbg: make ddebug_class_param union members same size

2025-04-04 Thread Jim Cromie
they will both see the same value. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- include/linux/dynamic_debug.h | 2 +- lib/dynamic_debug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h

[PATCH v3 16/54] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code

2025-04-04 Thread Jim Cromie
d for by anyone else, so reduce LOC & test-surface; simplify things. Also rename enum class_map_type to enum ddebug_class_map_type. Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 23 ++-- lib/dynamic_debug.c | 102 +++--- lib/test_dyn

[PATCH v3 05/54] dyndbg: reword "class unknown, " to "class:_UNKNOWN_"

2025-04-04 Thread Jim Cromie
NKNOWN_" to loudly announce the erroneous situation, and to make it uniquely greppable. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 5a007952f7

[PATCH v3 28/54] dyndbg: restore classmap protection when theres a controlling_param

2025-04-04 Thread Jim Cromie
tection macro'd to false -v2.with-this-patch - sysfs knob decides -v2.speculative - module decides wrt classmap protection seems unneeded now, TBD NOTE: protection is only against class-less queries, explicit "class FOO" adjustments are allowed (that is the mechanism

[PATCH v3 41/54] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm

2025-04-03 Thread Jim Cromie
tiny/simpledrm has 3 DRM_UT_DRIVER debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/tiny/simpledrm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v3 13/54] dyndbg, module: make proper substructs in _ddebug_info

2025-04-02 Thread Jim Cromie
contained structs closes the holes otherwise created by the structification (which was my excuse for not doing it originally). Signed-off-by: Jim Cromie --- -v2 rework towards front of series --- include/asm-generic/vmlinux.lds.h | 4 +- include/linux/dynamic_debug.h | 42 +++- ke

[PATCH v3 12/54] dyndbg: macrofy a 2-index for-loop pattern

2025-04-02 Thread Jim Cromie
forward. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- lib/dynamic_debug.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 85b8d32742ec..253eaf0a9bd6 100644 --- a/lib/dynamic_debug.c +++ b/lib

[PATCH v3 25/54] selftests-dyndbg: add test_mod_submod

2025-04-02 Thread Jim Cromie
chset, closer to the classmap patches its validating. With some tedium, the tests could be refactored to split out early tests which avoid multi-cmds, and test only the class-params. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- r3 - skip test if LACK_TMOD older drop -v used in test_

[PATCH v3 53/54] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2025-04-02 Thread Jim Cromie
Time for some thorough CI. Also, the previous 18 patches could perhaps be replaced by a single invocation of DYNDBG_CLASSMAP_USE, from a C-file linked into all drm drivers & helpers. I didn't find such a file, nor a drm-client linkage item in the Makefile. Signed-off-by: J

[PATCH v3 17/54] dyndbg-API: replace DECLARE_DYNDBG_CLASSMAP

2025-04-02 Thread Jim Cromie
h M/M didn't see because the module-loader memory placement constrains it instead. Fixes: aad0214f3026 ("dyndbg: add DECLARE_DYNDBG_CLASSMAP macro") cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- v3- undo 1.9 simplification of ddebug_find_valid_class() ddebug_c

[PATCH v3 15/54] dyndbg: ddebug_table.mod_name down to _ddebug_info

2025-04-02 Thread Jim Cromie
f up. ddebug_table contains a _ddebug_info member, so its users keep access to mod_name, just now with "->info." added in. In static ddebug_add_module(&di), reinforce the cursor-model by dropping the modname arg, and setting di->mod_name at each caller. Signed-off-by: Jim Cromie

[PATCH v3 51/54] drm-dyndbg: add DRM_CLASSMAP_USE to the qxl driver

2025-04-02 Thread Jim Cromie
The qxl driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c

[PATCH v3 45/54] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2025-04-02 Thread Jim Cromie
radeon has some DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg about its use of the class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/radeon/radeon_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/r

[PATCH v3 00/54] Fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y

2025-04-02 Thread Jim Cromie
RM has 10. we have 63. This allows ... = multiple classmaps are supported as long as the mapped class_ids dont conflict. a fair requirement for a narrow, future use-case. this is now verified in this patchset. 7x 8-bit classes is workable (if you'd like) = "legacy" clas

[PATCH v3 44/54] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver

2025-04-02 Thread Jim Cromie
The gma500 has 126 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/gma500/psb_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/g

[PATCH v3 47/54] drm-dyndbg: add DRM_CLASSMAP_USE to vkms driver

2025-04-02 Thread Jim Cromie
The vkms driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/vkms/vkms_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vkms

[PATCH v3 49/54] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver

2025-04-02 Thread Jim Cromie
The mgag200 driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v3 46/54] drm-dyndbg: add DRM_CLASSMAP_USE to vmwgfx driver

2025-04-02 Thread Jim Cromie
The vmwgfx driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v3 52/54] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver

2025-04-02 Thread Jim Cromie
The drm_gem_shmem_helper driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_gem_shmem_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH v3 54/54] drm: RFC - make drm_dyndbg_user.o for drm-*_helpers, drivers

2025-04-02 Thread Jim Cromie
is is just as per-module as just adding the _USE() explicitly to the main .c file, which is less magical than make-fu. Also, it appears to cause make && make rebuilds. and try to link it to helpers and everything Signed-off-by: Jim Cromie --- drivers/gpu/drm/Makefile | 9

[PATCH v3 37/54] drm-dyndbg: DRM_CLASSMAP_USE in drm_dp_helper

2025-04-02 Thread Jim Cromie
drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- drivers/gpu/drm/display/drm_dp_helper.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gp

[PATCH v3 50/54] drm-dyndbg: add DRM_CLASSMAP_USE to the gud driver

2025-04-02 Thread Jim Cromie
The gud driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/gud/gud_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gud/gud_drv.c

[PATCH v3 48/54] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver

2025-04-02 Thread Jim Cromie
The udl driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/udl/udl_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/udl

[PATCH v3 23/54] dyndbg: treat comma as a token separator

2025-04-02 Thread Jim Cromie
onfigurations. Signed-off-by: Jim Cromie Co-developed-by: Łukasz Bartosik Signed-off-by: Łukasz Bartosik --- - skip comma tests if no builtins -v3 squash in tests and doc --- .../admin-guide/dynamic-debug-howto.rst | 9 +--- lib/dynamic_debug.c

[PATCH v3 43/54] drm-dyndbg: add DRM_CLASSMAP_USE to etnaviv

2025-04-02 Thread Jim Cromie
etnaviv has 5 DRM_UT_CORE debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs as well as plain-old pr_debug()s Signed-off-by: Jim Cromie --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 ++ 1 file changed, 2 insertions(+)

[PATCH v3 36/54] drm-dyndbg: DRM_CLASSMAP_USE in drm_crtc_helper

2025-04-02 Thread Jim Cromie
drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- drivers/gpu/drm/drm_crtc_helper.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 27/54] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-04-02 Thread Jim Cromie
ow the module defining the classmap to protect its classes from unintended alterations by legacy/class-less queries. Next: Author choice: use of DYNAMIC_DEBUG_CLASSMAP_PARAM() means they want the drm.debug style control point. We should presume they want it to reflect whats set underneath, with o

[PATCH v3 34/54] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver

2025-04-02 Thread Jim Cromie
drm_dbg()s. Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.") Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gp

[PATCH v3 33/54] drm-print: fix config-dependent unused variable

2025-04-02 Thread Jim Cromie
tic-key patches in the proper state. The compiler evidently sees this lack of reference and complains. So this drops the local var and refs the field directly in the macro-call, which avoids the warning/error. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- drivers/gpu/drm/drm_pri

[PATCH v3 08/54] dyndbg: reduce verbose/debug clutter

2025-04-02 Thread Jim Cromie
ed 1 queries, with 0 matches, 0 errs Also reduce verbose=3 messages in ddebug_add_module When modprobing a module, dyndbg currently logs/says "add-module", and then "skipping" if the module has no prdbgs. Instead just check 1st and return quietly. no functional change Signe

[PATCH v3 24/54] dyndbg: split multi-query strings with %

2025-04-02 Thread Jim Cromie
ng is actually lost here. selftests-dyndbg: test_percent_splitting This does basic testing of classmaps using '%' separated multi-queries. It modprobes test_dynamic_debug with several classes enabled, and counts to verify that the expected sites show the enablement in the control file. Signed-off-by: J

[PATCH v3 19/54] dyndbg: detect class_id reservation conflicts

2025-04-02 Thread Jim Cromie
igned-off-by: Jim Cromie --- --- lib/dynamic_debug.c | 29 + lib/test_dynamic_debug.c | 8 2 files changed, 37 insertions(+) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 53e261dbf81e..56b503af0b31 100644 --- a/lib/dynamic_debug.c +++

[PATCH v3 26/54] dyndbg: change __dynamic_func_call_cls* macros into expressions

2025-04-02 Thread Jim Cromie
this usage by changing __dynamic_func_call_cls{,_no_desc} macros into expressions, by replacing the do-while-0s with a ({ }) wrapper. In the common usage, the trailing ';' converts the expression into a statement. drm_dbg("statement form"); Signed-off-by: Jim Cromie

[PATCH v3 21/54] dyndbg-test: change do_prints testpoint to accept a loopct

2025-04-02 Thread Jim Cromie
nts messages (once) to the-log. NB: the count is clamped to 1, chosen to be notice able, but not annoying, and not enough to accidentally flood the logs. Signed-off-by: Jim Cromie --- lib/test_dynamic_debug.c | 37 ++--- 1 file changed, 26 insertions(+),

[PATCH v3 22/54] dyndbg-API: promote DYNAMIC_DEBUG_CLASSMAP_PARAM to API

2025-04-02 Thread Jim Cromie
nside the fn, to give access to all kp members. Also clean up and improve comments in test-code, and add MODULE_DESCRIPTIONs. cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- -v9 - fixup drm-print.h add PARAM_REF forwarding macros with DYNAMIC_DEBUG_CLASSMAP_PARAM_REF in the API

[PATCH v3 09/54] dyndbg: refactor param_set_dyndbg_classes and below

2025-04-02 Thread Jim Cromie
ddebug_apply_class_bitmap(), also check for actual changes to the bits before announcing them, to declutter logs. No functional change. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- v3 s/modnm/mod_name/g --- lib/dynamic_debug.c | 65 - 1 file

[PATCH v3 11/54] dyndbg: replace classmap list with a vector

2025-04-02 Thread Jim Cromie
ing of classmaps currently, and doesn't need to. For now, just add comment. Signed-off-by: Jim Cromie --- v3- drop __outvar as promising magic it doesnt have --- include/linux/dynamic_debug.h | 1 - lib/dynamic_debug.c | 62 ++- 2 files changed, 32

[PATCH v3 07/54] dyndbg: drop NUM_TYPE_ARRAY

2025-04-02 Thread Jim Cromie
ARRAY_SIZE works here, since array decl is complete. no functional change Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- include/linux/dynamic_debug.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h

[PATCH v3 03/54] docs/dyndbg: explain flags parse 1st

2025-04-02 Thread Jim Cromie
ead. cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- Documentation/admin-guide/dynamic-debug-howto.rst | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/dynamic-debug-howto.rst b/Documentation/adm

[PATCH v3 06/54] dyndbg: make ddebug_class_param union members same size

2025-04-02 Thread Jim Cromie
they will both see the same value. Signed-off-by: Jim Cromie Reviewed-by: Louis Chauvet --- include/linux/dynamic_debug.h | 2 +- lib/dynamic_debug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h

[PATCH v2 33/59] docs/dyndbg: add classmap info to howto (TBD)

2025-03-30 Thread Jim Cromie
TBD: some of this might be over-specification, or just over-talked. NB: The _DEFINE & _USE model makes the user dependent on the definer, just like EXPORT_SYMBOL(__drm_debug) already does. cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- v5 adjustments per Randy Dunlap v7 checkp

[PATCH v2 51/59] drm-dyndbg: add DRM_CLASSMAP_USE to vmwgfx driver

2025-03-28 Thread Jim Cromie
The vmwgfx driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v2 22/59] dyndbg-API: promote DYNAMIC_DEBUG_CLASSMAP_PARAM to API

2025-03-27 Thread Jim Cromie
nside the fn, to give access to all kp members. Also clean up and improve comments in test-code, and add MODULE_DESCRIPTIONs. cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- -v9 - fixup drm-print.h add PARAM_REF forwarding macros with DYNAMIC_DEBUG_CLASSMAP_PARAM_REF in the API

Re: [PATCH v2 30/59] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-03-25 Thread jim . cromie
On Tue, Mar 25, 2025 at 12:29 PM wrote: > > On Mon, Mar 24, 2025 at 9:20 AM Louis Chauvet > wrote: > > > > > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > > Current classmap code protects class'd pr_debugs from uninten

Re: [PATCH v2 47/59] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

2025-03-25 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:03 AM Louis Chauvet wrote: > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > tiny/bochs has 5 DRM_UT_* debugs, make them controllable when > > CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has > > class'd debugs

Re: [PATCH v2 30/59] dyndbg: drop "protection" of class'd pr_debugs from legacy queries

2025-03-25 Thread jim . cromie
> > - int valid_class; > > + int slctd_class; > > Nitpick: can you use full words? slctd is difficult to read. > yes. done. thx.

Re: [PATCH v2 33/59] docs/dyndbg: add classmap info to howto (TBD)

2025-03-25 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:23 AM Louis Chauvet wrote: > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > Describe the 3 API macros providing dynamic_debug's classmaps > > > > DYNDBG_CLASSMAP_DEFINE - create & export a cl

Re: [PATCH v2 29/59] dyndbg: change __dynamic_func_call_cls* macros into expressions

2025-03-25 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:19 AM Louis Chauvet wrote: > > > > Le 20/03/2025 à 19:52, Jim Cromie a écrit : > > The Xe driver's XE_IOCTL_DBG macro calls drm_dbg() from inside an if > > (expression). This breaks when CONFIG_DRM_USE_DYNAMIC_DEBUG=y because > >

Re: [PATCH 16/63] dyndbg-API: replace DECLARE_DYNDBG_CLASSMAP

2025-03-25 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:07 AM Louis Chauvet wrote: > trimming > >>> + __section("__dyndbg_class_users") _uname = {\ > >>> + .mod_name = KBUILD_MODNAME, \ > >>> + .map = &(_var), \

[PATCH v2 35/59] drm: use correct ccflags-y spelling

2025-03-24 Thread Jim Cromie
; modules built with CONFIG_DYNAMIC_DEBUG=y (!1) don't need the flag. Fixes: 84ec67288c10 ("drm_print: wrap drm_*_dbg in dyndbg descriptor factory macro") Signed-off-by: Jim Cromie --- drivers/gpu/drm/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

Re: [PATCH 28/63] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API

2025-03-24 Thread jim . cromie
On Sun, Mar 16, 2025 at 3:14 PM wrote: > > On Tue, Feb 25, 2025 at 7:29 AM Louis Chauvet > wrote: > > > > > > > > Le 25/01/2025 à 07:45, Jim Cromie a écrit : > > > move the DYNDBG_CLASSMAP_PARAM macro from test-dynamic-debug.c into > > > the

Re: [PATCH v2 10/59] dyndbg: replace classmap list with a vector

2025-03-24 Thread jim . cromie
On Mon, Mar 24, 2025 at 9:08 AM Louis Chauvet wrote: > > > > Le 20/03/2025 à 19:51, Jim Cromie a écrit : > Thanks for your explanation of __outvar! It makes sense. I never seen > this pattern anywhere in the kernel, maybe a simple doc comment is > enough to carry the informa

[PATCH v2 34/59] checkpatch: dont warn about unused macro arg on empty body

2025-03-20 Thread Jim Cromie
args. cc: Andy Whitcroft cc: Joe Perches cc: Dwaipayan Ray cc: Lukas Bulwahn Signed-off-by: Jim Cromie --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 7b28ad331742..0c4f578ea6e7 10075

[PATCH v2 23/59] dyndbg: move .mod_name from/to structs ddebug_table/_ddebug_info

2025-03-20 Thread Jim Cromie
a different offset. Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 1 + lib/dynamic_debug.c | 41 ++- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index

[PATCH v2 37/59] drm-dyndbg: adapt DRM to invoke DYNAMIC_DEBUG_CLASSMAP_PARAM

2025-03-20 Thread Jim Cromie
Invoke DYNAMIC_DEBUG_CLASSMAP_PARAM to hook drm.debug (__drm_debug) to the DRM_UT_* classmap, replacing the ad-hoc wiring previously doing it. Add DRM_CLASSMAP_* adapter macros to selectively use DYNAMIC_DEBUG_CLASSMAP_* when DRM_USE_DYNAMIC_DEBUG=y is configured. Signed-off-by: Jim Cromie

[PATCH v2 31/59] docs/dyndbg: explain new delimiters: comma, percent

2025-03-20 Thread Jim Cromie
Add mention of comma and percent delimiters into the respective paragraphs describing their equivalents: space and newline. cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- .../admin-guide/dynamic-debug-howto.rst | 19 +++ 1 file changed, 11 insertions(+), 8

[PATCH v2 19/59] dyndbg: detect class_id reservation conflicts

2025-03-20 Thread Jim Cromie
igned-off-by: Jim Cromie --- --- lib/dynamic_debug.c | 33 +++-- lib/test_dynamic_debug.c | 8 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index aebafa1be06a..e84b6677e94d 100644 ---

[PATCH v2 57/59] drm-dyndbg: add DRM_CLASSMAP_USE to the drm_gem_shmem_helper driver

2025-03-20 Thread Jim Cromie
The drm_gem_shmem_helper driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_gem_shmem_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH v2 50/59] drm-dyndbg: add DRM_CLASSMAP_USE to radeon

2025-03-20 Thread Jim Cromie
radeon has some DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg about its use of the class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/radeon/radeon_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/r

[PATCH v2 18/59] selftests-dyndbg: add tools/testing/selftests/dynamic_debug/*

2025-03-20 Thread Jim Cromie
g: query 0: "=_" mod:* [ 35.553544] dyndbg: processed 1 queries, with 1778 matches, 0 errs Signed-off-by: Jim Cromie Co-developed-by: Łukasz Bartosik Signed-off-by: Łukasz Bartosik --- - check KCONFIG_CONFIG to avoid silly fails Several tests are dependent upon config choices. Lets avoid fai

[PATCH v2 46/59] drm-dyndbg: add DRM_CLASSMAP_USE to simpledrm

2025-03-20 Thread Jim Cromie
tiny/simpledrm has 3 DRM_UT_DRIVER debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/tiny/simpledrm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v2 54/59] drm-dyndbg: add DRM_CLASSMAP_USE to mgag200 driver

2025-03-20 Thread Jim Cromie
The mgag200 driver has a number of DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module uses them. Signed-off-by: Jim Cromie --- drivers/gpu/drm/mgag200/mgag200_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm

[PATCH v2 59/59] drm: RFC - make drm_dyndbg_user.o for drm-*_helpers, drivers

2025-03-20 Thread Jim Cromie
is is just as per-module as just adding the _USE() explicitly to the main .c file, which is less magical than make-fu. Also, it appears to cause make && make rebuilds. and try to link it to helpers and everything Signed-off-by: Jim Cromie --- drivers/gpu/drm/Makefile | 9

[PATCH v2 58/59] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2025-03-20 Thread Jim Cromie
Time for some thorough CI. Also, the previous 18 patches could perhaps be replaced by a single invocation of DYNDBG_CLASSMAP_USE, from a C-file linked into all drm drivers & helpers. I didn't find such a file, nor a drm-client linkage item in the Makefile. Signed-off-by: J

[PATCH v2 49/59] drm-dyndbg: add DRM_CLASSMAP_USE to gma500 driver

2025-03-20 Thread Jim Cromie
The gma500 has 126 DRM_UT_* debugs, make them controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has class'd debugs. Signed-off-by: Jim Cromie --- drivers/gpu/drm/gma500/psb_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/g

  1   2   3   4   5   6   7   8   9   10   >