Commit 1454f3a3 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Tim Gardner

Drivers: hv: vmbus: Cleanup vmbus_set_event()

BugLink: http://bugs.launchpad.net/bugs/1541585

Cleanup vmbus_set_event() by inlining the hypercall to post
the event and since the return value of vmbus_set_event() is not checked,
make it void. As part of this cleanup, get rid of the function
hv_signal_event() as it is only callled from vmbus_set_event().
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1b807e10)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 8f3b0067
...@@ -482,7 +482,7 @@ int vmbus_post_msg(void *buffer, size_t buflen) ...@@ -482,7 +482,7 @@ int vmbus_post_msg(void *buffer, size_t buflen)
/* /*
* vmbus_set_event - Send an event notification to the parent * vmbus_set_event - Send an event notification to the parent
*/ */
int vmbus_set_event(struct vmbus_channel *channel) void vmbus_set_event(struct vmbus_channel *channel)
{ {
u32 child_relid = channel->offermsg.child_relid; u32 child_relid = channel->offermsg.child_relid;
...@@ -493,5 +493,5 @@ int vmbus_set_event(struct vmbus_channel *channel) ...@@ -493,5 +493,5 @@ int vmbus_set_event(struct vmbus_channel *channel)
(child_relid >> 5)); (child_relid >> 5));
} }
return hv_signal_event(channel->sig_event); hv_do_hypercall(HVCALL_SIGNAL_EVENT, channel->sig_event, NULL);
} }
...@@ -347,22 +347,6 @@ int hv_post_message(union hv_connection_id connection_id, ...@@ -347,22 +347,6 @@ int hv_post_message(union hv_connection_id connection_id,
return status & 0xFFFF; return status & 0xFFFF;
} }
/*
* hv_signal_event -
* Signal an event on the specified connection using the hypervisor event IPC.
*
* This involves a hypercall.
*/
int hv_signal_event(void *con_id)
{
u64 status;
status = hv_do_hypercall(HVCALL_SIGNAL_EVENT, con_id, NULL);
return status & 0xFFFF;
}
static int hv_ce_set_next_event(unsigned long delta, static int hv_ce_set_next_event(unsigned long delta,
struct clock_event_device *evt) struct clock_event_device *evt)
{ {
......
...@@ -502,8 +502,6 @@ extern int hv_post_message(union hv_connection_id connection_id, ...@@ -502,8 +502,6 @@ extern int hv_post_message(union hv_connection_id connection_id,
enum hv_message_type message_type, enum hv_message_type message_type,
void *payload, size_t payload_size); void *payload, size_t payload_size);
extern int hv_signal_event(void *con_id);
extern int hv_synic_alloc(void); extern int hv_synic_alloc(void);
extern void hv_synic_free(void); extern void hv_synic_free(void);
...@@ -651,7 +649,7 @@ void vmbus_disconnect(void); ...@@ -651,7 +649,7 @@ void vmbus_disconnect(void);
int vmbus_post_msg(void *buffer, size_t buflen); int vmbus_post_msg(void *buffer, size_t buflen);
int vmbus_set_event(struct vmbus_channel *channel); void vmbus_set_event(struct vmbus_channel *channel);
void vmbus_on_event(unsigned long data); void vmbus_on_event(unsigned long data);
void vmbus_on_msg_dpc(unsigned long data); void vmbus_on_msg_dpc(unsigned long data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment