Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3561600imm; Sun, 14 Oct 2018 23:38:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV62Ymma0nZlvJXUY8NhuPCjgQ4ALnyZ7QkTrzEixS3rypQoEzx/2hU9ZAm8BSsrDtsIWunmT X-Received: by 2002:a63:2e47:: with SMTP id u68-v6mr15121437pgu.294.1539585500162; Sun, 14 Oct 2018 23:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539585500; cv=none; d=google.com; s=arc-20160816; b=UrPlEETbHUrGUZMrTr6vSsIuvRFAQikBKRbx3//fXboPmYLzgukAAFmbtBxLXRone0 O7mXvVV0tGioL4BcpByok7TI6pVUCufeI3ixaCYnhoLbJARahPTpQeWGvR8hEVKdgcTs EDy5Yuhqwq62EQIs6He9iMsJflFQ2OgZjYZBNRARyIIkZyNJZrvDPwVnjqQVj06GB4G2 crPsaT+LNJCAuzlc2HO0LyIaaT0tnPVaA+NPOEbXHRi1dhOnWSJrRIUP8hRl+MBefOuG Nnn8bQur3qFGQ/wXteFjTgNeZX/U1eOATWM50V79wnBY/HKPvikRUWqpwc+rdgtF30pP Nw4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8BS5zb4g1oHpzkczXkEvEcwxoqFOGwG+SK0BxMMC0AA=; b=SEFto0NTWVLz9BmEQ/kY+HZlgQbdDr1nmGNCYCDh5V7InLweVXXmxWTeEnyAUQROMi ZA3CL7m/LPskpKW8aojxlpSIKYx0tITQXyuruCcUQxKrQSZ0b6GPxyXv3JWWO+/ZZmlK Zz+gw1ThBuUBrnHZQiRpAI7fy3U9JLprjWMuTP3jMjMtCe6IRDGXAyi4HssUd1PO4Uoj MMUFcHlkzi3gx2Tor3cu6sTUbrYG/0gpZYmtn5b+CoPgHZX4D/pwVqtTIMoQmyr8CK/f 5f4sYO9ifxloV3tach4YeI11tnCjoPO9+sUclA65bGso8njA1Zz751p4KOEWwSaOFsJ7 yoIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MfmReQx9; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y145-v6si8748276pfc.231.2018.10.14.23.38.05; Sun, 14 Oct 2018 23:38:20 -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=@linaro.org header.s=google header.b=MfmReQx9; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726541AbeJOOVd (ORCPT + 99 others); Mon, 15 Oct 2018 10:21:33 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41950 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbeJOOVd (ORCPT ); Mon, 15 Oct 2018 10:21:33 -0400 Received: by mail-pg1-f193.google.com with SMTP id 23-v6so8666802pgc.8 for ; Sun, 14 Oct 2018 23:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8BS5zb4g1oHpzkczXkEvEcwxoqFOGwG+SK0BxMMC0AA=; b=MfmReQx9GaIQ6gX2o7JNuB2lX2CDY3xdQ+zTgodvIUG9IjwGpcH6xvTjWzppGC4zRf VasqCEftW50kREgTub9+vqwIgCiSfi9FC1mMaq7ytkUx7434FnbA/T4Hje4oEunj+3KR 39792J6patU9zJclDVGsDwxCtOCeSBFS0XR3U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8BS5zb4g1oHpzkczXkEvEcwxoqFOGwG+SK0BxMMC0AA=; b=f8nAfxygwIzWsUKJ41o+t8xEwZR6ZNg+R0Aw+FD5kyfsmWCAkQRVJ6IE66wlE+3+P1 wqzDY6DuBDiUz3uGhv2Zzfe2GHWWv3zfFjZ8YWm8VYIpg4xKag4CdN5u7dAs14FoMU8H rCCprvd0eApzhesd6vVjK9UtYHSdFiT1vDVyiH2rTx/gBEBB9PGPGoNrnXxx/6hknzrs 2Q7Q25U/tf+HrpfcY2FTyTzYABrxJvRm6+vBZZvTfKrbrnSWdVKTRQwDvK3Z4vFqVCQ6 IlAZko7e8/aZNNlHoZOOGprnrb+j3xH2DyaVp+nq4ytT5f2NerOBuTvtnPMXe9FwawLZ u/sA== X-Gm-Message-State: ABuFfogGUBrPZ4VnidFVAMNc3Bziy99H3NyqFdHb25ypIAFSqXw6cfhQ zN2GSFUc5Zpwe0SMfFcfKX1LAw== X-Received: by 2002:a63:565d:: with SMTP id g29-v6mr14693980pgm.227.1539585459443; Sun, 14 Oct 2018 23:37:39 -0700 (PDT) Received: from builder (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id d124-v6sm7559018pfa.163.2018.10.14.23.37.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Oct 2018 23:37:38 -0700 (PDT) Date: Sun, 14 Oct 2018 23:40:41 -0700 From: Bjorn Andersson 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 Message-ID: <20181015064040.GT12063@builder> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <89f3d4bbbc484c5fb5d85f03b1325103@SFHDAG7NODE2.st.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Regards, Bjorn