Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5941588ybf; Thu, 5 Mar 2020 09:55:47 -0800 (PST) X-Google-Smtp-Source: ADFU+vv/pBa/+lDm7nQMTvaAKPv3rSbNjXBBD94jcZ9yt400ktqtrcAmwiaeevc57tJFRgUldkGM X-Received: by 2002:a05:6830:2102:: with SMTP id i2mr7434721otc.123.1583430947763; Thu, 05 Mar 2020 09:55:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583430947; cv=none; d=google.com; s=arc-20160816; b=BxZDfyo4ryKWKY13DjPCPd33rYPHlLA4s31KPOEQM/ggoaR4eHb8xU9h5xNG48rKCX iiB8KhIzhs6C3drUDfBYFN+ymeI4tN3gUvbImHavSF9S6B0BRVvFiphqleQmcwUCzLDx xPc98O5lSBw7Lu2h675rzlFAHk36aNbErjQC9QEEiWWxRdOHx0PQgGReLI4D6UxXWAx+ 6rsiDV18WZDpuy7EfKNH/91G4H3+4vrvJanPuOCMUEk8wUtpgPNX48pgzJ9JoIkFinxA 4CVhh/yVSak5Xm9RXDaWiFXAScbX7VTYUsl0cnB/ZNxGIq4XrNVz5BGd/6r5OHGSuf2s mVyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=nWP6NJ5Ufnl/Qfwtyeq+O8joFfs1L0Y4YDlGJGw2HAo=; b=lVgIdlde10Ie70EChzNVKaR3qUtPCAo+ji+HYiEAM5XiFVXklBzFaz21f73YfOJIj5 Nqs0/OKPQ4OdXIuIK59jCoqbLDO3qmeUQmVDTlqaiGl2sKE52iVvthmuEqBbhNRflcl4 3yoNilNrXu51kefOCSbhbGYWKKQ9G/CQ2srgaVGbrZHDqnLql9H2GIYf0l+AFknv+Oxo SUufCeO3D8AwRTGs2nIiiNLXTanO7dnFk3DG/EhuJ9u6HstcVuYJhSP5idIw+nP3yV14 BnoOVOXjwPabOf8Aiftb6oZVQTrMXy51umGfIA8t4hxmJpqDsFiPLse4yX/VW0JbaVWi r5xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z7S+oDI+; 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 s28si135228otd.65.2020.03.05.09.55.35; Thu, 05 Mar 2020 09:55:47 -0800 (PST) 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=z7S+oDI+; 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 S1726145AbgCERye (ORCPT + 99 others); Thu, 5 Mar 2020 12:54:34 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:42222 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgCERye (ORCPT ); Thu, 5 Mar 2020 12:54:34 -0500 Received: by mail-io1-f68.google.com with SMTP id q128so7439572iof.9 for ; Thu, 05 Mar 2020 09:54:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nWP6NJ5Ufnl/Qfwtyeq+O8joFfs1L0Y4YDlGJGw2HAo=; b=z7S+oDI+x6CnRYCgv92/5OnTRsGdpp+y0t3e9oT0oJ/0BeDDJdVS9juXISjgw851gm GGacPtojUoWQbfZ52pcikVXqGlB2VRO/fKMhYQTD8oWTTfFPhtb7xXXB8WyHznS25jWy yv5oCb7CwJ2XoT8GMacjXi0cAGkhZcb9cTYw/3X1/hGYOqcsuYzvjWFQ1S4SeyEKuFNY CmWwSw8emOAuD0yxmqR0DmUIiwjPHTaIGm+1dZ80F28Qj0ckaLydGJE+vDGd851gonG/ 49t7i6mWE2mtVf06RGJAShRIKbpdzNzU3lEdkNO+AyffD2WWiKWcd7ww865xl7BcwvBL xIRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nWP6NJ5Ufnl/Qfwtyeq+O8joFfs1L0Y4YDlGJGw2HAo=; b=N9fzekCDSIVnbtspZIrwisLbKI9sagMGCJfuSHSXR1hOG+mhvxXQZs+9uAvItEt6mA 0o+m7wmSciE4df4vXUeNPvrwYX5nd02sqdsT7u3pqS6MxN8WevitZfyF+jy0sMBmVf9k bHc5d7UKPfA7B/3C68L1dxwHlUr4qNtB9r9qmDaxKMGT2VO+8Eh5wcix/3kWaQwkAgDj ydWdHQh2jXyIXc3yoUd54QMKHjYFQwvzFHx8WCoeZIJeJeEMqG1CTX6RKrhd4eVme+t/ z7fpgRzjpQnzJTiIca0svJucVK6t2R67Lf0otZDirF6a2u4oFisTpwE8hr3EqFkaQCi+ wY5Q== X-Gm-Message-State: ANhLgQ0OIRSK3MgOIdTf4ouIxyM+OVzFUfQnf58U3kqtzgdxR6Q3nlch mUwfvKFIEBQGJt2RHT8v+K7o/4KI5zTKVpjhlitlYg== X-Received: by 2002:a05:6638:44a:: with SMTP id r10mr8443557jap.36.1583430873469; Thu, 05 Mar 2020 09:54:33 -0800 (PST) MIME-Version: 1.0 References: <20200304142628.8471-1-NShubin@topcon.com> <264561583429111@sas1-438a02fc058e.qloud-c.yandex.net> In-Reply-To: <264561583429111@sas1-438a02fc058e.qloud-c.yandex.net> From: Mathieu Poirier Date: Thu, 5 Mar 2020 10:54:22 -0700 Message-ID: Subject: Re: [PATCH 1/2] remoteproc: imx_rproc: dummy kick method To: nikita.shubin@maquefel.me Cc: Nikita Shubin , Ohad Ben-Cohen , Bjorn Andersson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-remoteproc , linux-arm-kernel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 5 Mar 2020 at 10:29, wrote: > > > > 05.03.2020, 19:17, "Mathieu Poirier" : > > On Wed, 4 Mar 2020 at 07:25, Nikita Shubin wrote: > >> add kick method that does nothing, to avoid errors in rproc_virtio_notify. > >> > >> Signed-off-by: Nikita Shubin > >> --- > >> drivers/remoteproc/imx_rproc.c | 6 ++++++ > >> 1 file changed, 6 insertions(+) > >> > >> diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c > >> index 3e72b6f38d4b..796b6b86550a 100644 > >> --- a/drivers/remoteproc/imx_rproc.c > >> +++ b/drivers/remoteproc/imx_rproc.c > >> @@ -240,9 +240,15 @@ static void *imx_rproc_da_to_va(struct rproc *rproc, u64 da, int len) > >> return va; > >> } > >> > >> +static void imx_rproc_kick(struct rproc *rproc, int vqid) > >> +{ > >> + > >> +} > >> + > > > > If rproc::kick() is empty, how does the MCU know there is packets to > > fetch in the virtio queues? > > Well, of course it doesn't i understand this perfectly - just following documentation citing: > > | Every remoteproc implementation should at least provide the ->start and ->stop > | handlers. If rpmsg/virtio functionality is also desired, then the ->kick handler > | should be provided as well. > > But i as i mentioned in "remoteproc: Fix NULL pointer dereference in rproc_virtio_notify" kick method will be called if > "resource_table exists in firmware and has "Virtio device entry" defined" anyway, the imx_rproc is not in control of what > exactly it is booting, so such situation can occur. If I understand correctly, the MCU can boot images that have a virtio device in its resource table and still do useful work even if the virtio device/rpmsg bus can't be setup - is this correct? Thanks, Mathieu > > > > >> static const struct rproc_ops imx_rproc_ops = { > >> .start = imx_rproc_start, > >> .stop = imx_rproc_stop, > >> + .kick = imx_rproc_kick, > >> .da_to_va = imx_rproc_da_to_va, > >> }; > >> > >> -- > >> 2.24.1