Commit b868536d authored by Tim Gardner's avatar Tim Gardner

Revert "Drivers: hv: vmbus: Support handling messages on multiple CPUs"

BugLink: http://bugs.launchpad.net/bugs/1541585

This reverts commit 6e97c2369f18d020c1384bf0716aec6009e8128a.
parent 03dc7d81
...@@ -212,8 +212,6 @@ int hv_init(void) ...@@ -212,8 +212,6 @@ int hv_init(void)
sizeof(int) * NR_CPUS); sizeof(int) * NR_CPUS);
memset(hv_context.event_dpc, 0, memset(hv_context.event_dpc, 0,
sizeof(void *) * NR_CPUS); sizeof(void *) * NR_CPUS);
memset(hv_context.msg_dpc, 0,
sizeof(void *) * NR_CPUS);
memset(hv_context.clk_evt, 0, memset(hv_context.clk_evt, 0,
sizeof(void *) * NR_CPUS); sizeof(void *) * NR_CPUS);
...@@ -425,13 +423,6 @@ int hv_synic_alloc(void) ...@@ -425,13 +423,6 @@ int hv_synic_alloc(void)
} }
tasklet_init(hv_context.event_dpc[cpu], vmbus_on_event, cpu); tasklet_init(hv_context.event_dpc[cpu], vmbus_on_event, cpu);
hv_context.msg_dpc[cpu] = kmalloc(size, GFP_ATOMIC);
if (hv_context.msg_dpc[cpu] == NULL) {
pr_err("Unable to allocate event dpc\n");
goto err;
}
tasklet_init(hv_context.msg_dpc[cpu], vmbus_on_msg_dpc, cpu);
hv_context.clk_evt[cpu] = kzalloc(ced_size, GFP_ATOMIC); hv_context.clk_evt[cpu] = kzalloc(ced_size, GFP_ATOMIC);
if (hv_context.clk_evt[cpu] == NULL) { if (hv_context.clk_evt[cpu] == NULL) {
pr_err("Unable to allocate clock event device\n"); pr_err("Unable to allocate clock event device\n");
...@@ -473,7 +464,6 @@ int hv_synic_alloc(void) ...@@ -473,7 +464,6 @@ int hv_synic_alloc(void)
static void hv_synic_free_cpu(int cpu) static void hv_synic_free_cpu(int cpu)
{ {
kfree(hv_context.event_dpc[cpu]); kfree(hv_context.event_dpc[cpu]);
kfree(hv_context.msg_dpc[cpu]);
kfree(hv_context.clk_evt[cpu]); kfree(hv_context.clk_evt[cpu]);
if (hv_context.synic_event_page[cpu]) if (hv_context.synic_event_page[cpu])
free_page((unsigned long)hv_context.synic_event_page[cpu]); free_page((unsigned long)hv_context.synic_event_page[cpu]);
......
...@@ -443,11 +443,10 @@ struct hv_context { ...@@ -443,11 +443,10 @@ struct hv_context {
u32 vp_index[NR_CPUS]; u32 vp_index[NR_CPUS];
/* /*
* Starting with win8, we can take channel interrupts on any CPU; * Starting with win8, we can take channel interrupts on any CPU;
* we will manage the tasklet that handles events messages on a per CPU * we will manage the tasklet that handles events on a per CPU
* basis. * basis.
*/ */
struct tasklet_struct *event_dpc[NR_CPUS]; struct tasklet_struct *event_dpc[NR_CPUS];
struct tasklet_struct *msg_dpc[NR_CPUS];
/* /*
* To optimize the mapping of relid to channel, maintain * To optimize the mapping of relid to channel, maintain
* per-cpu list of the channels based on their CPU affinity. * per-cpu list of the channels based on their CPU affinity.
...@@ -670,7 +669,6 @@ int vmbus_post_msg(void *buffer, size_t buflen); ...@@ -670,7 +669,6 @@ int vmbus_post_msg(void *buffer, size_t buflen);
void vmbus_set_event(struct vmbus_channel *channel); void vmbus_set_event(struct vmbus_channel *channel);
void vmbus_on_event(unsigned long data); void vmbus_on_event(unsigned long data);
void vmbus_on_msg_dpc(unsigned long data);
int hv_kvp_init(struct hv_util_service *); int hv_kvp_init(struct hv_util_service *);
void hv_kvp_deinit(void); void hv_kvp_deinit(void);
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
static struct acpi_device *hv_acpi_dev; static struct acpi_device *hv_acpi_dev;
static struct tasklet_struct msg_dpc;
static struct completion probe_event; static struct completion probe_event;
...@@ -711,7 +712,7 @@ static void hv_process_timer_expiration(struct hv_message *msg, int cpu) ...@@ -711,7 +712,7 @@ static void hv_process_timer_expiration(struct hv_message *msg, int cpu)
vmbus_signal_eom(msg); vmbus_signal_eom(msg);
} }
void vmbus_on_msg_dpc(unsigned long data) static void vmbus_on_msg_dpc(unsigned long data)
{ {
int cpu = smp_processor_id(); int cpu = smp_processor_id();
void *page_addr = hv_context.synic_message_page[cpu]; void *page_addr = hv_context.synic_message_page[cpu];
...@@ -799,7 +800,7 @@ static void vmbus_isr(void) ...@@ -799,7 +800,7 @@ static void vmbus_isr(void)
if (msg->header.message_type == HVMSG_TIMER_EXPIRED) if (msg->header.message_type == HVMSG_TIMER_EXPIRED)
hv_process_timer_expiration(msg, cpu); hv_process_timer_expiration(msg, cpu);
else else
tasklet_schedule(hv_context.msg_dpc[cpu]); tasklet_schedule(&msg_dpc);
} }
} }
...@@ -823,6 +824,8 @@ static int vmbus_bus_init(void) ...@@ -823,6 +824,8 @@ static int vmbus_bus_init(void)
return ret; return ret;
} }
tasklet_init(&msg_dpc, vmbus_on_msg_dpc, 0);
ret = bus_register(&hv_bus); ret = bus_register(&hv_bus);
if (ret) if (ret)
goto err_cleanup; goto err_cleanup;
...@@ -1318,8 +1321,7 @@ static void __exit vmbus_exit(void) ...@@ -1318,8 +1321,7 @@ static void __exit vmbus_exit(void)
hv_synic_clockevents_cleanup(); hv_synic_clockevents_cleanup();
vmbus_disconnect(); vmbus_disconnect();
hv_remove_vmbus_irq(); hv_remove_vmbus_irq();
for_each_online_cpu(cpu) tasklet_kill(&msg_dpc);
tasklet_kill(hv_context.msg_dpc[cpu]);
vmbus_free_channels(); vmbus_free_channels();
if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
unregister_die_notifier(&hyperv_die_block); unregister_die_notifier(&hyperv_die_block);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment