linux-remoteproc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: nikita.shubin@maquefel.me
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
	Nikita Shubin <nshubin@topcon.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-remoteproc <linux-remoteproc@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] remoteproc: imx_rproc: dummy kick method
Date: Thu, 05 Mar 2020 20:29:50 +0300	[thread overview]
Message-ID: <264561583429111@sas1-438a02fc058e.qloud-c.yandex.net> (raw)
In-Reply-To: <CANLsYkzPROdphvmtpZ6YiajZ2dYLrojC-rGYkq4jK2yzTnAJ5A@mail.gmail.com>



05.03.2020, 19:17, "Mathieu Poirier" <mathieu.poirier@linaro.org>:
> On Wed, 4 Mar 2020 at 07:25, Nikita Shubin <NShubin@topcon.com> wrote:
>>  add kick method that does nothing, to avoid errors in rproc_virtio_notify.
>>
>>  Signed-off-by: Nikita Shubin <NShubin@topcon.com>
>>  ---
>>   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

  reply	other threads:[~2020-03-05 17:29 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04 14:26 [PATCH 1/2] remoteproc: imx_rproc: dummy kick method Nikita Shubin
2020-03-04 14:26 ` [PATCH 2/2] remoteproc: imx_rproc: set pc on start Nikita Shubin
2020-03-05 16:16 ` [PATCH 1/2] remoteproc: imx_rproc: dummy kick method Mathieu Poirier
2020-03-05 17:29   ` nikita.shubin [this message]
2020-03-05 17:54     ` Mathieu Poirier
2020-03-05 18:07       ` nikita.shubin
2020-03-05 18:36         ` Mathieu Poirier
2020-03-05 18:46           ` nikita.shubin
2020-04-06 11:33 ` [PATCH v2 0/3] remoteproc: imx_rproc: add virtio support nikita.shubin
2020-04-06 11:33   ` nikita.shubin
2020-04-06 11:33   ` [PATCH v2 1/3] remoteproc: imx_rproc: set pc on start nikita.shubin
2020-04-06 11:33     ` nikita.shubin
2020-04-14 16:45     ` Mathieu Poirier
2020-04-14 16:45       ` Mathieu Poirier
2020-04-17  5:40       ` nikita.shubin
2020-04-17 17:01         ` Mathieu Poirier
2020-04-17 17:01           ` Mathieu Poirier
2020-04-17 17:26           ` Nikita Shubin
2020-04-17 17:26             ` Nikita Shubin
2020-04-17 22:24             ` Mathieu Poirier
2020-04-17 22:24               ` Mathieu Poirier
2020-04-22  7:35               ` Nikita Shubin
2020-04-22  7:35                 ` Nikita Shubin
2020-04-17 12:11       ` Nikita Shubin
2020-04-17 12:11         ` Nikita Shubin
2020-04-17 15:37         ` Mathieu Poirier
2020-04-17 15:37           ` Mathieu Poirier
2020-04-17 15:46           ` Nikita Shubin
2020-04-17 15:46             ` Nikita Shubin
2020-04-06 11:33   ` [PATCH v2 2/3] remoteproc: imx_rproc: mailbox support nikita.shubin
2020-04-06 11:33     ` nikita.shubin
2020-04-07  1:07     ` kbuild test robot
2020-04-07  1:07       ` kbuild test robot
2020-04-14 17:20     ` Mathieu Poirier
2020-04-14 17:20       ` Mathieu Poirier
2020-04-17  8:37       ` Nikita Shubin
2020-04-17  8:37         ` Nikita Shubin
2020-04-17 16:02         ` Mathieu Poirier
2020-04-17 16:02           ` Mathieu Poirier
2020-04-14 17:36     ` Mathieu Poirier
2020-04-14 17:36       ` Mathieu Poirier
2020-04-06 11:33   ` [PATCH v2 3/3] remoteproc: imx_rproc: memory regions nikita.shubin
2020-04-06 11:33     ` nikita.shubin
2020-04-14 17:46     ` Mathieu Poirier
2020-04-14 17:46       ` Mathieu Poirier
2020-04-15  2:42   ` [PATCH v2 0/3] remoteproc: imx_rproc: add virtio support Peng Fan
2020-04-15  2:42     ` Peng Fan
2020-04-15 16:26     ` Mathieu Poirier
2020-04-15 16:26       ` Mathieu Poirier
2020-04-17  8:57     ` Nikita Shubin
2020-04-17  8:57       ` Nikita Shubin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=264561583429111@sas1-438a02fc058e.qloud-c.yandex.net \
    --to=nikita.shubin@maquefel.me \
    --cc=bjorn.andersson@linaro.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=nshubin@topcon.com \
    --cc=ohad@wizery.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).