Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp5978313ybf; Thu, 5 Mar 2020 10:38:30 -0800 (PST) X-Google-Smtp-Source: ADFU+vsZDPLLAMw7oeXHPn2MlzQ9nyQWq/yYkITOix+Z1M7jkKNEN8seQjlgwK4yX/MWUFo+ub8/ X-Received: by 2002:aca:524a:: with SMTP id g71mr145169oib.7.1583433509722; Thu, 05 Mar 2020 10:38:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583433509; cv=none; d=google.com; s=arc-20160816; b=JL0wMrLlXpKduQWh4dzOE+UA3eyzb0l8TqwlYJS3kCm7lx2Gap7NO07s56FzqWV9rU kKv9Q3BZDZW1y5KSBV9qCMY4kEYjP1lHqS8T53vT4oCZJHpbcvYkaI6DnhYNzz7V0MDX TWtzBe4k6aFyOsbwOVRYmXZdGI7xjTR94Sc4eNPOW6U5Fc8yBqw6+ffOnqu97kjkv0nn ktxWztgsoM/Nvoq+0crN1JD7suYrxMTNTkQZ66yjTjBEpX12vSlzd1D9zF1h5AxqbACX xBrIJPUHS0Ims/VbGydCtuzWvOVMUoHMDJg+CFwiJZmE9lDta0Frblht5KW75k8/xms8 xiog== 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=mrKnuKdMvP4X7ZBG8bgBLmZOKarwJfZtHOJKCgxv4cY=; b=mp1rkRDrkvzrD4Jl8fe9+DMUYf8wIxylRG5Kg3LRPH9sRrUEB47RmOnOtElxFXDsol t5e3f+R6Ro6VNd1uQc7MJ/GGnxAJ8pC76KoEZSZRhWAEJOS/ZRc0UC1q5yvYVcpJIdte /EW5gcjGesAllYVD6M+xKE1olGZZeeRvX6vfRmfVb9pyvPpkclwGn8WskgUhaETlaWm6 FBWlR6Xa3gvhEsZHocBgB858iixyqw5uWn1i450Dy2l3texrdQazIa71NKYp0bJCDXyL CnM1GjE2BEG/Fm5C0WYnIv68bZNecgAb4FCTy/eqBsYpKTt0B4fTWnnYdsuN8HosOSKx +YMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="OL8/7Nzm"; 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 l21si4111658otk.142.2020.03.05.10.38.18; Thu, 05 Mar 2020 10:38:29 -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="OL8/7Nzm"; 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 S1726004AbgCESgb (ORCPT + 99 others); Thu, 5 Mar 2020 13:36:31 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:46013 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726485AbgCESgb (ORCPT ); Thu, 5 Mar 2020 13:36:31 -0500 Received: by mail-io1-f66.google.com with SMTP id w9so7562092iob.12 for ; Thu, 05 Mar 2020 10:36:31 -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=mrKnuKdMvP4X7ZBG8bgBLmZOKarwJfZtHOJKCgxv4cY=; b=OL8/7Nzmih2KKFE4RC52LQULBl5+wCOilEaFZmRZG4knfnM2uqJmM/TALAQyfEQetB 1VizdjRVZft8JaQ3zu450iaFyYKD30QiObuvgzHcL/s2O3eG0/1G671jWTpnqN6UoqXx wDgPmlpVyGW5uj/zaZxVzRXKTgdl+R8Jml9rhwgX9tNI4bQAoKbpxKa/u6yeg7Z5NLr8 brVXvdVdBkLzAMzYVoLoJ9jrCSkcutvcsXl52bFHdp9k5mGlMmU6mZAFW8GWUt6VkM9+ aSgaUmn1NdTwljsj0s1yltk9VTxezp9AtVYS92rmnZREaO/rD8c3duJPqMJNS8TTKrWD OsQw== 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=mrKnuKdMvP4X7ZBG8bgBLmZOKarwJfZtHOJKCgxv4cY=; b=rsk6qRoF1fNBxnr15X9htiaINzr4fJZQvNPo2xI+RkamFwU0vlumi8BA+THCc5GIFs KZC7Lelxh6ewIL98EHCWnCH/HinOX9zn8k3gFyX2tXwQ7kS0+xxxSumhOQjYIXX0J4Lu b7OOee4lsmU3Ntbgma4kkhjxbLgq9vgGiqfM4d7NJ3LbxivwOHeEbh9KRYE4rvXcHs+f G8KlXzDyj22z2C3Sxn8akae3uHEet1g5Rum+pCZueA5/+Y8HdJ7fLWoSgEMSElKFvg6T uDWUmQdVzJex4JoNxoz1lOpq85z9B5v6lKMIa1lmAAnYuCyB1JnpLX/sJwG+FVQ53PBq PNNA== X-Gm-Message-State: ANhLgQ1sgh9FxUi9gX/+3JC5rDLe0D/iKT3ukS27epJqPJJi/k/S9VP0 q4tYxbQhlt8ZSqHnEjwmcE1ZXyt4WHl9/z2M+o3B3Q== X-Received: by 2002:a05:6638:44a:: with SMTP id r10mr8592498jap.36.1583433390580; Thu, 05 Mar 2020 10:36:30 -0800 (PST) MIME-Version: 1.0 References: <20200304142628.8471-1-NShubin@topcon.com> <264561583429111@sas1-438a02fc058e.qloud-c.yandex.net> <266371583430956@iva3-67f911cb3a01.qloud-c.yandex.net> In-Reply-To: <266371583430956@iva3-67f911cb3a01.qloud-c.yandex.net> From: Mathieu Poirier Date: Thu, 5 Mar 2020 11:36:19 -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 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