Re: [PATCH v3 1/3] remoteproc: Expose remoteproc configuration through sysfs

From: Mathieu Poirier
Date: Fri Sep 04 2020 - 18:07:20 EST


On Thu, Sep 03, 2020 at 07:04:54PM -0500, Bjorn Andersson wrote:
> On Thu 03 Sep 18:03 CDT 2020, Rishabh Bhatnagar wrote:
>
> > Add a feature flag to expose some of the remoteproc configuration
> > through sysfs. This feature is helpful in systems where debugfs is
> > not available/mounted. Currently the recovery and coredump
> > configuration is exposed through sysfs rather than debugfs when
> > this feature is selected.
> >
>
> This commit message gives me the feeling that it's about making a
> selection between debugfs vs sysfs. But the patches moves the code from
> debugfs to sysfs and then hide it behind this config option.

Yeah, that description is broken. Probably a copy/paste from V2.

>
> That said, I just commented on v2 questioning that this should be a
> compile time option at all - might be useful for some drivers to
> dynamically "hide" these sysfs attributes though.

Dynamically hinding those would require intelligence from platform drivers, the
same kind that could have use the API to manipulate the coredump mode. That
would have been very easy without the need to move anything from debufs. But
from what Rishab said his problem is at compile time.

Thanks,
Mathieu

>
> Regards,
> Bjorn
>
> > Signed-off-by: Rishabh Bhatnagar <rishabhb@xxxxxxxxxxxxxx>
> > ---
> > drivers/remoteproc/Kconfig | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
> > index c6659dfe..98d52cbe 100644
> > --- a/drivers/remoteproc/Kconfig
> > +++ b/drivers/remoteproc/Kconfig
> > @@ -275,6 +275,17 @@ config TI_K3_DSP_REMOTEPROC
> > It's safe to say N here if you're not interested in utilizing
> > the DSP slave processors.
> >
> > +config RPROC_SYSFS_CONFIGURATION_SUPPORT
> > + bool "Expose remoteproc configuration sysfs entries"
> > + default y
> > + help
> > + Say y here to expose recovery and coredump configuration sysfs
> > + entries. This is helpful in operating systems where debugfs is
> > + not available/mounted.
> > +
> > + It's safe to say N here if you are not interested in accessing
> > + recovery and coredump configuration through sysfs.
> > +
> > endif # REMOTEPROC
> >
> > endmenu
> > --
> > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> > a Linux Foundation Collaborative Project
> >