summaryrefslogtreecommitdiff
path: root/drivers/hv/channel_mgmt.c
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2016-02-26 15:13:17 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-01 16:57:20 -0800
commit0f70b66975ce4331e9002b792d5aa6787a110181 (patch)
tree49ad07c536e6fc4e011b4d2cb1e0402b17cab829 /drivers/hv/channel_mgmt.c
parent75ff3a8a9168df750b5bd0589e897a6c0517a9f1 (diff)
Drivers: hv: vmbus: remove code duplication in message handling
We have 3 functions dealing with messages and they all implement the same logic to finalize reads, move it to vmbus_signal_eom(). Suggested-by: Radim Krcmar <rkrcmar@redhat.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Radim Kr.má<rkrcmar@redhat.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/channel_mgmt.c')
-rw-r--r--drivers/hv/channel_mgmt.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index f70e35278b94..73a17be1f340 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -614,15 +614,7 @@ static void vmbus_wait_for_unload(void)
if (hdr->msgtype == CHANNELMSG_UNLOAD_RESPONSE)
unloaded = true;
- msg->header.message_type = HVMSG_NONE;
- /*
- * header.message_type needs to be written before we do
- * wrmsrl() below.
- */
- mb();
-
- if (msg->header.message_flags.msg_pending)
- wrmsrl(HV_X64_MSR_EOM, 0);
+ vmbus_signal_eom(msg);
if (unloaded)
break;