[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200624052801.GB407764@builder.lan>
Date: Tue, 23 Jun 2020 22:28:01 -0700
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: rishabhb@...eaurora.org
Cc: Alex Elder <elder@...e.org>, linux-remoteproc@...r.kernel.org,
linux-kernel@...r.kernel.org, tsoni@...eaurora.org,
psodagud@...eaurora.org, sidgup@...eaurora.org,
linux-remoteproc-owner@...r.kernel.org
Subject: Re: [PATCH v5 1/2] remoteproc: qcom: Add per subsystem SSR
notification
On Tue 23 Jun 18:41 PDT 2020, rishabhb@...eaurora.org wrote:
> On 2020-06-23 14:45, Alex Elder wrote:
> > On 6/22/20 8:04 PM, Rishabh Bhatnagar wrote:
> > > Currently there is a single notification chain which is called
> > > whenever any
> > > remoteproc shuts down. This leads to all the listeners being
> > > notified, and
> > > is not an optimal design as kernel drivers might only be interested in
> > > listening to notifications from a particular remoteproc. Create a
> > > global
> > > list of remoteproc notification info data structures. This will hold
> > > the
> > > name and notifier_list information for a particular remoteproc. The
> > > API
> > > to register for notifications will use name argument to retrieve the
> > > notification info data structure and the notifier block will be
> > > added to
> > > that data structure's notification chain. Also move from blocking
> > > notifier
> > > to srcu notifer based implementation to support dynamic notifier head
> > > creation.
> > >
> > > Signed-off-by: Siddharth Gupta <sidgup@...eaurora.org>
> > > Signed-off-by: Rishabh Bhatnagar <rishabhb@...eaurora.org>
> >
> > Sorry, a few more comments, but I think your next one will
> > likely be fine.
> >
> > General:
> > - SSR subsystems are added but never removed. Note that
> > "qcom_common.o" can be built as a module, and if that
> > module were ever removed, memory allocated for these
> > subsystems would be leaked.
> Hi Alex,
> Thank you for reviewing this patchset quickly. This point was
> brought up by Bjorn and it was decided that I will push another patch on
> top in which I'll do the cleanup during module exit.
> > - Will a remoteproc subdev (and in particular, an SSR subdev)
> > ever be removed? What happens to entities that have
> > registered for SSR notifications in that case?
> In practice it should never be removed. If it is clients will
> never get notification about subsystem shutdown/powerup.
Given that clients make direct function calls into qcom_common.ko,
qcom_common.ko would not be possible to rmmod until all clients has been
rmmod'ed. As such there shouldn't be any remaining listeners, or
subdevices, when this happens.
Regards,
Bjorn
Powered by blists - more mailing lists