linux-remoteproc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rishabh Bhatnagar <rishabhb@codeaurora.org>
To: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: bjorn.andersson@linaro.org, mathieu.poirier@linaro.org,
	ohad@wizery.com, tsoni@codeaurora.org, psodagud@codeaurora.org,
	sidgup@codeaurora.org,
	Rishabh Bhatnagar <rishabhb@codeaurora.org>
Subject: [PATCH v3 0/2] Add character device interface to remoteproc
Date: Tue, 21 Apr 2020 11:10:16 -0700	[thread overview]
Message-ID: <1587492618-15896-1-git-send-email-rishabhb@codeaurora.org> (raw)
Message-ID: <20200421181016.H9Q6biPdLAqPJHbtiNyBazi69SBkvP210ckc4bg4-X8@z> (raw)

This patch series adds a character device interface to remoteproc
framework. Currently there is only a sysfs interface which the userspace
clients can use. If a usersapce application crashes after booting
the remote processor through the sysfs interface the remote processor
does not get any indication about the crash. It might still assume
that the  application is running.
For example modem uses remotefs service to data from disk/flash memory.
If the remotefs service crashes, modem still keeps on requesting data
which might lead to crash on modem. Even if the service is restarted the
file handles modem requested previously would become stale.
Adding a character device interface makes the remote processor tightly
coupled with the user space application. A crash of the application
leads to a close on the file descriptors therefore shutting down the
remoteproc.

Changelog:

v2 -> v3:
- Move booting of remoteproc from open to a write call.
- Add ioctl interface for future functionality extension.
- Add an ioctl call to default to rproc shutdown on release.

v2 -> v1:
- Fixed comments from Bjorn and Matthew.

Rishabh Bhatnagar (2):
  remoteproc: Add remoteproc character device interface
  remoteproc: core: Register the character device interface

 Documentation/userspace-api/ioctl/ioctl-number.rst |   1 +
 drivers/remoteproc/Kconfig                         |   9 ++
 drivers/remoteproc/Makefile                        |   1 +
 drivers/remoteproc/remoteproc_cdev.c               | 142 +++++++++++++++++++++
 drivers/remoteproc/remoteproc_core.c               |  10 ++
 drivers/remoteproc/remoteproc_internal.h           |  21 +++
 include/linux/remoteproc.h                         |   3 +
 include/uapi/linux/remoteproc_cdev.h               |  21 +++
 8 files changed, 208 insertions(+)
 create mode 100644 drivers/remoteproc/remoteproc_cdev.c
 create mode 100644 include/uapi/linux/remoteproc_cdev.h

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

             reply	other threads:[~2020-04-21 18:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 18:10 Rishabh Bhatnagar [this message]
2020-04-21 18:10 ` [PATCH v3 0/2] Add character device interface to remoteproc Rishabh Bhatnagar
2020-04-21 18:10 ` [PATCH v3 1/2] remoteproc: Add remoteproc character device interface Rishabh Bhatnagar
2020-04-21 18:10   ` Rishabh Bhatnagar
2020-04-29 23:09   ` Mathieu Poirier
2020-04-30  8:30   ` Arnaud POULIQUEN
2020-04-30 16:44     ` Mathieu Poirier
2020-06-16 19:56     ` rishabhb
2020-06-17  8:44       ` Arnaud POULIQUEN
2020-06-30  5:38         ` Siddharth Gupta
2020-06-30  7:43           ` Arnaud POULIQUEN
2020-06-30 22:02             ` Siddharth Gupta
2020-07-01 12:13               ` Arnaud POULIQUEN
2020-07-01 18:53                 ` Bjorn Andersson
2020-07-01  4:38             ` Bjorn Andersson
2020-04-21 18:10 ` [PATCH v3 2/2] remoteproc: core: Register the " Rishabh Bhatnagar
2020-04-21 18:10   ` Rishabh Bhatnagar

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=1587492618-15896-1-git-send-email-rishabhb@codeaurora.org \
    --to=rishabhb@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=ohad@wizery.com \
    --cc=psodagud@codeaurora.org \
    --cc=sidgup@codeaurora.org \
    --cc=tsoni@codeaurora.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).