Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp4061827ima; Tue, 23 Oct 2018 16:26:03 -0700 (PDT) X-Google-Smtp-Source: AJdET5dylkMdKJRCzvhGV4WJl3gXMgyrr0SIYtnjMfYkTYGjhJmPOgFHvpbaG6kPLUMFREW0EowN X-Received: by 2002:a62:6c4:: with SMTP id 187-v6mr264828pfg.109.1540337163265; Tue, 23 Oct 2018 16:26:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540337163; cv=none; d=google.com; s=arc-20160816; b=TWTo4OW2zgVwpH4DvoPcWFUtn6nuVae2vl6ODIuBek40NBKOE0T37LNqO6pFW+SWh1 cdKfx4uoHh4n9Hxf+mSNVplhFxRQJmHtrK2d0EI9zveuZuqlSxR8oI1FzzRaWvYXVdD3 olVFDZIVKwQgW9ZMDCBhKkRFCHwT5idHESMwUbtZm3+dnZxRmv8VbRpyJJV4w6LiSBZk ikr0LNSm9yMPsumnd4/27UV6d61toxOP9r1FMgfO303TIe6JbPsy9jcyB0XRYiK8gOs2 7+ZVC3zocnyNwl2ViLIfYxF4yoNt3Gbm8FunPwbUE+B/IyAwXxlSg/D9/OBAvYI7C+Dv uKHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=OAPiWTpaAeEd+JGAXzPLx0jY0DwDwmFw2pyyrv+iw94=; b=0zGtd8bJhPo87Kjbk2aFrO9B3YD1/egge7ahnfgKcIn2puvgC1JgnrHukp6J356PPf 8X2noor90Ulndnnb4i+N0ZfXPBBw985gzo4KtsSWPWXDcN8IxrGusN33KDpcdXDWO3Gu 5/j0ZMo2/9WgH1tUvb4Oy4Wn0RR53ujh1zbF03RJXenKnyIxdGW6rRx96vLArO/VTSsx 2dsSB1I7iQeDCA8prDzGAhoN/479UdW2INWTDTmSMuwhhuEN7gnrmpCia5PycU8nZMoc Luv5yrZeaNFxCQV4f1aCipcYKESPBV7gKzZfvBnhz8L7FDkl7m4gJeCYhLVarlDjP8b8 x05g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=g0LziTC2; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u66-v6si2833886pgu.94.2018.10.23.16.25.47; Tue, 23 Oct 2018 16:26:03 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=g0LziTC2; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729090AbeJXHuQ (ORCPT + 99 others); Wed, 24 Oct 2018 03:50:16 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:51314 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726919AbeJXHuQ (ORCPT ); Wed, 24 Oct 2018 03:50:16 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id w9NNOceZ005455; Tue, 23 Oct 2018 18:24:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1540337078; bh=OAPiWTpaAeEd+JGAXzPLx0jY0DwDwmFw2pyyrv+iw94=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=g0LziTC26czXgr2sYCNrfVX/ApzY0GUjZ3iod1pBkn7RQ7UIqpB6isUxG1RlzWWsZ ymD5qxKviu4dORmmWrmd4clhYD8qLJUp+OOM5n5P6plmzxbsedfHs6NozeXfvEdBBP QvNYCOV+uYboPefsE2cAoP7Hy6rtK4z9oDuBHIbU= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9NNOcmn001734; Tue, 23 Oct 2018 18:24:38 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 23 Oct 2018 18:24:38 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 23 Oct 2018 18:24:38 -0500 Received: from [128.247.58.153] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9NNOcam008289; Tue, 23 Oct 2018 18:24:38 -0500 Subject: Re: [PATCH v4 12/17] remoteproc: modify vring allocation to rely on centralized carveout allocator To: Bjorn Andersson , Loic PALLARDY CC: "ohad@wizery.com" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Arnaud POULIQUEN , "benjamin.gaignard@linaro.org" References: <1532697292-14272-1-git-send-email-loic.pallardy@st.com> <1532697292-14272-13-git-send-email-loic.pallardy@st.com> <20181010053206.GA20016@builder> <89f3d4bbbc484c5fb5d85f03b1325103@SFHDAG7NODE2.st.com> <20181015064040.GT12063@builder> From: Suman Anna Message-ID: <6d2a42f0-d981-fac5-e4a9-fa7b8fdaef73@ti.com> Date: Tue, 23 Oct 2018 18:24:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181015064040.GT12063@builder> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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@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. >> > > 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 >