diff options
Diffstat (limited to 'drivers/hv/hyperv_vmbus.h')
-rw-r--r-- | drivers/hv/hyperv_vmbus.h | 12 |
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 */ |