lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 24 Mar 2017 12:22:29 -0700
From:   Wendy Liang <wendy.liang@...inx.com>
To:     <bjorn.andersson@...aro.org>
CC:     <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "Wendy Liang" <wendy.liang@...inx.com>,
        Wendy Liang <jliang@...inx.com>,
        Michal Simek <michal.simek@...inx.com>
Subject: [RFC LINUX PATCH 13/19] remoteproc: add config_wait_complete to rproc_vdev

From: Wendy Liang <wendy.liang@...inx.com>

Add config_wait_complete to rproc_vdev.
This attribute is used for vdev config operation to
wait for the remote to respond. When there is a
notification comes from the remote, it can wake up
the waiting client by marking this attribute.

Signed-off-by: Wendy Liang <jliang@...inx.com>
Signed-off-by: Michal Simek <michal.simek@...inx.com>
---
 drivers/remoteproc/remoteproc_virtio.c | 1 +
 include/linux/remoteproc.h             | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
index e45e17b..c6f7ca4 100644
--- a/drivers/remoteproc/remoteproc_virtio.c
+++ b/drivers/remoteproc/remoteproc_virtio.c
@@ -340,6 +340,7 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id)
 	vdev->dev.parent = dev;
 	vdev->dev.release = rproc_virtio_dev_release;
 
+	init_completion(&rvdev->config_wait_complete);
 	/*
 	 * We're indirectly making a non-temporary copy of the rproc pointer
 	 * here, because drivers probed with this vdev will indirectly
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 303210b..4ce7579 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -534,6 +534,7 @@ struct rproc_vring {
  * @vdev: the virio device
  * @vring: the vrings for this vdev
  * @rsc_offset: offset of the vdev's resource entry
+ * @config_wait_complete: mark asynchronous vdev config wait complete
  */
 struct rproc_vdev {
 	struct kref refcount;
@@ -546,6 +547,7 @@ struct rproc_vdev {
 	struct virtio_device vdev;
 	struct rproc_vring vring[RVDEV_NUM_VRINGS];
 	u32 rsc_offset;
+	struct completion config_wait_complete;
 };
 
 struct rproc *rproc_get_by_phandle(phandle phandle);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ