Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5986507ybf; Thu, 5 Mar 2020 10:48:18 -0800 (PST) X-Google-Smtp-Source: ADFU+vubKngclqrnXYZ4pMy5/OVLp5YBCWu7+sGlYtMCQz36WkeQAKvJxjer9ZCPjtOgY3mNb55v X-Received: by 2002:a05:6808:9a5:: with SMTP id e5mr336942oig.168.1583434098359; Thu, 05 Mar 2020 10:48:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583434098; cv=none; d=google.com; s=arc-20160816; b=PCAn9Tu3OqbJTyxxWMKD1UnF0Tf/08RJwmVcwoz5fImrxi2vgcDlo4HqdbeBtodDGQ 2X+kfDcXUa+XA0Bsp+oUfqWCjj50tJ6NXbNZ+s0/SPkCBtF/6y57Y9f4MCHvPMpYLvUF 7HnCmSnGq4F/CAUyr4MyIl84jkr/zvi25LLbjiFQ6+GCQkOJkK4f8046Rk6bc3A8orFd i1oi3319cEKAtMs0UoarM+pAGreVc6UlyIn+og3xGtpPleYlqkHKvvj8isZRzm4Pj/oX MC84jLSINs8x36XkJbHNZbA1wFgOxgO82FIMRrsgJEtCERzvPVmfhA5UVu5AJwYWgVMj gmsg== 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:message-id:date :mime-version:subject:references:in-reply-to:cc:to:from :dkim-signature; bh=WbDDv6qYTqWmJsP3qfohS0aAr3PAr4lOdDNrBRZ/zy8=; b=uN5leuFnKrM4o5mSls14ShRZUl2i4VvxNajWygd+01LgdRjYvanUSU+ydk9YPC82P2 Nfbc4FJBxFyxfja9rP6rvoYYq5TVR9afxjwvdBSzUODpsvLchN5fdcrjPhhS+ehd77mM NDpYRVemvjqAExsP7WOB1Uonk/F1KwFIPhQ0AbZRLkB42CdX16Cc4upeu0MMKwOHyfLY reUpHC6+qjzQ/D7hOaBfSzYl5bD1WaqZ1zx68Jegp0oyyQrI0+st6okNyI867fH9gs9v j7NxDo53WJogGUMgJIXBYyleIfHuTcw+kd7JpByS+WlMWsBJEeuvdb+NUNc6IRmqqv4o vkJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=ipHhDMSs; 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 w202si3589256oia.157.2020.03.05.10.48.06; Thu, 05 Mar 2020 10:48:18 -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=@maquefel.me header.s=mail header.b=ipHhDMSs; 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 S1726092AbgCESqe (ORCPT + 99 others); Thu, 5 Mar 2020 13:46:34 -0500 Received: from forward501p.mail.yandex.net ([77.88.28.111]:45698 "EHLO forward501p.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbgCESqe (ORCPT ); Thu, 5 Mar 2020 13:46:34 -0500 Received: from mxback30g.mail.yandex.net (mxback30g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:330]) by forward501p.mail.yandex.net (Yandex) with ESMTP id E27733500531; Thu, 5 Mar 2020 21:46:27 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback30g.mail.yandex.net (mxback/Yandex) with ESMTP id iGuMvhqZaa-kQYi1aoQ; Thu, 05 Mar 2020 21:46:27 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1583433987; bh=WbDDv6qYTqWmJsP3qfohS0aAr3PAr4lOdDNrBRZ/zy8=; h=Message-Id:Cc:Subject:In-Reply-To:Date:References:To:From; b=ipHhDMSs/4/WhzPQcS4NsH6Fqom/ChEWJK8QdMv5iXS+oV6rBy30120HjwOyBNt5t mUAmwqLxUU5qvsdfQ4GCFVpREBaLoKGLT1NvHO99TNyNdhFzax2k4JT+gbUd9e21cK Mn581akDZSmN+GZfCnzfca8SnNumZTpfYVGVEi14= Authentication-Results: mxback30g.mail.yandex.net; dkim=pass header.i=@maquefel.me Received: by myt3-605d5ea4bc20.qloud-c.yandex.net with HTTP; Thu, 05 Mar 2020 21:46:26 +0300 From: nikita.shubin@maquefel.me To: Mathieu Poirier 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 In-Reply-To: References: <20200304142628.8471-1-NShubin@topcon.com> <264561583429111@sas1-438a02fc058e.qloud-c.yandex.net> <266371583430956@iva3-67f911cb3a01.qloud-c.yandex.net> Subject: Re: [PATCH 1/2] remoteproc: imx_rproc: dummy kick method MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 05 Mar 2020 21:46:26 +0300 Message-Id: <272401583433950@myt4-c14277df27e9.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit 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 That's totally okay - thank you for review. 05.03.2020, 21:36, "Mathieu Poirier" : > On Thu, 5 Mar 2020 at 11:07, wrote: >>  05.03.2020, 20:54, "Mathieu Poirier" : >>  > 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? >> >>  Yes, this assumption is correct. >> >>  Despite this situation is not i desire at all - such thing can happen. >>  I am currently using co-proc as a realtime part of UGV control, >>  so it must immediately stop the engines, if not provided with navigational information. >> >>  The imx7d MCU have access to the most periphery that have the main processor. >> >>  Of course the kick method should do real work, but i decided to submit step by step if i am allowed to do so. > > Ok, the situation is clearer now and I have put your patches back in > my queue. I am seriously back-logged at this time so it will take a > little while before I get to them. > >>  > >>  > 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