aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/vmbus_drv.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2012-12-01 09:46:55 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 14:39:15 -0500
commit5ab05951c586a2ed9e19a3ed8c437346bfabbfb7 (patch)
tree6b35e7482fd3c169fb46de98c3751db1e2035cb5 /drivers/hv/vmbus_drv.c
parentb0209501dc7586cbfbf6d023f2dd3ce4621aff2c (diff)
Drivers: hv: Add a check to deal with spurious interrupts
We establish the handler before we have fully initialized the VMBUS state. Deal with spurious interrupts. 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/vmbus_drv.c')
-rw-r--r--drivers/hv/vmbus_drv.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index e066d418be97..797142c07fa0 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -454,6 +454,12 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
454 union hv_synic_event_flags *event; 454 union hv_synic_event_flags *event;
455 bool handled = false; 455 bool handled = false;
456 456
457 page_addr = hv_context.synic_event_page[cpu];
458 if (page_addr == NULL)
459 return IRQ_NONE;
460
461 event = (union hv_synic_event_flags *)page_addr +
462 VMBUS_MESSAGE_SINT;
457 /* 463 /*
458 * Check for events before checking for messages. This is the order 464 * Check for events before checking for messages. This is the order
459 * in which events and messages are checked in Windows guests on 465 * in which events and messages are checked in Windows guests on
@@ -463,10 +469,6 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id)
463 if ((vmbus_proto_version == VERSION_WS2008) || 469 if ((vmbus_proto_version == VERSION_WS2008) ||
464 (vmbus_proto_version == VERSION_WIN7)) { 470 (vmbus_proto_version == VERSION_WIN7)) {
465 471
466 page_addr = hv_context.synic_event_page[cpu];
467 event = (union hv_synic_event_flags *)page_addr +
468 VMBUS_MESSAGE_SINT;
469
470 /* Since we are a child, we only need to check bit 0 */ 472 /* Since we are a child, we only need to check bit 0 */
471 if (sync_test_and_clear_bit(0, 473 if (sync_test_and_clear_bit(0,
472 (unsigned long *) &event->flags32[0])) { 474 (unsigned long *) &event->flags32[0])) {