Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1281415imm; Wed, 10 Oct 2018 11:59:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV602VqYKvggGgCWkWfVfGdLN5q9XXbTJOEkxP1ObGSEzRPmoH1Ziu/La7QS80II+sLpR382Y X-Received: by 2002:a62:9b9a:: with SMTP id e26-v6mr37122039pfk.181.1539197951715; Wed, 10 Oct 2018 11:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539197951; cv=none; d=google.com; s=arc-20160816; b=h7jBrQDMPB+cJAU2ToEm+pe2lArm+1Qd9bQPBRLBVladsZ2l51LqF3Dx5KWLUq2tlP CQGjruEMIVFAuaKosVF1sbRXm2Wa4NNI0W0j1jqVwcf7gLZwFzn578fXcd+f6J/4rvnD 1QBd4HJhZWHPGFQfx3doXf7gBJbYVDivikmKaZBkFKQJpYQfVKpVBM/7YooK1+rpWxIe lMhdpGyZuCBSbPdN8j3kUsfu4aDbZi7lQuC+ILTFgW/49vjFOTt6fNJ1GyJrAh0PPy2X ocdDBrEcVYiTE84hj6TK8izjllFmdhB77oVT8dGTBG3LJVgqDEmpDVvJeAOJHBNxOvJT Ieqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=zE6C+9VGheSlCn9VkOQl42kuUU30c9d33bZp2r4KVVM=; b=JxcRGgqXr2REDUuLVs6wYvKPEQDDNc3ol/nZ7G5t+3KfCMtz9QT/9SqH5L50ftqmFt oUry8cFN+PfN+qOzxXRh6ixAZ90OdCQjI0bYma2Fxt0DJJ3ct0qwBdAPJV0B02+DhUpb 4Lor7Hq5i1cS5gTc3Kten9ADWUoyu5eOfLhYxVD7ZQ7vZ4mpo3bCoCqZAtPgdqmUkBck dzy49nMnDmfiy9WuikluppjOPqDug+LULGjlvzOb5Yg8ydpwoMcT9VthkOuS6xwD9d0y ZF/d7OSBRqQFOCE3nzAoFq4/uYzpVKUdSBy1GC+53FK4RbEmx0VKX4V0XUyIjKMjx4L9 ZTGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5-v6si23991968pgl.343.2018.10.10.11.58.40; Wed, 10 Oct 2018 11:59:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727132AbeJKCVq convert rfc822-to-8bit (ORCPT + 99 others); Wed, 10 Oct 2018 22:21:46 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:11494 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbeJKCVq (ORCPT ); Wed, 10 Oct 2018 22:21:46 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w9AIsUxl018220; Wed, 10 Oct 2018 20:58:13 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2n0se6rpbm-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 10 Oct 2018 20:58:13 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7120531; Wed, 10 Oct 2018 18:58:12 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag3node3.st.com [10.75.127.9]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4DC80A603; Wed, 10 Oct 2018 18:58:12 +0000 (GMT) Received: from SFHDAG7NODE2.st.com (10.75.127.20) by SFHDAG3NODE3.st.com (10.75.127.9) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 10 Oct 2018 20:58:11 +0200 Received: from SFHDAG7NODE2.st.com ([fe80::d548:6a8f:2ca4:2090]) by SFHDAG7NODE2.st.com ([fe80::d548:6a8f:2ca4:2090%20]) with mapi id 15.00.1347.000; Wed, 10 Oct 2018 20:58:11 +0200 From: Loic PALLARDY To: Bjorn Andersson CC: "ohad@wizery.com" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Arnaud POULIQUEN , "benjamin.gaignard@linaro.org" , "s-anna@ti.com" Subject: RE: [PATCH v4 12/17] remoteproc: modify vring allocation to rely on centralized carveout allocator Thread-Topic: [PATCH v4 12/17] remoteproc: modify vring allocation to rely on centralized carveout allocator Thread-Index: AQHUJavkKiQgZmDpyUyOATXoSlfNXqUYSEoAgAA60UA= Date: Wed, 10 Oct 2018 18:58:11 +0000 Message-ID: <89f3d4bbbc484c5fb5d85f03b1325103@SFHDAG7NODE2.st.com> References: <1532697292-14272-1-git-send-email-loic.pallardy@st.com> <1532697292-14272-13-git-send-email-loic.pallardy@st.com> <20181010053206.GA20016@builder> In-Reply-To: <20181010053206.GA20016@builder> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.50] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-10_11:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Bjorn Andersson [mailto:bjorn.andersson@linaro.org] > Sent: mercredi 10 octobre 2018 07:32 > To: Loic PALLARDY > Cc: ohad@wizery.com; linux-remoteproc@vger.kernel.org; linux- > kernel@vger.kernel.org; Arnaud POULIQUEN ; > benjamin.gaignard@linaro.org; s-anna@ti.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. Regards, Loic > > Regards, > Bjorn