Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5952707ybf; Thu, 5 Mar 2020 10:07:54 -0800 (PST) X-Google-Smtp-Source: ADFU+vtvyC7HIH1YR2mzQF5Ra9GP2xaCj19foxSnjI1zJuwQEp6fFwGciuZuzFyhpQNkPq2uIWmk X-Received: by 2002:aca:5757:: with SMTP id l84mr251575oib.56.1583431673985; Thu, 05 Mar 2020 10:07:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583431673; cv=none; d=google.com; s=arc-20160816; b=wOL465ti3fI/bKoKw9kO/FP6B00AFMJ5H3K7EQlbW7tJAGCJIYEefnrkyx8qNepH0V 5u/Kj2IORfK5R4SIsDUWV311VkOfbkNJRPMVztN/CQhQvJA8s1k8+eINXh1pbhnTNW05 dx1rtXaDFgo9tAGur8QK5B9PErYAtfrV8wsYul5J5S/pVaHkDDI7hyj/OFhLLcRBr7Sr Y/GjPcZE7J2Vz0Yq3QTCbH0WIEsXm/j4kQKURrvbYVF8dFAG68c0pOoICLtEolnNQrm0 vLeNo3XTZAfQ9ZIvtCa8Rurcg1JiVr6STGxLtqcJEM3lik20ALzkmwTh4LUWg0+4Pdnd /7xg== 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=eXX4BqM/CvX5qZBMKAWZEGZsO8H/7S65R5d35irFfrI=; b=aEydIOxcoPMY0TzHuV+BQWjawiyq1LDbuJy3sS+b64KnYhrajevaUJ70yy/kbftJDc jlCN7QmhSQeq1iIbJStOuw3n4p+SHLly3MLB3Itu4HSMG6HIvCInP7FMzANIb2GZc7Nt gE79DNrivj9D+0fpd+Q2LF2hRuegS9pjHVsqmtI0ESybt7lkwW5ZKK0UU6wiuLC99LPt QuIMac4aDaGc5x47ay/+FgTSwvRpp/lRQPd+ZAo/ibntY6z4NLYUuD3qFe4YZ1pz7WgZ e0huvmYjwzdyH7czh6qOwyKsdcmlNqd1KbpDZUDsXoz8aFDp6LkgSz4QM4GnmZWgvFAU aSiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=SnnfKIzv; 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 d20si3830057otq.157.2020.03.05.10.07.39; Thu, 05 Mar 2020 10:07:53 -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=SnnfKIzv; 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 S1726142AbgCESHU (ORCPT + 99 others); Thu, 5 Mar 2020 13:07:20 -0500 Received: from forward501j.mail.yandex.net ([5.45.198.251]:46229 "EHLO forward501j.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbgCESHU (ORCPT ); Thu, 5 Mar 2020 13:07:20 -0500 Received: from mxback2q.mail.yandex.net (mxback2q.mail.yandex.net [IPv6:2a02:6b8:c0e:40:0:640:9c8c:4946]) by forward501j.mail.yandex.net (Yandex) with ESMTP id 763103380647; Thu, 5 Mar 2020 21:07:12 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback2q.mail.yandex.net (mxback/Yandex) with ESMTP id 3bp9zgIweA-7AFW3X28; Thu, 05 Mar 2020 21:07:11 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1583431631; bh=eXX4BqM/CvX5qZBMKAWZEGZsO8H/7S65R5d35irFfrI=; h=Message-Id:Cc:Subject:In-Reply-To:Date:References:To:From; b=SnnfKIzvEKLQ4z783HCIgp4acV43C9uZPpcdonvnd4WLPwNb7+ru/vj+yXPUPBmd9 oyxcfcAx5SOcDcTrlTdsoE5plCk2hmuLlO0jcNLkPggpnPsno8fNmZD6ZoQX+DCG3W J5DbDJCyLinvWna6/ebPnXNWDpkG0YpM2/txfzug= Authentication-Results: mxback2q.mail.yandex.net; dkim=pass header.i=@maquefel.me Received: by vla1-422f52264539.qloud-c.yandex.net with HTTP; Thu, 05 Mar 2020 21:07:10 +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> 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:07:10 +0300 Message-Id: <266371583430956@iva3-67f911cb3a01.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 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. > > 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