From: Ido Yariv <ido@wizery.com>
To: Sjur BRENDELAND <sjur.brandeland@stericsson.com>
Cc: "Ohad Ben-Cohen" <ohad@wizery.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Sjur Brændeland" <sjur@brendeland.net>
Subject: Re: [RFCv2 07/11] remoteproc: Register virtio devices after vring allocation
Date: Fri, 21 Dec 2012 15:40:51 +0200 [thread overview]
Message-ID: <20121221134051.GB22252@WorkStation.localnet> (raw)
In-Reply-To: <81C3A93C17462B4BBD7E272753C1057924576E500F@EXDCVYMBSTM005.EQ1STM.local>
Hi Sjur,
On Fri, Dec 21, 2012 at 01:20:02PM +0100, Sjur BRENDELAND wrote:
> Hi Ido,
>
> > From: Ido Yariv [mailto:ido@wizery.com]
> > > Postpone the registration of virtio devices until all
> > > vritio ring resource has been allocated.
> > > This fixes the following bug: The driver's start callback
> > > is called before all vring notify ids are allocated and
> > > max_notifyid will be increased after starting the remoteproc.
> >
> > It seems that this patch wont solve this issue, since
> > rproc_add_virtio_dev eventually increases max_notifyid, so the same
> > problem will simply occur at a later stage.
> >
> > Also, it seems that the original rproc_add_virtio_dev calls were not
> > removed, so devices would be added twice.
>
> Indeed. This was introduced by a faulty merge - I'll fix this up.
>
> > If max_notifyid needs to be set before the first virtio device is added,
> > how about counting the number of notification ids in advance before
> > adding the devices, by traversing the resource list twice?
>
> Ugh, thanks I missed this. How about calling rproc_alloc_vring from
> rproc_parse_vring so that the resource allocation are done before
> the virtio devices are started?
I don't think that would solve it - rproc_parse_vring is called from
rproc_handle_vdev which is called more than once (for each vdev), so
max_notifyid could still be increased after the first call to
rproc_add_virtio_dev.
> BTW, I think most of the other review comments from you are OK. I'll
> try to address them in my next patch-set sometime early next year.
Great, thanks!
Happy new year :)
Ido.
next prev parent reply other threads:[~2012-12-21 13:41 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 16:06 [RFCv2 00/10] remoteproc: Support bi-directional vdev config space Sjur Brændeland
2012-12-14 16:06 ` [RFCv2 01/11] remoteproc: Code cleanup of resource parsing Sjur Brændeland
2012-12-14 16:06 ` [RFCv2 02/11] remoteproc: Move check on firmware name to rproc_add Sjur Brændeland
2012-12-14 16:06 ` [RFCv2 03/11] remoteproc: Set vring addresses in resource table Sjur Brændeland
2012-12-21 2:13 ` Ido Yariv
2013-01-15 15:07 ` Sjur BRENDELAND
2012-12-14 16:06 ` [RFCv2 04/11] remoteproc: Add state RPROC_LOADED Sjur Brændeland
2012-12-21 2:14 ` Ido Yariv
2013-01-15 15:08 ` Sjur BRENDELAND
2012-12-14 16:06 ` [RFCv2 05/11] remoteproc: Load firmware once Sjur Brændeland
2012-12-21 2:16 ` Ido Yariv
2012-12-21 12:02 ` Sjur BRENDELAND
2012-12-21 13:30 ` Ido Yariv
2012-12-21 14:04 ` Sjur BRENDELAND
2013-01-15 15:11 ` Sjur BRENDELAND
2012-12-14 16:06 ` [RFCv2 06/11] remoteproc: Add resource entry number to callbacks Sjur Brændeland
2012-12-14 16:06 ` [RFCv2 07/11] remoteproc: Register virtio devices after vring allocation Sjur Brændeland
2012-12-21 2:18 ` Ido Yariv
2012-12-21 12:20 ` Sjur BRENDELAND
2012-12-21 13:40 ` Ido Yariv [this message]
2012-12-21 13:50 ` Sjur BRENDELAND
2012-12-21 15:26 ` Ohad Ben-Cohen
2013-01-15 15:11 ` Sjur BRENDELAND
2012-12-14 16:06 ` [RFCv2 08/11] remoteproc: Refactor function rproc_elf_find_rsc_table Sjur Brændeland
2012-12-21 2:18 ` Ido Yariv
2013-01-15 15:11 ` Sjur BRENDELAND
2012-12-14 16:06 ` [RFCv2 09/11] remoteproc: Add operation to find resource table in memory Sjur Brændeland
2012-12-21 2:19 ` Ido Yariv
2013-01-15 15:13 ` Sjur BRENDELAND
2012-12-14 16:06 ` [RFCv2 10/11] remoteproc: Find resource table in device memory Sjur Brændeland
2012-12-21 2:20 ` Ido Yariv
2013-01-15 15:05 ` Sjur BRENDELAND
2012-12-14 16:07 ` [RFCv2 11/11] remoteproc: Support virtio config space Sjur Brændeland
2012-12-21 2:21 ` Ido Yariv
2013-01-15 15:14 ` Sjur BRENDELAND
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=20121221134051.GB22252@WorkStation.localnet \
--to=ido@wizery.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=sjur.brandeland@stericsson.com \
--cc=sjur@brendeland.net \
/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