svn commit: r300111 - head/sys/dev/hyperv/vmbus
Sepherosa Ziehau
sephe at FreeBSD.org
Wed May 18 03:58:06 UTC 2016
Author: sephe
Date: Wed May 18 03:58:04 2016
New Revision: 300111
URL: https://svnweb.freebsd.org/changeset/base/300111
Log:
hyperv/vmbus: Utilize curcpu
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6408
Modified:
head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Wed May 18 03:55:54 2016 (r300110)
+++ head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c Wed May 18 03:58:04 2016 (r300111)
@@ -77,11 +77,9 @@ static char *vmbus_ids[] = { "VMBUS", NU
static void
vmbus_msg_swintr(void *arg, int pending __unused)
{
- int cpu;
hv_vmbus_message *msg;
- cpu = (int)(long)arg;
- msg = ((hv_vmbus_message *)hv_vmbus_g_context.syn_ic_msg_page[cpu]) +
+ msg = ((hv_vmbus_message *)hv_vmbus_g_context.syn_ic_msg_page[curcpu]) +
HV_VMBUS_MESSAGE_SINT;
for (;;) {
const hv_vmbus_channel_msg_table_entry *entry;
@@ -136,12 +134,10 @@ static inline int
hv_vmbus_isr(struct trapframe *frame)
{
struct vmbus_softc *sc = vmbus_get_softc();
- int cpu;
+ int cpu = curcpu;
hv_vmbus_message *msg;
void *page_addr;
- cpu = PCPU_GET(cpuid);
-
/*
* The Windows team has advised that we check for events
* before checking for messages. This is the way they do it
@@ -447,7 +443,7 @@ vmbus_bus_init(void)
taskqueue_start_threads_cpuset(&hv_vmbus_g_context.hv_msg_tq[j],
1, PI_NET, &cpu_mask, "hvmsg%d", j);
TASK_INIT(&hv_vmbus_g_context.hv_msg_task[j], 0,
- vmbus_msg_swintr, (void *)(long)j);
+ vmbus_msg_swintr, NULL);
/*
* Prepare the per cpu msg and event pages to be called on each cpu.
More information about the svn-src-head
mailing list