Skip to content

Commit

Permalink
Merge tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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 <[email protected]>

* 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
  • Loading branch information
torvalds committed Mar 3, 2013
2 parents bc2e4a9 + 302a3c0 commit 686c094
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static u32 get_vp_index(uuid_le *type_guid)
return 0;
}
cur_cpu = (++next_vp % max_cpus);
return 0;
return cur_cpu;
}

/*
Expand Down
5 changes: 2 additions & 3 deletions drivers/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ u16 hv_signal_event(void *con_id)
* retrieve the initialized message and event pages. Otherwise, we create and
* initialize the message and event pages.
*/
void hv_synic_init(void *irqarg)
void hv_synic_init(void *arg)
{
u64 version;
union hv_synic_simp simp;
Expand All @@ -281,7 +281,6 @@ void hv_synic_init(void *irqarg)
union hv_synic_scontrol sctrl;
u64 vp_index;

u32 irq_vector = *((u32 *)(irqarg));
int cpu = smp_processor_id();

if (!hv_context.hypercall_page)
Expand Down Expand Up @@ -335,7 +334,7 @@ void hv_synic_init(void *irqarg)
rdmsrl(HV_X64_MSR_SINT0 + VMBUS_MESSAGE_SINT, shared_sint.as_uint64);

shared_sint.as_uint64 = 0;
shared_sint.vector = irq_vector; /* HV_SHARED_SINT_IDT_VECTOR + 0x20; */
shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
shared_sint.masked = false;
shared_sint.auto_eoi = true;

Expand Down
11 changes: 7 additions & 4 deletions drivers/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/kernel_stat.h>
#include <asm/hyperv.h>
#include <asm/hypervisor.h>
#include <asm/mshyperv.h>
#include "hyperv_vmbus.h"


Expand Down Expand Up @@ -528,7 +529,6 @@ static void vmbus_flow_handler(unsigned int irq, struct irq_desc *desc)
static int vmbus_bus_init(int irq)
{
int ret;
unsigned int vector;

/* Hypervisor initialization...setup hypercall page..etc */
ret = hv_init();
Expand Down Expand Up @@ -558,13 +558,16 @@ static int vmbus_bus_init(int irq)
*/
irq_set_handler(irq, vmbus_flow_handler);

vector = IRQ0_VECTOR + irq;
/*
* Register our interrupt handler.
*/
hv_register_vmbus_handler(irq, vmbus_isr);

/*
* Notify the hypervisor of our irq and
* Initialize the per-cpu interrupt state and
* connect to the host.
*/
on_each_cpu(hv_synic_init, (void *)&vector, 1);
on_each_cpu(hv_synic_init, NULL, 1);
ret = vmbus_connect();
if (ret)
goto err_irq;
Expand Down

0 comments on commit 686c094

Please sign in to comment.