diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2014-12-15 02:34:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-12 08:04:10 -0500 |
commit | 87712bf81dd092821c406ea3fb47a07222484a64 (patch) | |
tree | 9c88e241ed4b2b9ce37925cd58773db3827b3974 /drivers/hv/connection.c | |
parent | ca04455fba937eb2d85f437900cd1726166192e6 (diff) |
Drivers: hv: vmbus: Use get_cpu() to get the current CPU
Replace calls for smp_processor_id() to get_cpu() to get the CPU ID of
the current CPU. In these instances, there is no correctness issue with
regards to preemption, we just need the current CPU ID.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index e206619b946e..a63a795300b9 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c | |||
@@ -80,8 +80,10 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, | |||
80 | msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); | 80 | msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); |
81 | msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); | 81 | msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); |
82 | msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); | 82 | msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); |
83 | if (version == VERSION_WIN8_1) | 83 | if (version == VERSION_WIN8_1) { |
84 | msg->target_vcpu = hv_context.vp_index[smp_processor_id()]; | 84 | msg->target_vcpu = hv_context.vp_index[get_cpu()]; |
85 | put_cpu(); | ||
86 | } | ||
85 | 87 | ||
86 | /* | 88 | /* |
87 | * Add to list before we send the request since we may | 89 | * Add to list before we send the request since we may |