summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2016-01-28 09:29:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-08 08:34:12 +0300
commitfe760e4d64fe5c17c39e86c410d41f6587ee88bc (patch)
treee25710bde0e1e4da9a127a3e6c449c08696c1940 /include/linux
parent3eba9a77d5fc2cee486a16fff435686f024f61cf (diff)
downloadlinux-fe760e4d64fe5c17c39e86c410d41f6587ee88bc.tar.xz
Drivers: hv: vmbus: Give control over how the ring access is serialized
On the channel send side, many of the VMBUS device drivers explicity serialize access to the outgoing ring buffer. Give more control to the VMBUS device drivers in terms how to serialize accesss to the outgoing ring buffer. The default behavior will be to aquire the ring lock to preserve the current behavior. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hyperv.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index c056f058dcf8..d23dab0d770b 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -811,8 +811,24 @@ struct vmbus_channel {
* signaling control.
*/
enum hv_signal_policy signal_policy;
+ /*
+ * On the channel send side, many of the VMBUS
+ * device drivers explicity serialize access to the
+ * outgoing ring buffer. Give more control to the
+ * VMBUS device drivers in terms how to serialize
+ * accesss to the outgoing ring buffer.
+ * The default behavior will be to aquire the
+ * ring lock to preserve the current behavior.
+ */
+ bool acquire_ring_lock;
+
};
+static inline void set_channel_lock_state(struct vmbus_channel *c, bool state)
+{
+ c->acquire_ring_lock = state;
+}
+
static inline bool is_hvsock_channel(const struct vmbus_channel *c)
{
return !!(c->offermsg.offer.chn_flags &