aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/hv.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2012-12-01 09:46:53 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 14:39:15 -0500
commitdb11f12a11c9f04d504510e1cc20775209b0e509 (patch)
tree8c19d9cf2f84d8d395a240eda7386d92eed699fd /drivers/hv/hv.c
parent01986313289bd2e143d693f803c7675ea121a832 (diff)
Drivers: hv: Manage event tasklets on per-cpu basis
Now that we can potentially take vmbus interrupts on any CPU, make the tasklets per-CPU. 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/hv.c')
-rw-r--r--drivers/hv/hv.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index e989c6fd1f8f..363532add4c7 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -27,6 +27,7 @@
27#include <linux/vmalloc.h> 27#include <linux/vmalloc.h>
28#include <linux/hyperv.h> 28#include <linux/hyperv.h>
29#include <linux/version.h> 29#include <linux/version.h>
30#include <linux/interrupt.h>
30#include <asm/hyperv.h> 31#include <asm/hyperv.h>
31#include "hyperv_vmbus.h" 32#include "hyperv_vmbus.h"
32 33
@@ -137,6 +138,8 @@ int hv_init(void)
137 sizeof(void *) * NR_CPUS); 138 sizeof(void *) * NR_CPUS);
138 memset(hv_context.vp_index, 0, 139 memset(hv_context.vp_index, 0,
139 sizeof(int) * NR_CPUS); 140 sizeof(int) * NR_CPUS);
141 memset(hv_context.event_dpc, 0,
142 sizeof(void *) * NR_CPUS);
140 143
141 max_leaf = query_hypervisor_info(); 144 max_leaf = query_hypervisor_info();
142 145
@@ -285,6 +288,15 @@ void hv_synic_init(void *irqarg)
285 /* Check the version */ 288 /* Check the version */
286 rdmsrl(HV_X64_MSR_SVERSION, version); 289 rdmsrl(HV_X64_MSR_SVERSION, version);
287 290
291 hv_context.event_dpc[cpu] = (struct tasklet_struct *)
292 kmalloc(sizeof(struct tasklet_struct),
293 GFP_ATOMIC);
294 if (hv_context.event_dpc[cpu] == NULL) {
295 pr_err("Unable to allocate event dpc\n");
296 goto cleanup;
297 }
298 tasklet_init(hv_context.event_dpc[cpu], vmbus_on_event, cpu);
299
288 hv_context.synic_message_page[cpu] = 300 hv_context.synic_message_page[cpu] =
289 (void *)get_zeroed_page(GFP_ATOMIC); 301 (void *)get_zeroed_page(GFP_ATOMIC);
290 302