From: Suman Anna <s-anna@ti.com>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
<linux-remoteproc@vger.kernel.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>, <linux-kernel@vger.kernel.org>,
Lee Jones <lee.jones@linaro.org>,
Loic Pallardy <loic.pallardy@st.com>
Subject: Re: [PATCH v2 1/4] remoteproc: Introduce auto-boot flag
Date: Wed, 31 Aug 2016 13:27:51 -0500 [thread overview]
Message-ID: <ba437b4f-dde3-8def-afe2-472430b750e6@ti.com> (raw)
In-Reply-To: <1470952373-4823-1-git-send-email-bjorn.andersson@linaro.org>
Hi Bjorn,
On 08/11/2016 04:52 PM, Bjorn Andersson wrote:
> Introduce an "auto-boot" flag on rprocs to make it possible to flag
> remote processors without vdevs to automatically boot once the firmware
> is found.
>
> Preserve previous behavior of the wkup_m3 processor being explicitly
> booted by a consumer.
>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Loic Pallardy <loic.pallardy@st.com>
> Cc: Suman Anna <s-anna@ti.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>
> Changes since v1:
> - s/always_on/auto_boot/
> - Fixed double increment of "power" in recover path
> - Marked wkup_m3 to not auto_boot
>
I am seeing various issues with this series as I am testing this series
more thoroughly with various TI remoteproc drivers and IPC stacks based
on virtio devices. I use very simple firmware images that publishes the
rpmsg-client-sample devices, so that I can use the kernel
rpmsg_client_sample to test the communication.
Here's a summary of the main issues:
1. The rproc_boot holds a module reference count to the remoteproc
platform driver so that it cannot be removed when a remote processor is
booted. The previous architecture allowed virtio_rpmsg_bus or the
platform remoteproc driver to be installed independent of each other
with the boot actually getting triggered when the virtio_rpmsg_bus gets
probed in find_vqs. The boot now happens when just the platform
remoteproc driver is installed independent of virtio_rpmsg_bus and
results in holding self-reference counts. This makes it impossible to
remove the remoteproc platform module cleanly (we shouldn't be imposing
force remove), which means we can't stop the remoteprocs properly.
2. The reversal of boot between virtio_rpmsg_bus and remoteproc core
also meant that the virtio devices and therefore the memory for vrings
are allocated at the time virtio_rpmsg_bus is probed in find_vqs(). The
remoteproc can be booted without the virtio_rpmsg_bus module installed.
We do use the allocated dma addresses of the vrings in the published
resource table, but now the remote processor is up even before these
values are filled in. I had to actually move up the rproc_alloc_vring
alongside rproc_parse_vring to have the communication up.
3. The remoteproc platform driver cannot be removed previously when the
corresponding virtio devices are probed/configured properly and all the
communication flow w.r.t rpmsg channel publishing followed from the
remoteproc boot. These channels are child devices of the parent virtio
devices, and since the remoteproc boot/shutdown followed the virtio
device probe/removal lifecycle, the rpmsg channels life-cycle followed
that of the parent virtio device. My communication paths are now failing
if I remove the virtio_rpmsg_bus and insmod it again as the vrings and
vring buffers are configured again while the remoteproc is still
running. Also, since the remoteproc is not rebooted, the previously
published rpmsg channels are stale and they won't get recreated.
In summary, the current patches worked nicely in a error recovery
scenario but are not working properly with the various combinations of
module insertion/removal process.
regards
Suman
next prev parent reply other threads:[~2016-08-31 18:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 21:52 Bjorn Andersson
2016-08-11 21:52 ` [PATCH v2 2/4] remoteproc: Calculate max_notifyid during load Bjorn Andersson
2016-08-11 21:52 ` [PATCH v2 3/4] remoteproc: Move vdev handling to boot/shutdown Bjorn Andersson
2016-08-11 21:52 ` [PATCH v2 4/4] remoteproc: Move handling of cached table " Bjorn Andersson
2016-08-31 18:27 ` Suman Anna [this message]
2016-09-08 22:27 ` [PATCH v2 1/4] remoteproc: Introduce auto-boot flag Bjorn Andersson
2016-09-16 23:58 ` Suman Anna
2016-09-19 23:24 ` Bjorn Andersson
2016-09-20 21:29 ` Suman Anna
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=ba437b4f-dde3-8def-afe2-472430b750e6@ti.com \
--to=s-anna@ti.com \
--cc=bjorn.andersson@linaro.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=loic.pallardy@st.com \
--cc=ohad@wizery.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
all inboxes | Powered by JetHome®