summaryrefslogtreecommitdiff
path: root/drivers/hv
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-08 16:33:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-08 16:33:21 +0300
commitba1cb318dcbfc9754acda9656262aea97ebe77e6 (patch)
tree770fadb8b2c77da5d4dd9d33535b2d7adcdb02fd /drivers/hv
parent8f523d6db7ed69f69720267af170c0719023f373 (diff)
parent0238df646e6224016a45505d2c111a24669ebe21 (diff)
downloadlinux-ba1cb318dcbfc9754acda9656262aea97ebe77e6.tar.xz
Merge 4.19-rc7 into char-misc-next
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
-rw-r--r--drivers/hv/connection.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index ced041899456..f4d08c8ac7f8 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -76,6 +76,7 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
__u32 version)
{
int ret = 0;
+ unsigned int cur_cpu;
struct vmbus_channel_initiate_contact *msg;
unsigned long flags;
@@ -118,9 +119,10 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
* the CPU attempting to connect may not be CPU 0.
*/
if (version >= VERSION_WIN8_1) {
- msg->target_vcpu =
- hv_cpu_number_to_vp_number(smp_processor_id());
- vmbus_connection.connect_cpu = smp_processor_id();
+ cur_cpu = get_cpu();
+ msg->target_vcpu = hv_cpu_number_to_vp_number(cur_cpu);
+ vmbus_connection.connect_cpu = cur_cpu;
+ put_cpu();
} else {
msg->target_vcpu = 0;
vmbus_connection.connect_cpu = 0;