lkml.org 
[lkml]   [2022]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 07/13] trinity: Add sysfs module
On Sun, 18 Sep 2022 12:33:06 +0200
Greg KH <gregkh@linuxfoundation.org> wrote:

> On Sat, Sep 17, 2022 at 04:23:50PM +0900, Jiho Chu wrote:
> > This patch includes sysfs interfaces.
> >
> > sysfs interface provides NPU's internal statistics, status and control
> > attribes.
> >
> > The sysfs information provided by the Trinity are:
> > - IDU version
> > - profiling result
> > - allocated debugfs buffer
> >
> > The control attributes are including:
> > - initialize profile operation
> > - NPU control (suspend/resume/stop)
> >
> > Signed-off-by: Jiho Chu <jiho.chu@samsung.com>
> > Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
> > Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
> > Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> > ---
> > .../ABI/testing/sysfs-driver-trinity | 55 ++
> > drivers/misc/trinity/Makefile | 1 +
> > drivers/misc/trinity/trinity_sysfs.c | 667 ++++++++++++++++++
> > 3 files changed, 723 insertions(+)
> > create mode 100644 Documentation/ABI/testing/sysfs-driver-trinity
> > create mode 100644 drivers/misc/trinity/trinity_sysfs.c
> >
> > diff --git a/Documentation/ABI/testing/sysfs-driver-trinity b/Documentation/ABI/testing/sysfs-driver-trinity
> > new file mode 100644
> > index 000000000000..754e6f36a1dc
> > --- /dev/null
> > +++ b/Documentation/ABI/testing/sysfs-driver-trinity
> > @@ -0,0 +1,55 @@
> > +What: /sys/devices/platform/trinity/*.triv2/debug/debugfs_max
> > +Date: July 2022
> > +KernelVersion: 5.19-rc8
> > +Contact: Jiho Chu <jiho.chu@samsung.com>
> > +Description: Shows current allocated debugfs entry size.
> > + Note that, Writing max entry size allocates NPU's hardware
> > + memory for debugfs entries.
>
> Why are debugfs things being mentioned in sysfs entries?
>
> That's not needed, nor is it allowed, sorry.
>
> Please put all debugfs stuff in debugfs.
>
> Also, sysfs is "one value per file", you violate that in lots of ways
> with this patch. Please fix all of that, and use the sysfs_emit() calls
> instead of snprintf() for your sysfs show calls.
>
> thanks,
>
> greg k-h
>

Thanks for checking.
I'll fix sysfs entries.

Best regards,
Jiho Chu

\
 
 \ /
  Last update: 2022-09-19 08:45    [W:0.050 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site