public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: xiang xiao <xiaoxiang781216@gmail.com>
Cc: linux-remoteproc@vger.kernel.org, spjoshi@codeaurora.org
Subject: Re: Regression by commit 7e83cab824a86704cdbd7735c19d34e0ce423dc5
Date: Thu, 8 Nov 2018 20:23:26 -0800	[thread overview]
Message-ID: <20181109042326.GF2337@tuxbook-pro> (raw)
In-Reply-To: <CAH2Cfb9ZsFq=VNn_PyHcXPBXnFb_FjXWefFMSh0v5=p4BRi58Q@mail.gmail.com>

On Thu 08 Nov 00:23 PST 2018, xiang xiao wrote:

> On Thu, Nov 8, 2018 at 3:22 PM Bjorn Andersson
> <bjorn.andersson@linaro.org> wrote:
> >
> > On Wed 07 Nov 22:36 PST 2018, xiang xiao wrote:
> >
> > > On Thu, Nov 8, 2018 at 2:18 PM Bjorn Andersson
> > > <bjorn.andersson@linaro.org> wrote:
> > > >
> > > > On Wed 07 Nov 06:25 PST 2018, xiang xiao wrote:
> 
> > > > > When the crash happen, is it better to destroy and recreate all virtio
> > > > > device and it�s children(rpmsg device) again to match the remote side state
> > > > > like the original behavior?
> > > > >
> > > >
> > > > Yes, it's likely that the protocols on top does share some state, so we
> > > > do not have any choice but to report this up to the virtio device.
> > > >
> > > > Removing and re-probing the devices - rather than having some other form
> > > > of notification of this event - makes the code simpler.
> > > >
> > > >
> > > > But it seems we're trying to re-register the same device the second
> > > > time, rather than initialize a new one.
> > > >
> > > If we use one new here, the old need to be destroyed to avoid the leak.
> > > Basically, it's become the old approach again.
> > >
> >
> > You're right, for vdevs we must tear them down and bring them up again.
> >
> > The reason for introducing the offending commit was for carveouts to
> > be allocated past the stop() call, so that we can stop the core and
> > provide a coredump for post mortem debugging.
> >
> Why we need stop the remote core before making a coredump?
> Basically, the coredump is just a series memory copy, it isn't harmful
> to do it while the remote code is still live.

In order to support implementing e.g. parts of the DRM stack the memory
carveouts assigned to the remoteprocs on Qualcomm platforms is protected
from read and write accesses from the application CPU.

Therefor the remoteproc must be stopped before the content is accessed.

Regards,
Bjorn

  reply	other threads:[~2018-11-09  4:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 14:25 Regression by commit 7e83cab824a86704cdbd7735c19d34e0ce423dc5 xiang xiao
2018-11-08  6:22 ` Bjorn Andersson
2018-11-08  6:36   ` xiang xiao
2018-11-08  7:26     ` Bjorn Andersson
2018-11-08  8:16       ` Loic PALLARDY
2018-11-08 18:11         ` xiang xiao
2018-11-08 20:10           ` Loic PALLARDY
2018-11-08  8:23       ` xiang xiao
2018-11-09  4:23         ` Bjorn Andersson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-11-07  7:36 Xiang Xiao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181109042326.GF2337@tuxbook-pro \
    --to=bjorn.andersson@linaro.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=spjoshi@codeaurora.org \
    --cc=xiaoxiang781216@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox