diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2012-12-01 09:46:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 14:34:37 -0500 |
commit | 3be77774017fc3c7dd0b434265dfa417aac23545 (patch) | |
tree | d50aa05aa9ef8bb01499153e48fd08a9458546f7 /drivers/hv/connection.c | |
parent | b3bf60c7b4665d40b8eae2217b54c4745f49f470 (diff) |
Drivers: hv: Cleanup vmbus_set_event() to support win7 and beyond
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>
Diffstat (limited to 'drivers/hv/connection.c')
-rw-r--r-- | drivers/hv/connection.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index 56b14e57bdd8..114050dc8e28 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c | |||
@@ -383,10 +383,13 @@ int vmbus_post_msg(void *buffer, size_t buflen) | |||
383 | int vmbus_set_event(struct vmbus_channel *channel) | 383 | int vmbus_set_event(struct vmbus_channel *channel) |
384 | { | 384 | { |
385 | u32 child_relid = channel->offermsg.child_relid; | 385 | u32 child_relid = channel->offermsg.child_relid; |
386 | /* Each u32 represents 32 channels */ | ||
387 | sync_set_bit(child_relid & 31, | ||
388 | (unsigned long *)vmbus_connection.send_int_page + | ||
389 | (child_relid >> 5)); | ||
390 | 386 | ||
391 | return hv_signal_event(hv_context.signal_event_param); | 387 | if (!channel->is_dedicated_interrupt) { |
388 | /* Each u32 represents 32 channels */ | ||
389 | sync_set_bit(child_relid & 31, | ||
390 | (unsigned long *)vmbus_connection.send_int_page + | ||
391 | (child_relid >> 5)); | ||
392 | } | ||
393 | |||
394 | return hv_signal_event(channel->sig_event); | ||
392 | } | 395 | } |