diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2016-02-27 00:13:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-02 01:57:20 +0100 |
commit | 0f70b66975ce4331e9002b792d5aa6787a110181 (patch) | |
tree | 49ad07c536e6fc4e011b4d2cb1e0402b17cab829 /drivers/hv/channel_mgmt.c | |
parent | Drivers: hv: vmbus: avoid wait_for_completion() on crash (diff) | |
download | linux-0f70b66975ce4331e9002b792d5aa6787a110181.tar.xz linux-0f70b66975ce4331e9002b792d5aa6787a110181.zip |
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.c | 10 |
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; |