diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2012-12-01 06:46:54 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 11:39:15 -0800 |
commit | b0209501dc7586cbfbf6d023f2dd3ce4621aff2c (patch) | |
tree | 2918b365f599b25540f966cc763ea6bc11eda770 /drivers/hv/vmbus_drv.c | |
parent | db11f12a11c9f04d504510e1cc20775209b0e509 (diff) |
Drivers: hv: Handle vmbus interrupts concurrently on all cpus
Vmbus interrupts are unique in that while the interrupt is delivered on a
given vector, these can be handled concurrently on different CPUs. Handle the
vmbus interrupts concurrently on all the CPUs.
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.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 6e4f85720f2..e066d418be9 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c @@ -33,6 +33,7 @@ #include <acpi/acpi_bus.h> #include <linux/completion.h> #include <linux/hyperv.h> +#include <linux/kernel_stat.h> #include <asm/hyperv.h> #include <asm/hypervisor.h> #include "hyperv_vmbus.h" @@ -501,6 +502,19 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id) } /* + * vmbus interrupt flow handler: + * vmbus interrupts can concurrently occur on multiple CPUs and + * can be handled concurrently. + */ + +void vmbus_flow_handler(unsigned int irq, struct irq_desc *desc) +{ + kstat_incr_irqs_this_cpu(irq, desc); + + desc->action->handler(irq, desc->action->dev_id); +} + +/* * vmbus_bus_init -Main vmbus driver initialization routine. * * Here, we @@ -535,6 +549,13 @@ static int vmbus_bus_init(int irq) goto err_unregister; } + /* + * Vmbus interrupts can be handled concurrently on + * different CPUs. Establish an appropriate interrupt flow + * handler that can support this model. + */ + irq_set_handler(irq, vmbus_flow_handler); + vector = IRQ0_VECTOR + irq; /* |