]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Drivers: hv: Cleanup vmbus_set_event() to support win7 and beyond
authorK. Y. Srinivasan <kys@microsoft.com>
Sat, 1 Dec 2012 14:46:46 +0000 (06:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 19:34:37 +0000 (11:34 -0800)
On win7 (ws2008 R2) and beyond, we have the notion of having dedicated interrupts on
a per-channel basis. When a channel has a dedicated interrupt assigned, there is no need
to set the interrupt bit in the shared page. Implement this optimization.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/connection.c

index 56b14e57bdd8fc0c8cfaa927a508c63f0a561c82..114050dc8e28c4ea1e5440891c6ee00fd59224aa 100644 (file)
@@ -383,10 +383,13 @@ int vmbus_post_msg(void *buffer, size_t buflen)
 int vmbus_set_event(struct vmbus_channel *channel)
 {
        u32 child_relid = channel->offermsg.child_relid;
-       /* Each u32 represents 32 channels */
-       sync_set_bit(child_relid & 31,
-               (unsigned long *)vmbus_connection.send_int_page +
-               (child_relid >> 5));
 
-       return hv_signal_event(hv_context.signal_event_param);
+       if (!channel->is_dedicated_interrupt) {
+               /* Each u32 represents 32 channels */
+               sync_set_bit(child_relid & 31,
+                       (unsigned long *)vmbus_connection.send_int_page +
+                       (child_relid >> 5));
+       }
+
+       return hv_signal_event(channel->sig_event);
 }