Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3be77774 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

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: default avatarK. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b3bf60c7
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -383,10 +383,13 @@ int vmbus_post_msg(void *buffer, size_t buflen)
int vmbus_set_event(struct vmbus_channel *channel)
int vmbus_set_event(struct vmbus_channel *channel)
{
{
	u32 child_relid = channel->offermsg.child_relid;
	u32 child_relid = channel->offermsg.child_relid;

	if (!channel->is_dedicated_interrupt) {
		/* Each u32 represents 32 channels */
		/* Each u32 represents 32 channels */
		sync_set_bit(child_relid & 31,
		sync_set_bit(child_relid & 31,
			(unsigned long *)vmbus_connection.send_int_page +
			(unsigned long *)vmbus_connection.send_int_page +
			(child_relid >> 5));
			(child_relid >> 5));
	}


	return hv_signal_event(hv_context.signal_event_param);
	return hv_signal_event(channel->sig_event);
}
}