Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Drivers: hv: vmbus: move init_vp_index() call to vmbus_process_offer()

We need to call init_vp_index() after we added the channel to the appropriate
list (global or subchannel) to be able to use this information when assigning
the channel to the particular vcpu. To do so we need to move a couple of
functions around. The only real change is the init_vp_index() call. This is a
small refactoring without a functional change.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vitaly Kuznetsov and committed by
Greg Kroah-Hartman
f38e7dd7 357e836a

+5 -2
+5 -2
drivers/hv/channel_mgmt.c
··· 32 32 33 33 #include "hyperv_vmbus.h" 34 34 35 + static void init_vp_index(struct vmbus_channel *channel, 36 + const uuid_le *type_guid); 37 + 35 38 /** 36 39 * vmbus_prep_negotiate_resp() - Create default response for Hyper-V Negotiate message 37 40 * @icmsghdrp: Pointer to msg header structure ··· 275 272 goto err_free_chan; 276 273 } 277 274 275 + init_vp_index(newchannel, &newchannel->offermsg.offer.if_type); 276 + 278 277 if (newchannel->target_cpu != get_cpu()) { 279 278 put_cpu(); 280 279 smp_call_function_single(newchannel->target_cpu, ··· 480 475 newchannel->sig_event->connectionid.u.id = 481 476 offer->connection_id; 482 477 } 483 - 484 - init_vp_index(newchannel, &offer->offer.if_type); 485 478 486 479 memcpy(&newchannel->offermsg, offer, 487 480 sizeof(struct vmbus_channel_offer_channel));