[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YxixX3L5w5J+Efw1@kroah.com>
Date: Wed, 7 Sep 2022 16:57:35 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Jim Cromie <jim.cromie@...il.com>
Cc: jbaron@...mai.com, dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org, intel-gvt-dev@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
daniel.vetter@...ll.ch, seanpaul@...omium.org, robdclark@...il.com,
linux@...musvillemoes.dk, joe@...ches.com
Subject: Re: [PATCH v6 21/57] dyndbg: test DECLARE_DYNDBG_CLASSMAP, sysfs
nodes
On Wed, Sep 07, 2022 at 04:54:00PM +0200, Greg KH wrote:
> On Sun, Sep 04, 2022 at 03:40:58PM -0600, Jim Cromie wrote:
> > Demonstrate use of DECLARE_DYNDBG_CLASSMAP macro, and expose them as
> > sysfs-nodes for testing.
>
> Wait, why sysfs?
>
> sysfs isn't for testing, why not use debugfs?
>
>
> >
> > For each of the 4 class-map-types:
> >
> > - declare a class-map of that type,
> > - declare the enum corresponding to those class-names
> > - share _base across 0..30 range
> > - add a __pr_debug_cls() call for each class-name
> > - declare 2 sysnodes for each class-map
> > for 'p' flag, and future 'T' flag
> >
> > These declarations create the following sysfs parameter interface:
> >
> > :#> pwd
> > /sys/module/test_dynamic_debug/parameters
> > :#> ls
> > T_disjoint_bits T_disjoint_names T_level_names T_level_num do_prints
> > p_disjoint_bits p_disjoint_names p_level_names p_level_num
>
> What is in these files?
>
> For sysfs stuff, you need Documentation/ABI entries so that you can't
> abuse sysfs. With debugfs, you can do anything you want :)
Ah, it's just module parameter abuse, not a "normal" sysfs file at all :)
Nevermind, sorry for the noise...
greg k-h
Powered by blists - more mailing lists