Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5922201ybf; Thu, 5 Mar 2020 09:31:35 -0800 (PST) X-Google-Smtp-Source: ADFU+vsjXTzZsFd+0OsTtWPQD508iwSTTwmdG6jS5B9V1r/JvEh+E+5JN008VCYwoK9iQ/ArtgSC X-Received: by 2002:a05:6808:2c4:: with SMTP id a4mr119302oid.176.1583429495403; Thu, 05 Mar 2020 09:31:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583429495; cv=none; d=google.com; s=arc-20160816; b=E1PZ/gZaVFCWbfqxBwfkgdXDgyHvbFE0yxquu2HxDTDhhwjerYw2ILZUxtPzJucQjK 0fcorOwZg2fvfZ2nbucVoj7YLs9uTXX12m1Dzx5Mmszu5zCx1tqGyorpTyGSNrDncga7 orsI1QWIe2DYRLIQXfWn7vxgAUwxciC+0OKI+O7cPqQxlrNUgBYpsOAevBp1Vl9EoNh+ dBSLM0PUZwFQ2CIbDb9VdgkAuX4mss6SH2/BWid1Tgtk28mzCiGCk+ccaYx0pLuqvmSi BhaQvhP7/Iy6pARGAs8Kuum+A1xwuEZWFAbXHGQzb2eAIfltX3bK8dYcMmbe6vJUNnLW JiXQ== 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=bzehxGVvj/LyLAppmVIllXOgGQfOzRvhMGVzevTZoaY=; b=R9A/NkRXks6/YMxMcDZSKM3QN8ln7MxC/l4NjRPN+6EA/bPBPgi88aRt6i8eRFZiUa ZW/q2/l9wp1Kg78V3eJUMV02aZviHe27Q486Ks2Nozav+czkr5ih9pkHz2TCXvNf4/q+ BZDm+c90gg54iqjxA1f4Lt7HYrXimC1U1anB42U74hw5okil9So3e9A6PDmxZC3rg8qS knEvKNY9Ib/PrPYmH7kKhdKcw9Rym1Qw0Af5aFw1SY7Brmab16sWJT9zx18e5UsiG4Ih 53LtsE1iTz6aXtsrXdjjFAV9Ku0ZDsBafdxiMETO1Gg05YC0Mo360FEfqKHs98aieba6 rkgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maquefel.me header.s=mail header.b=dz5+1NfK; 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 i66si3886842oib.237.2020.03.05.09.31.23; Thu, 05 Mar 2020 09:31:35 -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=dz5+1NfK; 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 S1726956AbgCER3z (ORCPT + 99 others); Thu, 5 Mar 2020 12:29:55 -0500 Received: from forward501j.mail.yandex.net ([5.45.198.251]:51114 "EHLO forward501j.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbgCER3z (ORCPT ); Thu, 5 Mar 2020 12:29:55 -0500 Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward501j.mail.yandex.net (Yandex) with ESMTP id 47FD13380051; Thu, 5 Mar 2020 20:29:52 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback3g.mail.yandex.net (mxback/Yandex) with ESMTP id MSMUb1R6XH-To1Kctjv; Thu, 05 Mar 2020 20:29:51 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1583429391; bh=bzehxGVvj/LyLAppmVIllXOgGQfOzRvhMGVzevTZoaY=; h=Message-Id:Cc:Subject:In-Reply-To:Date:References:To:From; b=dz5+1NfKzDi9mR+LNugi6IsIemk1dqfOLKIx1P3mYRMOdyoDld2YKstHLEjOrU1NZ QjfNzxNJH19/4M8voas1Xu9axKNUuC052zkURdyxi2+NO15r09XicBWn+K2xnhJTMA dsVnQcdEPN/DSfjciOA2w0gv77o/aWK9kqj0xOTw= Authentication-Results: mxback3g.mail.yandex.net; dkim=pass header.i=@maquefel.me Received: by sas8-b090c2642e35.qloud-c.yandex.net with HTTP; Thu, 05 Mar 2020 20:29:50 +0300 From: nikita.shubin@maquefel.me To: Mathieu Poirier , Nikita Shubin Cc: 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> 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 20:29:50 +0300 Message-Id: <264561583429111@sas1-438a02fc058e.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, 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. > >>   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