summaryrefslogtreecommitdiffstats
path: root/drivers/hv/hyperv_vmbus.h
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2015-04-11 18:07:41 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-24 12:17:40 -0700
commit8efe78fdb1490e271615fab32433ebc0f15fa822 (patch)
treeb79870002b11d1b41a72b5bb98282f88a89d786e /drivers/hv/hyperv_vmbus.h
parent5fa97480b9b125bb9bdb446930289b3274ed7eb7 (diff)
downloadop-kernel-dev-8efe78fdb1490e271615fab32433ebc0f15fa822.zip
op-kernel-dev-8efe78fdb1490e271615fab32433ebc0f15fa822.tar.gz
Drivers: hv: kvp: move poll_channel() to hyperv_vmbus.h
Move poll_channel() to hyperv_vmbus.h and make it inline and rename it to hv_poll_channel() so it can be reused in other hv_util modules. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Tested-by: Alex Ng <alexng@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hyperv_vmbus.h')
-rw-r--r--drivers/hv/hyperv_vmbus.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index ddcf6c4..2f30456 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -742,5 +742,17 @@ int hv_fcopy_init(struct hv_util_service *);
void hv_fcopy_deinit(void);
void hv_fcopy_onchannelcallback(void *);
+static inline void hv_poll_channel(struct vmbus_channel *channel,
+ void (*cb)(void *))
+{
+ if (!channel)
+ return;
+
+ if (channel->target_cpu != smp_processor_id())
+ smp_call_function_single(channel->target_cpu,
+ cb, channel, true);
+ else
+ cb(channel);
+}
#endif /* _HYPERV_VMBUS_H */
OpenPOWER on IntegriCloud