aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-03-03 13:25:47 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-03 13:25:47 -0500
commit686c09407d24123755ee05aae5be680be886a233 (patch)
treec30976567e12b6c6b1ab4dd42be7ace3cc09ac06
parentbc2e4a90d9f75f1664c1587eb09ecd10bb71b022 (diff)
parent302a3c0f2757ae1a3e7df3f9fa1f20e2214ab945 (diff)
Merge tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc patch from Greg Kroah-Hartman: "Here is one remaining patch for 3.9-rc1. It is for the hyper-v drivers, and had to wait until some other patches went in through the x86 tree." Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> * tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
-rw-r--r--drivers/hv/channel_mgmt.c2
-rw-r--r--drivers/hv/hv.c5
-rw-r--r--drivers/hv/vmbus_drv.c11
3 files changed, 10 insertions, 8 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 53a8600162a5..ff1be167eb04 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -318,7 +318,7 @@ static u32 get_vp_index(uuid_le *type_guid)
318 return 0; 318 return 0;
319 } 319 }
320 cur_cpu = (++next_vp % max_cpus); 320 cur_cpu = (++next_vp % max_cpus);
321 return 0; 321 return cur_cpu;
322} 322}
323 323
324/* 324/*
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 1c5481da6e4a..731158910c1e 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -272,7 +272,7 @@ u16 hv_signal_event(void *con_id)
272 * retrieve the initialized message and event pages. Otherwise, we create and 272 * retrieve the initialized message and event pages. Otherwise, we create and
273 * initialize the message and event pages. 273 * initialize the message and event pages.
274 */ 274 */
275void hv_synic_init(void *irqarg) 275void hv_synic_init(void *arg)
276{ 276{
277 u64 version; 277 u64 version;
278 union hv_synic_simp simp; 278 union hv_synic_simp simp;
@@ -281,7 +281,6 @@ void hv_synic_init(void *irqarg)
281 union hv_synic_scontrol sctrl; 281 union hv_synic_scontrol sctrl;
282 u64 vp_index; 282 u64 vp_index;
283 283
284 u32 irq_vector = *((u32 *)(irqarg));
285 int cpu = smp_processor_id(); 284 int cpu = smp_processor_id();
286 285
287 if (!hv_context.hypercall_page) 286 if (!hv_context.hypercall_page)
@@ -335,7 +334,7 @@ void hv_synic_init(void *irqarg)
335 rdmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, shared_sint.as_uint64); 334 rdmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
336 335
337 shared_sint.as_uint64 = 0; 336 shared_sint.as_uint64 = 0;
338 shared_sint.vector = irq_vector; /* HV_SHARED_SINT_IDT_VECTOR + 0x20; */ 337 shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
339 shared_sint.masked = false; 338 shared_sint.masked = false;
340 shared_sint.auto_eoi = true; 339 shared_sint.auto_eoi = true;
341 340
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index cf19dfa5ead1..bf421e0efa1e 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -36,6 +36,7 @@
36#include <linux/kernel_stat.h> 36#include <linux/kernel_stat.h>
37#include <asm/hyperv.h> 37#include <asm/hyperv.h>
38#include <asm/hypervisor.h> 38#include <asm/hypervisor.h>
39#include <asm/mshyperv.h>
39#include "hyperv_vmbus.h" 40#include "hyperv_vmbus.h"
40 41
41 42
@@ -528,7 +529,6 @@ static void vmbus_flow_handler(unsigned int irq, struct irq_desc *desc)
528static int vmbus_bus_init(int irq) 529static int vmbus_bus_init(int irq)
529{ 530{
530 int ret; 531 int ret;
531 unsigned int vector;
532 532
533 /* Hypervisor initialization...setup hypercall page..etc */ 533 /* Hypervisor initialization...setup hypercall page..etc */
534 ret = hv_init(); 534 ret = hv_init();
@@ -558,13 +558,16 @@ static int vmbus_bus_init(int irq)
558 */ 558 */
559 irq_set_handler(irq, vmbus_flow_handler); 559 irq_set_handler(irq, vmbus_flow_handler);
560 560
561 vector = IRQ0_VECTOR + irq; 561 /*
562 * Register our interrupt handler.
563 */
564 hv_register_vmbus_handler(irq, vmbus_isr);
562 565
563 /* 566 /*
564 * Notify the hypervisor of our irq and 567 * Initialize the per-cpu interrupt state and
565 * connect to the host. 568 * connect to the host.
566 */ 569 */
567 on_each_cpu(hv_synic_init, (void *)&vector, 1); 570 on_each_cpu(hv_synic_init, NULL, 1);
568 ret = vmbus_connect(); 571 ret = vmbus_connect();
569 if (ret) 572 if (ret)
570 goto err_irq; 573 goto err_irq;