[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6d2a42f0-d981-fac5-e4a9-fa7b8fdaef73@ti.com>
Date: Tue, 23 Oct 2018 18:24:37 -0500
From: Suman Anna <s-anna@...com>
To: Bjorn Andersson <bjorn.andersson@...aro.org>,
Loic PALLARDY <loic.pallardy@...com>
CC: "ohad@...ery.com" <ohad@...ery.com>,
"linux-remoteproc@...r.kernel.org" <linux-remoteproc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Arnaud POULIQUEN <arnaud.pouliquen@...com>,
"benjamin.gaignard@...aro.org" <benjamin.gaignard@...aro.org>
Subject: Re: [PATCH v4 12/17] remoteproc: modify vring allocation to rely on
centralized carveout allocator
Hi Bjorn, Loic,
On 10/15/18 1:40 AM, Bjorn Andersson wrote:
> On Wed 10 Oct 11:58 PDT 2018, Loic PALLARDY wrote:
>
>>
>>
>>> -----Original Message-----
>>> From: Bjorn Andersson [mailto:bjorn.andersson@...aro.org]
>>> Sent: mercredi 10 octobre 2018 07:32
>>> To: Loic PALLARDY <loic.pallardy@...com>
>>> Cc: ohad@...ery.com; linux-remoteproc@...r.kernel.org; linux-
>>> kernel@...r.kernel.org; Arnaud POULIQUEN <arnaud.pouliquen@...com>;
>>> benjamin.gaignard@...aro.org; s-anna@...com
>>> Subject: Re: [PATCH v4 12/17] remoteproc: modify vring allocation to rely on
>>> centralized carveout allocator
>>>
>>> On Fri 27 Jul 06:14 PDT 2018, Loic Pallardy wrote:
>>>> int rproc_fw_sanity_check(struct rproc *rproc, const struct firmware *fw)
>>>> diff --git a/drivers/remoteproc/remoteproc_virtio.c
>>> b/drivers/remoteproc/remoteproc_virtio.c
>>> [..]
>>>> @@ -114,6 +122,10 @@ static struct virtqueue *rp_find_vq(struct
>>> virtio_device *vdev,
>>>> rvring->vq = vq;
>>>> vq->priv = rvring;
>>>>
>>>> + /* Update vring in resource table */
>>>> + rsc = (void *)rproc->table_ptr + rvdev->rsc_offset;
>>>> + rsc->vring[id].da = mem->da;
>>>> +
>>>
>>> This would now happen after we've started the remoteproc. Don't we need
>>> to do this in-between allocating the carveouts and booting the
>>> remoteproc?
>>
>> Yes da is updated after coprocessor boot, but before vdev status in resource table is set to DRIVER_OK and kick.
>> Coprocessor should not parse this resource before as vrings not initialized yet.
>> If coprocessor needs to get some information about vring carveout at boot time, carveout resources named vdev"x"vring"y" should be added to firmware resource table.
>> In that case information will be filled before coprocessor boot.
>>
>
> Makes sense, thanks for clarifying. Applied.
Unfortunately, our current firmwares are not doing this, and so this
patch is breaking the IPC functionality in our platform drivers. We do
wait for the vdev status before actually attempting any Tx from the
remote side.
Our newer platforms will definitely be leveraging this before the vring
inits to account for early-boot of rprocs in bootloaders and
late-attach/ipc-only modes in kernel.
regards
Suman
>
> Regards,
> Bjorn
>
Powered by blists - more mailing lists