diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-08 15:43:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-08 15:43:12 +0200 |
commit | 4e1a606d552de03aec2b1fd157011bf012fcc870 (patch) | |
tree | 7d7683fc2d5286a36782df572f475abb3bb2e173 /drivers/hv/connection.c | |
parent | TTY: sn_console: Replace spin_is_locked() with spin_trylock() (diff) | |
parent | Linux 4.19-rc7 (diff) | |
download | linux-4e1a606d552de03aec2b1fd157011bf012fcc870.tar.xz linux-4e1a606d552de03aec2b1fd157011bf012fcc870.zip |
Merge 4.19-rc7 into tty-next
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 8 |
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; |